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