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