1 | protected JPanel createButtonPanel() {↵ | | 1 | protected JPanel createButtonPanel() {↵
|
2 | JPanel bottom = new JPanel();↵ | | 2 | JPanel bottom = new JPanel();↵
|
3 | bottom.setLayout(new BorderLayout());↵ | | 3 | bottom.setLayout(new BorderLayout());↵
|
|
4 | bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12↵ | | 4 | // bottom.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));↵
|
| | | 5 | // bottom.setLayout( new BoxLayout( bottom, BoxLayout.X_AXIS ) );↵
|
5 | ));↵ | | 6 | // bottom.add( Box.createHorizontalStrut());↵
|
|
6 | ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(↵ | | 7 | ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(↵
|
7 | MailResourceLoader.getString("global", "cancel"));↵ | | 8 | MailResourceLoader.getString("global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$↵
|
|
8 | //$NON-NLS-1$ //$NON-NLS-2$↵ | | 9 | //$NON-NLS-1$ //$NON-NLS-2$↵
|
9 | cancelButton.addActionListener(this);↵ | | 10 | cancelButton.addActionListener(this);↵
|
10 | cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$↵ | | 11 | cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$↵
|
|
11 | ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader↵ | | 12 | ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader↵
|
12 | .getString("global", "ok"));↵ | | 13 | .getString("global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$↵
|
|
13 | //$NON-NLS-1$ //$NON-NLS-2$↵ | | 14 | //$NON-NLS-1$ //$NON-NLS-2$↵
|
14 | okButton.addActionListener(this);↵ | | 15 | okButton.addActionListener(this);↵
|
15 | okButton.setActionCommand("OK"); //$NON-NLS-1$↵ | | 16 | okButton.setActionCommand("OK"); //$NON-NLS-1$↵
|
16 | okButton.setDefaultCapable(true);↵ | | 17 | okButton.setDefaultCapable(true);↵
|
17 | getRootPane().setDefaultButton(okButton);↵ | | 18 | getRootPane().setDefaultButton(okButton);↵
|
|
18 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(↵ | | 19 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(↵
|
19 | MailResourceLoader.getString("global", "help"));↵ | | 20 | MailResourceLoader.getString("global", "help")); //$NON-NLS-1$ //$NON-NLS-2$↵
|
|
20 | // associate with JavaHelp↵ | | 21 | // associate with JavaHelp↵
|
21 | HelpManager.getInstance().enableHelpOnButton(helpButton,↵ | | 22 | HelpManager.getInstance().enableHelpOnButton(helpButton,↵
|
22 | "configuring_columba");↵ | | 23 | "folder_options");↵
|
23 | HelpManager.getInstance()↵ | | 24 | HelpManager.getInstance()↵
|
24 | .enableHelpKey(getRootPane(),↵ | | 25 | .enableHelpKey(getRootPane(),↵
|
25 | "configuring_columba");↵ | | 26 | "folder_options");↵
|
|
26 | JPanel buttonPanel = new JPanel();↵ | | 27 | JPanel buttonPanel = new JPanel();↵
|
27 | ↵ | | 28 | buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));↵
|
28 | buttonPanel.setLayout(new GridLayout(1, 3, 6, 0));↵ | | 29 | buttonPanel.setLayout(new GridLayout(1, 3, 6, 0));↵
|
29 | buttonPanel.add(okButton);↵ | | 30 | buttonPanel.add(okButton);↵
|
30 | buttonPanel.add(cancelButton);↵ | | 31 | buttonPanel.add(cancelButton);↵
|
31 | buttonPanel.add(helpButton);↵ | | 32 | buttonPanel.add(helpButton);↵
|
|
| | | 33 | // bottom.add( Box.createHorizontalGlue() );↵
|
32 | bottom.add(buttonPanel, BorderLayout.EAST);↵ | | 34 | bottom.add(buttonPanel, BorderLayout.EAST);↵
|
|
33 | return bottom;↵ | | 35 | return bottom;↵
|
34 | | | 36 |
|