From ef4b05dd54bd9de138480fd004c3feb89d053dae Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Tue, 07 Apr 2015 11:06:40 +0000
Subject: [PATCH] OPENDJ-1714 Code cleanup
---
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataOptionsPanel.java | 47 ++++++++++++++++++++++++++---------------------
1 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataOptionsPanel.java b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataOptionsPanel.java
index 33a1041..ac34991 100644
--- a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataOptionsPanel.java
+++ b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataOptionsPanel.java
@@ -151,6 +151,32 @@
GridBagConstraints gbc = new GridBagConstraints();
// Add the server location widgets
+ addBaseDNSection(panel, gbc);
+
+ int h1 = getLabel(FieldName.DATA_OPTIONS).getPreferredSize().height;
+ int h2 = getRadioButton(NewSuffixOptions.Type.CREATE_BASE_ENTRY).getPreferredSize().height;
+ int additionalInset = Math.abs(h2 - h1) / 2;
+ gbc.gridwidth = GridBagConstraints.RELATIVE;
+ gbc.weightx = 0.0;
+ gbc.insets.top = UIFactory.TOP_INSET_PRIMARY_FIELD + additionalInset;
+ gbc.insets.left = 0;
+ gbc.anchor = GridBagConstraints.NORTHWEST;
+ panel.add(getLabel(FieldName.DATA_OPTIONS), gbc);
+
+ gbc.weightx = 1.0;
+ gbc.fill = GridBagConstraints.HORIZONTAL;
+ gbc.insets.top = UIFactory.TOP_INSET_PRIMARY_FIELD;
+ gbc.insets.left = UIFactory.LEFT_INSET_PRIMARY_FIELD;
+ gbc.gridwidth = GridBagConstraints.REMAINDER;
+ panel.add(createRadioButtonPanel(), gbc);
+
+ addVerticalGlue(panel);
+
+ return panel;
+ }
+
+ private void addBaseDNSection(final JPanel panel, final GridBagConstraints gbc)
+ {
gbc.gridwidth = GridBagConstraints.RELATIVE;
gbc.weightx = 0.0;
gbc.insets.top = 0;
@@ -191,27 +217,6 @@
final JLabel noBaseDNLabel = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, INFO_NO_BASE_DN_INLINE_HELP.get(),
UIFactory.TextStyle.INLINE_HELP);
panel.add(noBaseDNLabel, gbc);
-
- int h1 = getLabel(FieldName.DATA_OPTIONS).getPreferredSize().height;
- int h2 = getRadioButton(NewSuffixOptions.Type.CREATE_BASE_ENTRY).getPreferredSize().height;
- int additionalInset = Math.abs(h2 - h1) / 2;
- gbc.gridwidth = GridBagConstraints.RELATIVE;
- gbc.weightx = 0.0;
- gbc.insets.top = UIFactory.TOP_INSET_PRIMARY_FIELD + additionalInset;
- gbc.insets.left = 0;
- gbc.anchor = GridBagConstraints.NORTHWEST;
- panel.add(getLabel(FieldName.DATA_OPTIONS), gbc);
-
- gbc.weightx = 1.0;
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.insets.top = UIFactory.TOP_INSET_PRIMARY_FIELD;
- gbc.insets.left = UIFactory.LEFT_INSET_PRIMARY_FIELD;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- panel.add(createRadioButtonPanel(), gbc);
-
- addVerticalGlue(panel);
-
- return panel;
}
/**
--
Gitblit v1.10.0