Package adams.gui.visualization.core
Class TranslucentColorProvider
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.core.AbstractColorProvider
-
- adams.gui.visualization.core.TranslucentColorProvider
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<ColorProvider>
,SizeOfHandler
,ColorProvider
,Serializable
public class TranslucentColorProvider extends AbstractColorProvider
Allows the user to add translucency to the colors generated by the base color provider.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-alpha <int> (property: alpha) The alpha value to use (0=translucent, 255=opaque). default: 255 minimum: 0 maximum: 255
-provider <adams.gui.visualization.core.ColorProvider> (property: provider) The base color provider to use. default: adams.gui.visualization.core.DefaultColorProvider
- Version:
- $Revision: 4584 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Alpha
the alpha parameter.protected ColorProvider
m_Provider
the base color provider.-
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 TranslucentColorProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
alphaTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.void
exclude(Color c)
"Excludes" the specified colors, i.e., makes it unavailable for future use.int
getAlpha()
Returns the colors in use.ColorProvider
getProvider()
Returns the base color provider.String
globalInfo()
Returns a string describing the object.Color
next()
Returns the next color.String
providerTipText()
Returns the tip text for this property.void
recycle(Color c)
"Recycles" the specified colors, i.e., makes it available for future use.void
resetColors()
Resets the colors.void
setAlpha(int value)
Sets the colors to use.void
setProvider(ColorProvider value)
Sets the base color provider to use.-
Methods inherited from class adams.gui.visualization.core.AbstractColorProvider
finishInit, forCommandLine, forName, initialize, 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
-
-
-
-
Field Detail
-
m_Alpha
protected int m_Alpha
the alpha parameter.
-
m_Provider
protected ColorProvider m_Provider
the base color provider.
-
-
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
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setAlpha
public void setAlpha(int value)
Sets the colors to use.- Parameters:
value
- the colors to use
-
getAlpha
public int getAlpha()
Returns the colors in use.- Returns:
- the colors in use
-
alphaTipText
public String alphaTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setProvider
public void setProvider(ColorProvider value)
Sets the base color provider to use.- Parameters:
value
- the colors to use
-
getProvider
public ColorProvider getProvider()
Returns the base color provider.- Returns:
- the provider to use
-
providerTipText
public String providerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
resetColors
public void resetColors()
Resets the colors.- Specified by:
resetColors
in interfaceColorProvider
- Overrides:
resetColors
in classAbstractColorProvider
-
recycle
public void recycle(Color c)
"Recycles" the specified colors, i.e., makes it available for future use.- Specified by:
recycle
in interfaceColorProvider
- Overrides:
recycle
in classAbstractColorProvider
- Parameters:
c
- the color to re-use
-
exclude
public void exclude(Color c)
"Excludes" the specified colors, i.e., makes it unavailable for future use.- Specified by:
exclude
in interfaceColorProvider
- Overrides:
exclude
in classAbstractColorProvider
- Parameters:
c
- the color to exclude
-
next
public Color next()
Returns the next color.- Specified by:
next
in interfaceColorProvider
- Overrides:
next
in classAbstractColorProvider
- Returns:
- the next color
-
-