Class AbstractArrayValueDefinition
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.source.valuedefinition.AbstractValueDefinition
-
- adams.flow.source.valuedefinition.AbstractArrayValueDefinition
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,FlowContextHandler
,Serializable
- Direct Known Subclasses:
ArrayValueDefinition
public abstract class AbstractArrayValueDefinition extends AbstractValueDefinition
Ancestor for array-based value definitions.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseClassname
m_ArrayClass
the array class.protected BaseString[]
m_DefaultObjects
the default values.-
Fields inherited from class adams.flow.source.valuedefinition.AbstractValueDefinition
m_Display, m_Enabled, m_FlowContext, m_Help, m_Name
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractArrayValueDefinition()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
addToPanel(PropertiesParameterPanel panel)
Adds the value to the panel.String
arrayClassTipText()
Returns the tip text for this property.String
defaultObjectsTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.BaseClassname
getArrayClass()
Returns the array class that all other classes are derived from.protected abstract BaseClassname
getDefaultArrayClass()
Returns the default array class.protected abstract BaseString[]
getDefaultDefaultObjects()
Returns the default objects.BaseString[]
getDefaultObjects()
Returns the default objects.String
getDefaultValueAsString()
Returns the default of the value as string.PropertiesParameterPanel.PropertyType
getType()
Returns the type of the value.String
headlessInteraction()
Prompts the user to enter a value in headless mode and returns it.protected abstract AbstractChooserPanel
newChooserPanel()
Instantiates the new chooser panel.protected boolean
requiresFlowContext()
Returns whether flow context is required.void
setArrayClass(BaseClassname value)
Sets the array class that all other classes are derived from.void
setDefaultObjects(BaseString[] value)
Sets the default objects.void
setDefaultValueAsString(String value)
Sets the default value as string.-
Methods inherited from class adams.flow.source.valuedefinition.AbstractValueDefinition
canBeRestored, check, displayTipText, enabledTipText, getDisplay, getEnabled, getFlowContext, getHelp, getName, helpTipText, nameTipText, setDisplay, setEnabled, setFlowContext, setHelp, setName
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_ArrayClass
protected BaseClassname m_ArrayClass
the array class.
-
m_DefaultObjects
protected BaseString[] m_DefaultObjects
the default values.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractValueDefinition
-
getDefaultArrayClass
protected abstract BaseClassname getDefaultArrayClass()
Returns the default array class.- Returns:
- the default
-
setArrayClass
public void setArrayClass(BaseClassname value)
Sets the array class that all other classes are derived from.- Parameters:
value
- the class
-
getArrayClass
public BaseClassname getArrayClass()
Returns the array class that all other classes are derived from.- Returns:
- the class
-
arrayClassTipText
public String arrayClassTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultDefaultObjects
protected abstract BaseString[] getDefaultDefaultObjects()
Returns the default objects.- Returns:
- the default
-
setDefaultObjects
public void setDefaultObjects(BaseString[] value)
Sets the default objects.- Parameters:
value
- the objects
-
getDefaultObjects
public BaseString[] getDefaultObjects()
Returns the default objects.- Returns:
- the objects
-
defaultObjectsTipText
public String defaultObjectsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getType
public PropertiesParameterPanel.PropertyType getType()
Returns the type of the value.- Specified by:
getType
in classAbstractValueDefinition
- Returns:
- the type
-
setDefaultValueAsString
public void setDefaultValueAsString(String value)
Sets the default value as string.- Specified by:
setDefaultValueAsString
in classAbstractValueDefinition
- Parameters:
value
- the default value
-
getDefaultValueAsString
public String getDefaultValueAsString()
Returns the default of the value as string.- Specified by:
getDefaultValueAsString
in classAbstractValueDefinition
- Returns:
- the default
-
newChooserPanel
protected abstract AbstractChooserPanel newChooserPanel() throws Exception
Instantiates the new chooser panel.- Returns:
- the panel
- Throws:
Exception
- if instantiation of panel fails
-
requiresFlowContext
protected boolean requiresFlowContext()
Returns whether flow context is required.- Specified by:
requiresFlowContext
in classAbstractValueDefinition
- Returns:
- true if required
-
addToPanel
public boolean addToPanel(PropertiesParameterPanel panel)
Adds the value to the panel.- Specified by:
addToPanel
in classAbstractValueDefinition
- Parameters:
panel
- the panel to add to- Returns:
- true if successfully added
-
headlessInteraction
public String headlessInteraction()
Prompts the user to enter a value in headless mode and returns it.- Specified by:
headlessInteraction
in classAbstractValueDefinition
- Returns:
- the entered value, null if canceled
-
-