From 23faffa02e132a30c02f928e317c6f66ac373d06 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Mon, 23 Apr 2007 00:29:32 +0000
Subject: [PATCH] The commit contains code for the following:
---
opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java | 30 ++++++++++--------------------
1 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java
index 1d0be4c..3482c67 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java
@@ -36,8 +36,6 @@
*/
public abstract class ReviewPanel extends QuickSetupStepPanel {
- private JCheckBox checkBox;
-
/**
* Creates an instance.
* @param application GuiApplication this panel represents
@@ -57,8 +55,8 @@
*/
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();
@@ -70,10 +68,13 @@
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;
}
@@ -83,16 +84,5 @@
* 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();
}
--
Gitblit v1.10.0