Friday, July 8, 2016

[389-commits] src/com

src/com/netscape/admin/dirserv/panel/replication/WAgreementSchedulePanel.java | 39 ++++++----
1 file changed, 26 insertions(+), 13 deletions(-)

New commits:
commit 4d1f2d2a3313051b6ddc964ef7d67362ea9d3be6
Author: Mark Reynolds <mreynolds@redhat.com>
Date: Fri Jul 8 15:32:12 2016 -0400

Ticket 47469 - Cannot enter time in Replication schedule in console

Description: The hour/minute JTextFields incorrectly set the
GridBagConstraints fill set to none, and the gbc weightx
needed to be set.

https://fedorahosted.org/389/ticket/47469

Reviewed by: nhosoi(Thanks!)

diff --git a/src/com/netscape/admin/dirserv/panel/replication/WAgreementSchedulePanel.java b/src/com/netscape/admin/dirserv/panel/replication/WAgreementSchedulePanel.java
index c118bc2..c9d2efd 100644
--- a/src/com/netscape/admin/dirserv/panel/replication/WAgreementSchedulePanel.java
+++ b/src/com/netscape/admin/dirserv/panel/replication/WAgreementSchedulePanel.java
@@ -19,16 +19,29 @@

package com.netscape.admin.dirserv.panel.replication;

-import java.awt.*;
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import java.util.Vector;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.event.*;
+
+import javax.swing.Box;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+
import com.netscape.admin.dirserv.panel.UIFactory;
-import com.netscape.admin.dirserv.wizard.*;
-import com.netscape.management.client.util.ResourceSet;
+import com.netscape.admin.dirserv.wizard.IWizardPanel;
+import com.netscape.admin.dirserv.wizard.WizardInfo;
import com.netscape.management.client.util.Debug;
-import netscape.ldap.*;

/**
* Schedule Panel for Replication Agreement
@@ -177,7 +190,7 @@ public class WAgreementSchedulePanel extends WAgreementPanel
_activeColor = _startHr.getBackground();
ReplicationTool.resetGBC(gbc);
gbc.anchor = gbc.EAST;
- gbc.fill = gbc.NONE;
+ gbc.weightx= 1.0;
timePanel.add(_startHr, gbc);

_startMin = UIFactory.makeJTextField(null,"00",3);
@@ -185,7 +198,7 @@ public class WAgreementSchedulePanel extends WAgreementPanel
_startMin.getDocument().addDocumentListener(this);
ReplicationTool.resetGBC(gbc);
gbc.anchor = gbc.WEST;
- gbc.fill = gbc.NONE;
+ gbc.weightx= 1.0;
timePanel.add(_startMin, gbc);

JLabel and = UIFactory.makeJLabel(_section, "and", _resource);
@@ -199,7 +212,7 @@ public class WAgreementSchedulePanel extends WAgreementPanel
_endHr.getDocument().addDocumentListener(this);
ReplicationTool.resetGBC(gbc);
gbc.anchor = gbc.EAST;
- gbc.fill = gbc.NONE;
+ gbc.weightx= 1.0;
timePanel.add(_endHr, gbc);

_endMin = UIFactory.makeJTextField(null,"00",3);
@@ -207,7 +220,7 @@ public class WAgreementSchedulePanel extends WAgreementPanel
_endMin.getDocument().addDocumentListener(this);
ReplicationTool.resetGBC(gbc);
gbc.anchor = gbc.WEST;
- gbc.fill = gbc.NONE;
+ gbc.weightx= 1.0;
timePanel.add(_endMin, gbc);

gbc.fill = gbc.HORIZONTAL;
@@ -386,8 +399,8 @@ public class WAgreementSchedulePanel extends WAgreementPanel
private void populateData() {
String time = "";
if ((_wizardInfo.getDate() != null) &&
- (( (Vector)_wizardInfo.getDate()).size() >0)) {
- time = (String)((Vector)_wizardInfo.getDate()).firstElement();
+ (_wizardInfo.getDate().size() >0)) {
+ time = (String)_wizardInfo.getDate().firstElement();
}
setSchedule(time);
}

--
389-commits mailing list
389-commits@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org

No comments:

Post a Comment