use of com.mucommander.ui.main.FolderPanel in project mucommander by mucommander.
the class FileJob method refreshTables.
/**
* Check and if needed, refreshes both file tables's current folders, based on the job's refresh policy.
*/
protected void refreshTables() {
FolderPanel inactivePanel = getMainFrame().getInactivePanel();
AbstractFile inactiveFolder = inactivePanel.getCurrentFolder();
if (hasFolderChanged(inactiveFolder))
inactivePanel.tryRefreshCurrentFolder();
FolderPanel activePanel = getMainFrame().getActivePanel();
AbstractFile activeFolder = activePanel.getCurrentFolder();
if (hasFolderChanged(activeFolder)) {
// Select file specified by selectFileWhenFinished (if any) only if the file exists in the active table's folder
if (fileToSelect != null && activeFolder.equalsCanonical(fileToSelect.getParent()) && fileToSelect.exists())
activePanel.tryRefreshCurrentFolder(fileToSelect);
else
activePanel.tryRefreshCurrentFolder();
}
// Repaint the status bar as marked files have changed
mainFrame.getStatusBar().updateSelectedFilesInfo();
}
use of com.mucommander.ui.main.FolderPanel in project mucommander by mucommander.
the class LocalCopyAction method performAction.
@Override
public void performAction() {
FolderPanel activePanel = mainFrame.getActivePanel();
AbstractFile selectedFile = activePanel.getFileTable().getSelectedFile(false, true);
// Display local copy dialog only if a file other than '..' is currently selected
if (selectedFile != null) {
new LocalCopyDialog(mainFrame, new FileSet(activePanel.getCurrentFolder(), selectedFile)).showDialog();
}
}
use of com.mucommander.ui.main.FolderPanel in project mucommander by mucommander.
the class GoToRootAction method performAction.
@Override
public void performAction() {
// Changes the current folder to make it the current folder's root folder.
// Does nothing if the current folder already is the root.
FolderPanel folderPanel = mainFrame.getActivePanel();
AbstractFile currentFolder = folderPanel.getCurrentFolder();
folderPanel.tryChangeCurrentFolder(currentFolder.getRoot());
}
Aggregations