Examples of XBoxPanel


Examples of com.mucommander.ui.layout.XBoxPanel

    /**
     * Initializes the tabbed panel's UI.
     */
    private void initUI() {
        Container contentPane;
        XBoxPanel buttonsPanel;
        JPanel    tempPanel;

        // Initializes the tabbed pane.
        prefPanels = new Vector<PreferencesPanel>();
        tabbedPane = new JTabbedPane(JTabbedPane.TOP);

        // Adds the tabbed pane.
        contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());
        contentPane.add(tabbedPane, BorderLayout.CENTER);

        // Buttons panel.
        buttonsPanel = new XBoxPanel();
        buttonsPanel.add(applyButton = new JButton(Translator.get("apply")));
        buttonsPanel.addSpace(20);
        buttonsPanel.add(okButton     = new JButton(Translator.get("ok")));
        buttonsPanel.add(cancelButton = new JButton(Translator.get("cancel")));
       
        // Disable "commit buttons".
        okButton.setEnabled(false);
      applyButton.setEnabled(false);

View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

        // Listen to tab change events
        tabbedPane.addChangeListener(this);
        contentPane.add(tabbedPane, BorderLayout.CENTER);
   
        YBoxPanel yPanel = new YBoxPanel();
        XBoxPanel xPanel = new XBoxPanel();
        xPanel.add(new JLabel(Translator.get("server_connect_dialog.server_url")+":"));
        xPanel.addSpace(5);
        urlLabel = new JLabel("");
        updateURLLabel();
        xPanel.add(urlLabel);
        yPanel.add(xPanel);

        yPanel.addSpace(10);

        this.saveCredentialsCheckBox = new JCheckBox(Translator.get("auth_dialog.store_credentials"), false);
View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

        YBoxPanel yPanel = new YBoxPanel(10);
        yPanel.add(compPanel);

        // Add buttons: 'remove', 'move up' and 'move down' buttons are enabled
        // only if there is at least one bookmark in the table
        XBoxPanel buttonsPanel = new XBoxPanel();
        JPanel buttonGroupPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));

        MnemonicHelper mnemonicHelper = new MnemonicHelper();

        // New bookmark button
        newButton = new JButton(Translator.get("edit_bookmarks_dialog.new"));
        newButton.setMnemonic(mnemonicHelper.getMnemonic(newButton));
        newButton.addActionListener(this);
        buttonGroupPanel.add(newButton);

        // Duplicate bookmark button
        duplicateButton = new JButton(Translator.get("duplicate"));
        duplicateButton.setMnemonic(mnemonicHelper.getMnemonic(duplicateButton));
        duplicateButton.addActionListener(this);
        buttonGroupPanel.add(duplicateButton);

        // Remove bookmark button
        removeButton = new JButton(bookmarkList.getRemoveAction());
        removeButton.setMnemonic(mnemonicHelper.getMnemonic(removeButton));
        buttonGroupPanel.add(removeButton);

        // Go to bookmark button
        goToButton = new JButton(Translator.get("go_to"));
        goToButton.setMnemonic(mnemonicHelper.getMnemonic(goToButton));
        goToButton.addActionListener(this);
        buttonGroupPanel.add(goToButton);

        buttonsPanel.add(buttonGroupPanel);

        // Button that closes the window
        closeButton = new JButton(Translator.get("close"));
        closeButton.setMnemonic(mnemonicHelper.getMnemonic(closeButton));
        closeButton.addActionListener(this);

        buttonsPanel.add(Box.createHorizontalGlue());
        buttonsPanel.add(closeButton);

        yPanel.add(buttonsPanel);

        contentPane.add(yPanel, BorderLayout.SOUTH);
View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

     * Creates a panel containing the dialog's buttons.
     * @return a panel containing the dialog's buttons.
     */
    private XBoxPanel createButtonsArea() {
        // Buttons panel
        XBoxPanel buttonsPanel;

        buttonsPanel = new XBoxPanel();

        // 'Clear history' button.
        buttonsPanel.add(clearButton = new JButton(Translator.get("run_dialog.clear_history")));
        clearButton.addActionListener(this);

        // Separator.
        buttonsPanel.add(Box.createHorizontalGlue());

        // 'Run / stop' and 'Cancel' buttons.
        buttonsPanel.add(DialogToolkit.createOKCancelPanel(
                runStopButton = new JButton(Translator.get("run_dialog.run")),
                cancelButton  = new JButton(Translator.get("cancel")),
                getRootPane(),
                this));

View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

        // Set preferred size
        setMinimumSize(MINIMUM_SIZE);
    }

    private JPanel createInnerPanel() {
      XBoxPanel panel = new XBoxPanel();
      panel.add(new JLabel(Translator.get("title") + ":"));
      panel.addSpace(10);
      panel.add(titleTextField);//, BorderLayout.CENTER);
      panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
      return panel;
    }
View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

                new JScrollPane(connectionList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),
                BorderLayout.CENTER);

        // Add buttons

        XBoxPanel buttonsPanel = new XBoxPanel();
        JPanel buttonGroupPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        MnemonicHelper mnemonicHelper = new MnemonicHelper();

        // Disconnect button
        disconnectButton = new JButton(Translator.get("server_connections_dialog.disconnect"));
        disconnectButton.setMnemonic(mnemonicHelper.getMnemonic(disconnectButton));
        disconnectButton.setEnabled(hasConnections);
        if(hasConnections)
            disconnectButton.addActionListener(this);

        buttonGroupPanel.add(disconnectButton);

        // Go to button
        goToButton = new JButton(Translator.get("go_to"));
        goToButton.setMnemonic(mnemonicHelper.getMnemonic(goToButton));
        goToButton.setEnabled(hasConnections);
        if(hasConnections)
            goToButton.addActionListener(this);
        buttonGroupPanel.add(goToButton);

        buttonsPanel.add(buttonGroupPanel);

        // Button that closes the window
        closeButton = new JButton(Translator.get("close"));
        closeButton.setMnemonic(mnemonicHelper.getMnemonic(closeButton));
        closeButton.addActionListener(this);

        buttonsPanel.add(Box.createHorizontalGlue());
        buttonsPanel.add(closeButton);

        contentPane.add(buttonsPanel, BorderLayout.SOUTH);

        // Connections list will receive initial focus
        setInitialFocusComponent(connectionList);
View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

        super(parent, title, parent);
        initUI();
    }
 
    private void initUI() {
      XBoxPanel buttonsPanel;
      JPanel    tempPanel;
      Container contentPane;
     
      // Get content-pane and set its layout.
        contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());
       
        // Add customization panel
        contentPane.add(createCustomizationPanel(), BorderLayout.CENTER);
     
      // Buttons panel.
        buttonsPanel = new XBoxPanel();
        buttonsPanel.add(applyButton = new JButton(Translator.get("apply")));
        buttonsPanel.addSpace(20);
        buttonsPanel.add(okButton     = new JButton(Translator.get("ok")));
        buttonsPanel.add(cancelButton = new JButton(Translator.get("cancel")));
       
        // Disable "commit buttons".
        applyButton.setEnabled(false);
        okButton.setEnabled(false);
       
View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

        /**
         * Creates the panel that contains the dialog's buttons.
         */
        private JPanel createButtonsPanel() {
            XBoxPanel buttonsPanel;
            JPanel    panel;
            JButton okButton;

            // Creates the panel and buttons.
            buttonsPanel = new XBoxPanel();
            buttonsPanel.add(resetButton = new JButton(Translator.get("reset")));
            buttonsPanel.addSpace(20);
            buttonsPanel.add(okButton = new JButton(Translator.get("ok")));
            buttonsPanel.add(cancelButton = new JButton(Translator.get("cancel")));

            // Tracks events.
            resetButton.addActionListener(this);
            okButton.addActionListener(this);
            cancelButton.addActionListener(this);
View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

        compPanel.addRow(Translator.get("password")+":", passwordField, 10);

        YBoxPanel yPanel = new YBoxPanel(10);
        yPanel.add(compPanel);

        XBoxPanel buttonsPanel = new XBoxPanel();
        MnemonicHelper mnemonicHelper = new MnemonicHelper();

        // Remove button
        removeButton = new JButton(credentialsList.getRemoveAction());
        removeButton.setMnemonic(mnemonicHelper.getMnemonic(removeButton));

        buttonsPanel.add(removeButton);

        // Go to button
        goToButton = new JButton(Translator.get("go_to"));
        goToButton.setMnemonic(mnemonicHelper.getMnemonic(goToButton));
        goToButton.addActionListener(this);

        buttonsPanel.add(goToButton);

        // Button that closes the window
        closeButton = new JButton(Translator.get("close"));
        closeButton.setMnemonic(mnemonicHelper.getMnemonic(closeButton));
        closeButton.addActionListener(this);

        buttonsPanel.add(Box.createHorizontalGlue());
        buttonsPanel.add(closeButton);

        yPanel.add(buttonsPanel);

        contentPane.add(yPanel, BorderLayout.SOUTH);
View Full Code Here

Examples of com.mucommander.ui.layout.XBoxPanel

        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, 
      "10 " + Translator.get("unit.mb"),
      "100 " + Translator.get("unit.mb"),
      "250 " + Translator.get("unit.mb"),
      "650 " + Translator.get("unit.mb"),
      "700 " + Translator.get("unit.mb")
    };
    edtSize = new JTextField();
    EditableComboBox cbSize = new EditableComboBox(edtSize, sizes);
    cbSize.setComboSelectionUpdatesTextField(true);
    cbSize.setSelectedIndex(1);
    edtSize.addKeyListener(new KeyAdapter() {
      @Override
            public void keyReleased(KeyEvent e) {
        updatePartsNumber();
      }
    });
    cbSize.addComboBoxListener(new ComboBoxListener() {     
      public void comboBoxSelectionChanged(SaneComboBox source) {
        updatePartsNumber();       
      }
    });
    pnlSize.add(cbSize);
    pnlSize.addSpace(10);
    pnlSize.add(new JLabel(Translator.get("split_file_dialog.parts") + ":"));
    pnlSize.addSpace(5);
    spnParts = new JSpinner(new SpinnerNumberModel(1, 1,
                file.getSize(), 1));
    spnParts.addChangeListener(new ChangeListener() {     
      public void stateChanged(ChangeEvent e) {
        if (!edtChange) {
          long parts = ((Number)spnParts.getValue()).longValue();
          long newsize = file.getSize() / parts;
          if (file.getSize() % parts != 0) {
            newsize++;
          }
          if (getBytes() != newsize) {
            edtSize.setText(Long.toString(newsize));
          }
        }
      }
    });  
    pnlSize.add(spnParts);
        pnlMain.addRow(Translator.get("split_file_dialog.part_size") + ":", pnlSize, 0);
       
    cbGenerateCRC = new JCheckBox(Translator.get("split_file_dialog.generate_CRC"));
    cbGenerateCRC.setSelected(true);
    pnlMain.addRow("", cbGenerateCRC, 0);
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.