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