Package adams.gui.goe
Class BaseDateEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.AbstractPropertyEditorSupport
-
- adams.gui.goe.AbstractBaseDateTypeEditor<BaseDate,DatePanel>
-
- adams.gui.goe.BaseDateEditor
-
- All Implemented Interfaces:
HelpProvider
,CustomStringRepresentationHandler
,InlineEditorSupport
,MultiSelectionEditor
,PropertyEditor
public class BaseDateEditor extends AbstractBaseDateTypeEditor<BaseDate,DatePanel>
A PropertyEditor for BaseDate objects.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
BaseDate
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.gui.goe.AbstractBaseDateTypeEditor
AbstractBaseDateTypeEditor.Placeholder
-
-
Field Summary
-
Fields inherited from class adams.gui.goe.AbstractBaseDateTypeEditor
m_ButtonCustomHelp, m_ButtonNow, m_ButtonOK, m_ButtonTemplates, m_Calendar, m_ComboBoxPlaceholders, m_Date, m_TextCustom
-
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 BaseDateEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getNowButtonText()
Returns the text to use for the "now" button.protected String
getPlaceholder(AbstractBaseDateTypeEditor.Placeholder ph)
Returns the string equivalent of the placeholder.protected BaseDate
newDateType(String s)
Returns a new instance of the date type.protected BaseDate
newDateType(Date d)
Returns a new instance of the date type.protected DatePanel
newPanel()
Instantiates a new panel for picking the date type.-
Methods inherited from class adams.gui.goe.AbstractBaseDateTypeEditor
createCustomEditor, fromCustomStringRepresentation, getInlineValue, getJavaInitializationString, getSelectedObjects, initForDisplay, initialize, isInlineEditingAvailable, isInlineValueValid, newDateType, paintValue, setInlineValue, showHelp, toCustomStringRepresentation, updateButtons
-
Methods inherited from class adams.gui.goe.AbstractPropertyEditorSupport
addWindowAdapter, cleanUp, closeDialog, createPopup, createTipText, createWindowAdapter, getChosenOption, getCustomEditor, getHelpDescription, getHelpIcon, getHelpTitle, getHelpURL, getParentDialog, getParentFrame, isPaintable, resetChosenOption, setValue, supportsCustomEditor
-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getSource, getTags, getValue, removePropertyChangeListener, setAsText, setSource
-
-
-
-
Method Detail
-
newDateType
protected BaseDate newDateType(String s)
Returns a new instance of the date type.- Specified by:
newDateType
in classAbstractBaseDateTypeEditor<BaseDate,DatePanel>
- Parameters:
s
- the string to instantiate with, can be null- Returns:
- the instance
-
newDateType
protected BaseDate newDateType(Date d)
Returns a new instance of the date type.- Specified by:
newDateType
in classAbstractBaseDateTypeEditor<BaseDate,DatePanel>
- Parameters:
d
- the date to initialize with- Returns:
- the instance
-
newPanel
protected DatePanel newPanel()
Instantiates a new panel for picking the date type.- Specified by:
newPanel
in classAbstractBaseDateTypeEditor<BaseDate,DatePanel>
- Returns:
- the panel
-
getNowButtonText
protected String getNowButtonText()
Returns the text to use for the "now" button.- Specified by:
getNowButtonText
in classAbstractBaseDateTypeEditor<BaseDate,DatePanel>
- Returns:
- the button text
-
getPlaceholder
protected String getPlaceholder(AbstractBaseDateTypeEditor.Placeholder ph)
Returns the string equivalent of the placeholder.- Specified by:
getPlaceholder
in classAbstractBaseDateTypeEditor<BaseDate,DatePanel>
- Parameters:
ph
- the placeholder to get the string representation for- Returns:
- the string representation
-
-