| | |
| | | */ |
| | | public abstract class ReviewPanel extends QuickSetupStepPanel { |
| | | |
| | | private JCheckBox checkBox; |
| | | |
| | | /** |
| | | * Creates an instance. |
| | | * @param application GuiApplication this panel represents |
| | |
| | | */ |
| | | final protected Component createInputPanel() |
| | | { |
| | | JPanel panel = new JPanel(new GridBagLayout()); |
| | | panel.setOpaque(false); |
| | | JPanel panel = UIFactory.makeJPanel(); |
| | | panel.setLayout(new GridBagLayout()); |
| | | |
| | | GridBagConstraints gbc = new GridBagConstraints(); |
| | | |
| | |
| | | |
| | | addVerticalGlue(panel); |
| | | |
| | | gbc.insets.top = UIFactory.TOP_INSET_PRIMARY_FIELD; |
| | | gbc.weighty = 0.0; |
| | | gbc.fill = GridBagConstraints.HORIZONTAL; |
| | | panel.add(getCheckBox(), gbc); |
| | | JCheckBox chk = getCheckBox(); |
| | | if (chk != null) { |
| | | gbc.insets.top = UIFactory.TOP_INSET_PRIMARY_FIELD; |
| | | gbc.weighty = 0.0; |
| | | gbc.fill = GridBagConstraints.HORIZONTAL; |
| | | panel.add(chk, gbc); |
| | | } |
| | | |
| | | return panel; |
| | | } |
| | |
| | | * If it does not exist creates the start server check box. |
| | | * @return the start server check box. |
| | | */ |
| | | protected JCheckBox getCheckBox() |
| | | { |
| | | if (checkBox == null) |
| | | { |
| | | checkBox = |
| | | UIFactory.makeJCheckBox(getMsg("start-server-label"), |
| | | getMsg("start-server-tooltip"), UIFactory.TextStyle.CHECKBOX); |
| | | checkBox.setOpaque(false); |
| | | checkBox.setSelected(getApplication().getUserData().getStartServer()); |
| | | } |
| | | return checkBox; |
| | | } |
| | | protected abstract JCheckBox getCheckBox(); |
| | | } |