Examples of FolderPanel


Examples of com.mucommander.ui.main.FolderPanel

        while(run) {
            if(random.nextInt(2)==0)
                ActionManager.performAction(com.mucommander.ui.action.impl.SwitchActiveTableAction.Descriptor.ACTION_ID, mainFrame);   

            FolderPanel folderPanel = mainFrame.getActivePanel();
            FileTable fileTable = mainFrame.getActiveTable();
            AbstractFile currentFolder = folderPanel.getCurrentFolder();

            try {
                AbstractFile parentFolder = currentFolder.getParent();
                AbstractFile children[] = currentFolder.ls();
                // 1 in 3 chance to go up if folder has children
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

        // when muCommander is not started yet. In this case, this method is called while Launcher is still busy
        // launching the application (no mainframe exists yet).
        Launcher.waitUntilLaunched();

        AbstractFile file = FileFactory.getFile(event.getFilename());
        FolderPanel activePanel = WindowManager.getCurrentMainFrame().getActivePanel();
        if(file.isBrowsable())
            activePanel.tryChangeCurrentFolder(file);
        else
            activePanel.tryChangeCurrentFolder(file.getParent(), file, false);
    }
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

        this.dragAccepted = event.isDataFlavorSupported(TransferableFileSet.getFileSetDataFlavor())
                || event.isDataFlavorSupported(DataFlavor.javaFileListFlavor)
                || event.isDataFlavorSupported(DataFlavor.getTextPlainUnicodeFlavor());

        if(dragAccepted && DnDContext.isDragInitiatedByMucommander()) {
            FolderPanel dragInitiator = DnDContext.getDragInitiator();

            if(dragInitiator==folderPanel || dragInitiator.getCurrentFolder().equalsCanonical(folderPanel.getCurrentFolder())) {
                // Refuse drag if the drag was initiated by the same FolderPanel, or if its current folder is the same
                // as this one
                this.dragAccepted = false;
            }
            else {
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

    // MuAction implementation //
    /////////////////////////////

    @Override
    public void performAction() {
        FolderPanel folderPanel = getFolderPanel();
        if(url!=null) {
            folderPanel.tryChangeCurrentFolder(url);
        }
        else if(file!=null) {
            folderPanel.tryChangeCurrentFolder(file);
        }
        else if(path!=null) {
            folderPanel.tryChangeCurrentFolder(path);
        }
    }
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

        // Abort if the focus is not in the MainFrame this action is tied to
        if(focusOwner==null)
            return;

        FolderPanel folderPanel = mainFrame.getActivePanel();
        FileTable fileTable = folderPanel.getFileTable();
        JTextField locationField = folderPanel.getLocationTextField();
        JTree tree = folderPanel.getFoldersTreePanel().getTree();

        // Request focus on the 'previous' component, the cycle order being from right to left, bottom to top.
        Component previousComponent;
        if(focusOwner==fileTable)
            previousComponent = folderPanel.isTreeVisible()?tree:locationField;
        else if(focusOwner==tree)
            previousComponent = locationField;
        else if(focusOwner==locationField)
            previousComponent = fileTable;
        else
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

        setHonourNoEventsMode(false);
    }

    @Override
    public void performAction() {
        FolderPanel folderPanel = mainFrame.getActivePanel();
        ChangeFolderThread changeFolderThread = folderPanel.getChangeFolderThread();

        if(changeFolderThread!=null)
            changeFolderThread.tryKill();
    }
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

   
    @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());
    }
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

 
    /**
     * Check and if needed, refreshes both file tables's current folders, based on the job's refresh policy.
     */
    protected void refreshTables() {
      FolderPanel activePanel = getMainFrame().getActivePanel();
      FolderPanel inactivePanel = getMainFrame().getInactivePanel();

        if(hasFolderChanged(inactivePanel.getCurrentFolder()))
          inactivePanel.tryRefreshCurrentFolder();

        if(hasFolderChanged(activePanel.getCurrentFolder())) {
            // Select file specified by selectFileWhenFinished (if any) only if the file exists in the active table's folder
            if(fileToSelect!=null && activePanel.getCurrentFolder().equalsCanonical(fileToSelect.getParent()) && fileToSelect.exists())
              activePanel.tryRefreshCurrentFolder(fileToSelect);
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

        // Abort if the focus is not in the MainFrame this action is tied to
        if(focusOwner==null)
            return;

        FolderPanel folderPanel = mainFrame.getActivePanel();
        FileTable fileTable = folderPanel.getFileTable();
        JTextField locationField = folderPanel.getLocationTextField();
        JTree tree = folderPanel.getFoldersTreePanel().getTree();

        // Request focus on the 'next' component, the cycle order being from left to right, top to bottom.
        Component nextComponent;
        if(focusOwner==locationField)
            nextComponent = folderPanel.isTreeVisible()?tree:fileTable;
        else if(focusOwner==tree)
            nextComponent = fileTable;
        else if(focusOwner==fileTable)
            nextComponent = locationField;
        else
View Full Code Here

Examples of com.mucommander.ui.main.FolderPanel

        ));
    }

    @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();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.