Package com.mucommander.ui.text

Examples of com.mucommander.ui.text.FilePathField


        this.nameField = new JTextField();
        nameField.getDocument().addDocumentListener(this);
        compPanel.addRow(Translator.get("name")+":", nameField, 5);

        // Create a path field with auto-completion capabilities
        this.locationField = new FilePathField();
        locationField.getDocument().addDocumentListener(this);
        compPanel.addRow(Translator.get("location")+":", locationField, 10);

        YBoxPanel yPanel = new YBoxPanel(10);
        yPanel.add(compPanel);
View Full Code Here


        pnlMain.addRow(Translator.get("split_file_dialog.file_to_split") + ":", new JLabel(file.getName()), 0);
        String size = SizeFormat.format(file.getSize(), SizeFormat.DIGITS_FULL | SizeFormat.UNIT_LONG | SizeFormat.INCLUDE_SPACE);
        pnlMain.addRow(Translator.get("size") + ":", new JLabel(size), 10);
       
    edtTargetDirectory = new FilePathField(destFolder.getAbsolutePath(), 40);
        pnlMain.addRow(Translator.get("split_file_dialog.target_directory") + ":", edtTargetDirectory, 5);

        XBoxPanel pnlSize = new XBoxPanel();
    String[] sizes = new String[] {
      MSG_AUTO, 
View Full Code Here

    //////////////////////////

    public void itemStateChanged(ItemEvent e) {
        int newFormatIndex;

        FilePathField pathField = getPathField();

        // Updates the GUI if, and only if, the format selection has changed.
        if(lastFormatIndex != (newFormatIndex = formatsComboBox.getSelectedIndex())) {

            String fileName = pathField.getText()// Name of the destination archive file.
            String oldFormatExtension = Archiver.getFormatExtension(formats[lastFormatIndex])// Old/current format's extension
            if(fileName.endsWith("." + oldFormatExtension)) {
                int selectionStart;
                int selectionEnd;

                // Saves the old selection.
                selectionStart = pathField.getSelectionStart();
                selectionEnd   = pathField.getSelectionEnd();

                // Computes the new file name.
                fileName = fileName.substring(0, fileName.length() - oldFormatExtension.length()) +
                    Archiver.getFormatExtension(formats[newFormatIndex]);

                // Makes sure that the selection stays somewhat coherent.
                if(selectionEnd == pathField.getText().length())
                    selectionEnd = fileName.length();

                // Resets the file path field.
                pathField.setText(fileName);
                pathField.setSelectionStart(selectionStart);
                pathField.setSelectionEnd(selectionEnd);
            }

            commentArea.setEnabled(Archiver.formatSupportsComment(formats[formatsComboBox.getSelectedIndex()]));
            lastFormatIndex = newFormatIndex;
        }

        // Transfer focus back to the text field
        pathField.requestFocus();
    }
View Full Code Here

        tempPanel = new JPanel(new BorderLayout());
        tempPanel.add(specificLocationRadioButton, BorderLayout.WEST);
        specificLocationRadioButton.addItemListener(this);
       
        // Create a path field with auto-completion capabilities
        specificLocationTextField = new FilePathField(getChecksumFilename(lastUsedAlgorithm));
        specificLocationTextField.setEnabled(false);
        tempPanel.add(specificLocationTextField, BorderLayout.CENTER);

        JPanel tempPanel2 = new JPanel(new BorderLayout());
        tempPanel2.add(tempPanel, BorderLayout.NORTH);
View Full Code Here

        YBoxPanel mainPanel = new YBoxPanel();
        mainPanel.add(new JLabel(ActionProperties.getActionTooltip(mkfileMode?MkfileAction.Descriptor.ACTION_ID:MkdirAction.Descriptor.ACTION_ID)+" :"));

        // Create a path field with auto-completion capabilities
        pathField = new FilePathField();
        pathField.addActionListener(this);
        mainPanel.add(pathField);

        if(mkfileMode) {
            JPanel tempPanel = new JPanel(new BorderLayout());
View Full Code Here

        mainPanel = new YBoxPanel();
        mainPanel.add(new JLabel(labelText+" :"));

        // Create a path field with auto-completion capabilities
        pathField = new FilePathField();

        JPanel borderPanel = new JPanel(new BorderLayout());
        borderPanel.add(pathField, BorderLayout.CENTER);
        // Spinning dial displayed while I/O-bound operations are being performed in a separate thread
        spinningDial = new SpinningDial(false);
View Full Code Here

TOP

Related Classes of com.mucommander.ui.text.FilePathField

Copyright © 2018 www.massapicom. 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.