Package com.mucommander.ui.button

Examples of com.mucommander.ui.button.ButtonChoicePanel


    /**
     * Creates a button panel using the given buttons, and register the given listener for button actions.
     * Buttons are disposed horizontally, aligned to the right.
     */
    public static JPanel createButtonPanel(JButton buttons[], JRootPane rootPane, ActionListener actionListener) {
        JPanel panel = new ButtonChoicePanel(buttons, 0, rootPane);
       
        MnemonicHelper mnemonicHelper = new MnemonicHelper();
        for (JButton button : buttons) {
            button.setMnemonic(mnemonicHelper.getMnemonic(button.getText()));
            button.addActionListener(actionListener);
            panel.add(button);
        }

        return panel;
    }
View Full Code Here


            buttons[i] = new JButton(text);
            buttons[i].addActionListener(this);
        }
   
        setInitialFocusComponent(buttons[0]);
        mainPanel.add(new ButtonChoicePanel(buttons, maxNbCols, getRootPane()));
   
        getContentPane().add(mainPanel, BorderLayout.NORTH);
    }
View Full Code Here

        // Creates the name panel.
        panel = new YBoxPanel();
        panel.add(createNamePanel(name));

        // Creates the button panel.
        panel.add(new ButtonChoicePanel(new JButton[] {okButton = new JButton(Translator.get("ok")), cancelButton = new JButton(Translator.get("cancel"))},
                                        2, getRootPane()));
        okButton.addActionListener(this);
        cancelButton.addActionListener(this);
        getContentPane().add(panel, BorderLayout.NORTH);
        pack();
View Full Code Here

        stopButton.addActionListener(this);

//        hideButton = new JButton(Translator.get("progress_dialog.hide"));
//        hideButton.addActionListener(this);

        this.buttonsChoicePanel = new ButtonChoicePanel(
                skipButton==null?new JButton[] {pauseResumeButton, stopButton}:new JButton[] {pauseResumeButton, skipButton, stopButton},
                0, getRootPane());
        contentPane.add(buttonsChoicePanel, BorderLayout.SOUTH);

        // Cancel button receives initial focus
View Full Code Here

TOP

Related Classes of com.mucommander.ui.button.ButtonChoicePanel

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.