Package adams.gui.visualization.core
Class CustomColorProvider
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<ColorProvider>
,SizeOfHandler
,ColorProvider
,Serializable
public class CustomColorProvider extends AbstractCustomColorProvider
Allows the user to define colors.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-color <java.awt.Color> [-color ...] (property: colors) The colors to use. default:
-darkening (property: allowDarkening) If enabled, colors are re-used in a darker version.
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.visualization.core.AbstractColorProvider
m_AllowDarkening, m_CheckTooDark, m_Colors, m_DefaultColors, m_ExcludedColors, m_FirstIteration, m_Index, m_RecycledColors, MIN_VALUE
-
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 CustomColorProvider()
Default constructors.CustomColorProvider(Color[] colors)
Allows setting the colors immediately.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Color[]
getDefaultColors()
Returns the default colors to use.String
globalInfo()
Returns a string describing the object.protected boolean
isDarkeningEnabled()
Returns whether the allow-darkening option is enabled.-
Methods inherited from class adams.gui.visualization.core.AbstractCustomColorProvider
allowDarkeningTipText, colorsTipText, defineOptions, getAllowDarkening, getColors, setAllowDarkening, setColors
-
Methods inherited from class adams.gui.visualization.core.AbstractColorProvider
exclude, finishInit, forCommandLine, forName, initialize, next, recycle, resetColors, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, getDefaultLoggingLevel, getOptionManager, 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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Constructor Detail
-
CustomColorProvider
public CustomColorProvider()
Default constructors.
-
CustomColorProvider
public CustomColorProvider(Color[] colors)
Allows setting the colors immediately.- Parameters:
colors
- the colors to use
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
getDefaultColors
protected Color[] getDefaultColors()
Returns the default colors to use.- Specified by:
getDefaultColors
in classAbstractCustomColorProvider
- Returns:
- the colors
-
isDarkeningEnabled
protected boolean isDarkeningEnabled()
Returns whether the allow-darkening option is enabled.- Specified by:
isDarkeningEnabled
in classAbstractCustomColorProvider
- Returns:
- true if enabled
-
-