Class AbstractAnnotationColors
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.object.objectannotations.colors.AbstractAnnotationColors
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,AnnotationColors,Serializable
- Direct Known Subclasses:
FixedColor,PerType,TypeColorMapping,VaryByObject
public abstract class AbstractAnnotationColors extends AbstractOptionHandler implements AnnotationColors
Ancestor for annotation colorizers.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Enabledwhether the colorization is enabled.-
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 AbstractAnnotationColors()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stringcheck(LocatedObjects objects)Hook method for checks.voiddefineOptions()Adds options to the internal list of options.protected abstract ColordoGetColor(LocatedObject object)Returns the color for the object.protected abstract voiddoInitColors(LocatedObjects objects, MessageCollection errors)Initializes the colors with the annotations.StringenabledTipText()Returns the tip text for this property.protected StringgenerateQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.ColorgetColor(LocatedObject object)Returns the color for the object.booleangetEnabled()Returns whether the data cleaner is enabled.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.voidinitColors(LocatedObjects objects, MessageCollection errors)Initializes the colors with the annotations.voidsetEnabled(boolean value)Sets whether the data cleaner is enabled.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setEnabled
public void setEnabled(boolean value)
Sets whether the data cleaner is enabled.- Parameters:
value- true if enabled
-
getEnabled
public boolean getEnabled()
Returns whether the data cleaner is enabled.- Returns:
- true if enabled
-
enabledTipText
public String enabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
generateQuickInfo
protected String generateQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Returns:
- null if no info available, otherwise short string
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Returns:
- null if no info available, otherwise short string
-
check
protected String check(LocatedObjects objects)
Hook method for checks.- Parameters:
objects- the annotations to check- Returns:
- null if checks passed, otherwise error message
-
doInitColors
protected abstract void doInitColors(LocatedObjects objects, MessageCollection errors)
Initializes the colors with the annotations.- Parameters:
objects- the annotations to use for initializationerrors- for collecting errors
-
initColors
public void initColors(LocatedObjects objects, MessageCollection errors)
Initializes the colors with the annotations.- Specified by:
initColorsin interfaceAnnotationColors- Parameters:
objects- the annotations to use for initializationerrors- for collecting errors
-
doGetColor
protected abstract Color doGetColor(LocatedObject object)
Returns the color for the object.- Parameters:
object- the annotation to get the color for
-
getColor
public Color getColor(LocatedObject object)
Returns the color for the object.- Specified by:
getColorin interfaceAnnotationColors- Parameters:
object- the annotation to get the color for
-
-