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 intm_Alphathe alpha parameter.protected ColorProviderm_Providerthe 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 StringalphaTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.voidexclude(Color c)"Excludes" the specified colors, i.e., makes it unavailable for future use.intgetAlpha()Returns the colors in use.ColorProvidergetProvider()Returns the base color provider.StringglobalInfo()Returns a string describing the object.Colornext()Returns the next color.StringproviderTipText()Returns the tip text for this property.voidrecycle(Color c)"Recycles" the specified colors, i.e., makes it available for future use.voidresetColors()Resets the colors.voidsetAlpha(int value)Sets the colors to use.voidsetProvider(ColorProvider value)Sets the base color provider to use.-
Methods inherited from class adams.gui.visualization.core.AbstractColorProvider
finishInit, forCommandLine, forName, generate, initialize, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, getDefaultLoggingLevel, getOptionManager, 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
-
-
-
-
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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin 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:
resetColorsin interfaceColorProvider- Overrides:
resetColorsin classAbstractColorProvider
-
recycle
public void recycle(Color c)
"Recycles" the specified colors, i.e., makes it available for future use.- Specified by:
recyclein interfaceColorProvider- Overrides:
recyclein 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:
excludein interfaceColorProvider- Overrides:
excludein classAbstractColorProvider- Parameters:
c- the color to exclude
-
next
public Color next()
Returns the next color.- Specified by:
nextin interfaceColorProvider- Overrides:
nextin classAbstractColorProvider- Returns:
- the next color
-
-