Package adams.gui.goe
Class CronScheduleEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.AbstractPropertyEditorSupport
-
- adams.gui.goe.CronScheduleEditor
-
- All Implemented Interfaces:
HelpProvider,CustomStringRepresentationHandler,InlineEditorSupport,PropertyEditor
public class CronScheduleEditor extends AbstractPropertyEditorSupport implements CustomStringRepresentationHandler, InlineEditorSupport
A PropertyEditor for CronSchedule objects.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
CronSchedule
-
-
Field Summary
Fields Modifier and Type Field Description protected ParameterPanelm_PanelPartsfor the parts of the expression.protected BaseTextFieldm_TextDayOfMonththe text field for the day-of-month.protected BaseTextFieldm_TextDayOfWeekthe text field for the day-of-week.protected BaseTextFieldm_TextHoursthe text field for the hours.protected BaseTextFieldm_TextMinutesthe text field for the minutes.protected BaseTextFieldm_TextMonththe text field for the month.protected BaseTextFieldm_TextSecondsthe text field for the seconds.protected BaseTextFieldm_TextYearthe text field for the year.-
Fields inherited from class adams.gui.goe.AbstractPropertyEditorSupport
APPROVE_OPTION, CANCEL_OPTION, EMPTY, m_ChosenOption, m_CustomEditor, m_WindowAdapter, NULL
-
-
Constructor Summary
Constructors Constructor Description CronScheduleEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JComponentcreateCustomEditor()Gets the custom editor component.ObjectfromCustomStringRepresentation(String str)Returns an object created from the custom string representation.protected StringgetCurrentExpression()Returns the current expression in the GUI.StringgetInlineValue()Returns the current value.StringgetJavaInitializationString()Returns a representation of the current property value as java source.protected voidinitForDisplay()Initializes the display of the value.booleanisInlineEditingAvailable()Checks whether inline editing is available.booleanisInlineValueValid(String value)Checks whether the value id valid.voidpaintValue(Graphics gfx, Rectangle box)Paints a representation of the current Object.voidsetInlineValue(String value)Sets the value to use.StringtoCustomStringRepresentation(Object obj)Returns a custom string representation of the object.-
Methods inherited from class adams.gui.goe.AbstractPropertyEditorSupport
addWindowAdapter, cleanUp, closeDialog, createPopup, createTipText, createWindowAdapter, getChosenOption, getCustomEditor, getHelpDescription, getHelpIcon, getHelpTitle, getHelpURL, getParentDialog, getParentFrame, initialize, isPaintable, resetChosenOption, setValue, supportsCustomEditor
-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getSource, getTags, getValue, removePropertyChangeListener, setAsText, setSource
-
-
-
-
Field Detail
-
m_PanelParts
protected ParameterPanel m_PanelParts
for the parts of the expression.
-
m_TextSeconds
protected BaseTextField m_TextSeconds
the text field for the seconds.
-
m_TextMinutes
protected BaseTextField m_TextMinutes
the text field for the minutes.
-
m_TextHours
protected BaseTextField m_TextHours
the text field for the hours.
-
m_TextDayOfMonth
protected BaseTextField m_TextDayOfMonth
the text field for the day-of-month.
-
m_TextMonth
protected BaseTextField m_TextMonth
the text field for the month.
-
m_TextDayOfWeek
protected BaseTextField m_TextDayOfWeek
the text field for the day-of-week.
-
m_TextYear
protected BaseTextField m_TextYear
the text field for the year.
-
-
Method Detail
-
toCustomStringRepresentation
public String toCustomStringRepresentation(Object obj)
Returns a custom string representation of the object.- Specified by:
toCustomStringRepresentationin interfaceCustomStringRepresentationHandler- Parameters:
obj- the object to turn into a string- Returns:
- the string representation
-
fromCustomStringRepresentation
public Object fromCustomStringRepresentation(String str)
Returns an object created from the custom string representation.- Specified by:
fromCustomStringRepresentationin interfaceCustomStringRepresentationHandler- Parameters:
str- the string to turn into an object- Returns:
- the object
-
getJavaInitializationString
public String getJavaInitializationString()
Returns a representation of the current property value as java source.- Specified by:
getJavaInitializationStringin interfacePropertyEditor- Overrides:
getJavaInitializationStringin classPropertyEditorSupport- Returns:
- a value of type 'String'
-
paintValue
public void paintValue(Graphics gfx, Rectangle box)
Paints a representation of the current Object.- Specified by:
paintValuein interfacePropertyEditor- Overrides:
paintValuein classPropertyEditorSupport- Parameters:
gfx- the graphics context to usebox- the area we are allowed to paint into
-
getCurrentExpression
protected String getCurrentExpression()
Returns the current expression in the GUI.- Returns:
- the expression
-
createCustomEditor
protected JComponent createCustomEditor()
Gets the custom editor component.- Specified by:
createCustomEditorin classAbstractPropertyEditorSupport- Returns:
- the editor
-
isInlineEditingAvailable
public boolean isInlineEditingAvailable()
Checks whether inline editing is available.- Specified by:
isInlineEditingAvailablein interfaceInlineEditorSupport- Returns:
- true if editing available
-
setInlineValue
public void setInlineValue(String value)
Sets the value to use.- Specified by:
setInlineValuein interfaceInlineEditorSupport- Parameters:
value- the value to use
-
getInlineValue
public String getInlineValue()
Returns the current value.- Specified by:
getInlineValuein interfaceInlineEditorSupport- Returns:
- the current value
-
isInlineValueValid
public boolean isInlineValueValid(String value)
Checks whether the value id valid.- Specified by:
isInlineValueValidin interfaceInlineEditorSupport- Parameters:
value- the value to check- Returns:
- true if valid
-
initForDisplay
protected void initForDisplay()
Initializes the display of the value.- Overrides:
initForDisplayin classAbstractPropertyEditorSupport
-
-