From 2937946fbf63ca8efef39e8d84ad5e1c27531977 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 27 Oct 2009 07:48:03 +0000
Subject: [PATCH] Fix for issue 4317 (when scheduling a daily task the time input should be labeled whether it is 24h based or not) Add some inline help labels.
---
opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/TaskToSchedulePanel.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/TaskToSchedulePanel.java b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/TaskToSchedulePanel.java
index d7f6e47..1549b6e 100644
--- a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/TaskToSchedulePanel.java
+++ b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/TaskToSchedulePanel.java
@@ -45,6 +45,7 @@
import javax.swing.DefaultComboBoxModel;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
+import javax.swing.JComponent;
import javax.swing.JEditorPane;
import javax.swing.JLabel;
import javax.swing.JPanel;
@@ -279,10 +280,23 @@
*/
public void toBeDisplayed(boolean visible)
{
- // Reset the schedule
+ // Reset the schedule and the labels
if (visible)
{
schedule = null;
+ setPrimaryValid(lTime);
+ setPrimaryValid(lDay);
+ setPrimaryValid(lMonth);
+ setPrimaryValid(lYear);
+ setPrimaryValid(lWeeklyTime);
+ setPrimaryValid(lWeeklyDays);
+ setPrimaryValid(lMonthlyTime);
+ setPrimaryValid(lMonthlyDays);
+ setPrimaryValid(lCronMinute);
+ setPrimaryValid(lCronHour);
+ setPrimaryValid(lCronMonthDay);
+ setPrimaryValid(lCronMonth);
+ setPrimaryValid(lCronWeekDay);
}
}
@@ -866,7 +880,14 @@
gbc.gridy = 0;
JLabel[] labels = {lTime, lDay, lMonth, lYear};
- Component[] comps = {time, day, month, year};
+ JComponent[] comps = {time, day, month, year};
+ Message[] inlineHelp =
+ {
+ INFO_CTRL_PANEL_TASK_TO_SCHEDULE_TIME_TOOLTIP.get(),
+ null,
+ null,
+ null
+ };
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
@@ -875,6 +896,7 @@
{
gbc.gridx = 0;
gbc.weightx = 0.0;
+ gbc.gridwidth = 1;
panel.add(labels[i], gbc);
gbc.gridx = 1;
@@ -885,6 +907,16 @@
gbc.insets.left = 0;
panel.add(Box.createHorizontalGlue(), gbc);
+ if (inlineHelp[i] != null)
+ {
+ gbc.gridwidth = 2;
+ gbc.insets.top = 3;
+ gbc.insets.left = 10;
+ gbc.gridx = 1;
+ gbc.gridy ++;
+ panel.add(Utilities.createInlineHelpLabel(inlineHelp[i]), gbc);
+ }
+
gbc.insets.top = 10;
gbc.gridy ++;
}
@@ -903,6 +935,7 @@
panel.setOpaque(false);
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
+ gbc.gridy = 0;
gbc.weightx = 0.0;
lDailyTime =
@@ -926,6 +959,14 @@
gbc.fill = GridBagConstraints.HORIZONTAL;
panel.add(Box.createHorizontalGlue(), gbc);
+ gbc.gridy ++;
+ gbc.gridwidth = 2;
+ gbc.insets.top = 3;
+ gbc.insets.left = 10;
+ gbc.gridx = 1;
+ panel.add(Utilities.createInlineHelpLabel(
+ INFO_CTRL_PANEL_TASK_TO_SCHEDULE_TIME_TOOLTIP.get()), gbc);
+
return panel;
}
@@ -969,6 +1010,13 @@
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
panel.add(Box.createHorizontalGlue(), gbc);
+ gbc.gridy ++;
+ gbc.gridwidth = weekDays.length + 1;
+ gbc.insets.top = 3;
+ gbc.insets.left = 10;
+ gbc.gridx = 1;
+ panel.add(Utilities.createInlineHelpLabel(
+ INFO_CTRL_PANEL_TASK_TO_SCHEDULE_TIME_TOOLTIP.get()), gbc);
gbc.gridx = 0;
gbc.gridy ++;
@@ -1025,6 +1073,13 @@
gbc.gridwidth = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
panel.add(Box.createHorizontalGlue(), gbc);
+ gbc.gridy ++;
+ gbc.gridwidth = 8;
+ gbc.insets.top = 3;
+ gbc.insets.left = 10;
+ gbc.gridx = 1;
+ panel.add(Utilities.createInlineHelpLabel(
+ INFO_CTRL_PANEL_TASK_TO_SCHEDULE_TIME_TOOLTIP.get()), gbc);
gbc.gridx = 0;
gbc.gridy ++;
--
Gitblit v1.10.0