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