file change indication
This commit is contained in:
parent
bc42c8986f
commit
4d9774471c
@ -524,6 +524,7 @@ public class FilePanelTab extends JPanel {
|
||||
lastValidRow = row;
|
||||
lastValidBriefColumn = briefCurrentColumn;
|
||||
}
|
||||
updateStatus();
|
||||
} else {
|
||||
// Selection became empty. Attempt to restore it.
|
||||
// We do this even if e.getValueIsAdjusting() is true to prevent temporary selection loss.
|
||||
@ -543,6 +544,7 @@ public class FilePanelTab extends JPanel {
|
||||
try {
|
||||
fileTable.scrollRectToVisible(fileTable.getCellRect(finalRow, finalCol, true));
|
||||
} catch (Exception ignore) {}
|
||||
updateStatus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -923,6 +925,7 @@ public class FilePanelTab extends JPanel {
|
||||
if (requestFocus) {
|
||||
fileTable.requestFocusInWindow();
|
||||
}
|
||||
updateStatus();
|
||||
});
|
||||
} else {
|
||||
if (autoSelectFirst && fileTable.getRowCount() > 0) {
|
||||
@ -946,9 +949,8 @@ public class FilePanelTab extends JPanel {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
// Notify directory change
|
||||
if (onDirectoryChanged != null) {
|
||||
@ -1004,7 +1006,6 @@ public class FilePanelTab extends JPanel {
|
||||
}
|
||||
}
|
||||
fileTable.repaint();
|
||||
updateStatus();
|
||||
});
|
||||
}
|
||||
|
||||
@ -2318,9 +2319,10 @@ public class FilePanelTab extends JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
String newStatus;
|
||||
if (markedCount > 0) {
|
||||
statusLabel.setText(String.format(" Selected: %d files, %d directories (%s)",
|
||||
fileCount, dirCount, FileItem.formatSize(totalSize)));
|
||||
newStatus = String.format(" Selected: %d files, %d directories (%s)",
|
||||
fileCount, dirCount, FileItem.formatSize(totalSize));
|
||||
} else {
|
||||
int selectedRow = fileTable.getSelectedRow();
|
||||
if (selectedRow >= 0) {
|
||||
@ -2334,22 +2336,26 @@ public class FilePanelTab extends JPanel {
|
||||
if (item != null && !item.getName().equals("..")) {
|
||||
if (item.isDirectory()) {
|
||||
// Always display directory names in square brackets
|
||||
statusLabel.setText(String.format(" [%s] | %s",
|
||||
newStatus = String.format(" [%s] | %s",
|
||||
item.getName(),
|
||||
item.getFormattedDate()));
|
||||
item.getFormattedDate());
|
||||
} else {
|
||||
statusLabel.setText(String.format(" %s | %s | %s",
|
||||
newStatus = String.format(" %s | %s | %s",
|
||||
item.getName(),
|
||||
FileItem.formatSize(item.getSize()),
|
||||
item.getFormattedDate()));
|
||||
item.getFormattedDate());
|
||||
}
|
||||
} else {
|
||||
statusLabel.setText(String.format(" Items: %d", tableModel.items.size()));
|
||||
newStatus = String.format(" Items: %d", tableModel.items.size());
|
||||
}
|
||||
} else {
|
||||
statusLabel.setText(String.format(" Items: %d", tableModel.items.size()));
|
||||
newStatus = String.format(" Items: %d", tableModel.items.size());
|
||||
}
|
||||
}
|
||||
|
||||
if (statusLabel != null && !newStatus.equals(statusLabel.getText())) {
|
||||
statusLabel.setText(newStatus);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user