| | |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014-2016 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | |
| | | import javax.swing.JTextField; |
| | | import javax.swing.text.PlainDocument; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.guitools.controlpanel.datamodel.CategorizedComboBoxElement; |
| | | import org.opends.guitools.controlpanel.datamodel.ScheduleType; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.ui.components. |
| | | NumericLimitedSizeDocumentFilter; |
| | | import org.opends.guitools.controlpanel.ui.components.NumericLimitedSizeDocumentFilter; |
| | | import org.opends.guitools.controlpanel.ui.components.TimeDocumentFilter; |
| | | import org.opends.guitools.controlpanel.ui.renderer. |
| | | NoLeftInsetCategoryComboBoxRenderer; |
| | | import org.opends.guitools.controlpanel.ui.renderer.NoLeftInsetCategoryComboBoxRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.backends.task.RecurringTask; |
| | | |
| | | /** The panel that allows the user to specify when a task will be launched. */ |
| | |
| | | { |
| | | private static final long serialVersionUID = 6855081932432566784L; |
| | | |
| | | private String taskName; |
| | | private final String taskName; |
| | | |
| | | private JComboBox scheduleType; |
| | | |
| | | private JTextField time; |
| | | private JTextField day; |
| | | private JComboBox month; |
| | | private JComboBox year; |
| | | private JComboBox<String> month; |
| | | private JComboBox<String> year; |
| | | |
| | | private JLabel lTime; |
| | | private JLabel lDay; |
| | |
| | | private JLabel lWeeklyTime; |
| | | private JLabel lWeeklyDays; |
| | | private JTextField weeklyTime; |
| | | private JCheckBox sunday, monday, tuesday, wednesday, thursday, friday, |
| | | saturday; |
| | | private final JCheckBox sunday, monday, tuesday, wednesday, thursday, friday, saturday; |
| | | { |
| | | sunday = |
| | | Utilities.createCheckBox(INFO_CTRL_PANEL_TASK_TO_SCHEDULE_SUNDAY.get()); |
| | |
| | | Utilities.createCheckBox(INFO_CTRL_PANEL_TASK_TO_SCHEDULE_SATURDAY.get()); |
| | | } |
| | | |
| | | JCheckBox[] weekDays = |
| | | private final JCheckBox[] weekDays = |
| | | { |
| | | sunday, monday, tuesday, wednesday, thursday, friday, saturday |
| | | }; |
| | |
| | | private JLabel lMonthlyTime; |
| | | private JLabel lMonthlyDays; |
| | | private JTextField monthlyTime; |
| | | private JCheckBox[] monthDays = new JCheckBox[31]; |
| | | private final JCheckBox[] monthDays = new JCheckBox[31]; |
| | | |
| | | private JLabel lCronMinute; |
| | | private JLabel lCronHour; |
| | |
| | | private Component monthlyPanel; |
| | | private Component cronPanel; |
| | | |
| | | private LocalizableMessage LAUNCH_NOW = INFO_CTRL_PANEL_LAUNCH_NOW.get(); |
| | | private LocalizableMessage LAUNCH_LATER = INFO_CTRL_PANEL_LAUNCH_LATER.get(); |
| | | private LocalizableMessage LAUNCH_DAILY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_DAILY.get(); |
| | | private LocalizableMessage LAUNCH_WEEKLY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_WEEKLY.get(); |
| | | private LocalizableMessage LAUNCH_MONTHLY = |
| | | private final LocalizableMessage LAUNCH_NOW = INFO_CTRL_PANEL_LAUNCH_NOW.get(); |
| | | private final LocalizableMessage LAUNCH_LATER = INFO_CTRL_PANEL_LAUNCH_LATER.get(); |
| | | private final LocalizableMessage LAUNCH_DAILY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_DAILY.get(); |
| | | private final LocalizableMessage LAUNCH_WEEKLY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_WEEKLY.get(); |
| | | private final LocalizableMessage LAUNCH_MONTHLY = |
| | | INFO_CTRL_PANEL_TASK_TO_SCHEDULE_MONTHLY.get(); |
| | | private LocalizableMessage CRON = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_CRON.get(); |
| | | private final LocalizableMessage CRON = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_CRON.get(); |
| | | |
| | | private ScheduleType schedule; |
| | | |
| | |
| | | @Override |
| | | public void configurationChanged(ConfigurationChangeEvent ev) |
| | | { |
| | | // no-op |
| | | } |
| | | |
| | | @Override |
| | |
| | | {currentYear, currentYear + 5} |
| | | }; |
| | | |
| | | JComboBox[] numericBoxes = |
| | | { |
| | | year |
| | | }; |
| | | JComboBox[] numericBoxes = { year }; |
| | | |
| | | int[] currentValues = |
| | | { |
| | |
| | | int min = maxMin[i][0]; |
| | | int max = maxMin[i][1]; |
| | | |
| | | DefaultComboBoxModel model = new DefaultComboBoxModel(); |
| | | DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>(); |
| | | |
| | | int selectedIndex = 0; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | DefaultComboBoxModel model = new DefaultComboBoxModel(); |
| | | DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>(); |
| | | month.setModel(model); |
| | | |
| | | LocalizableMessage[] monthMessages = |