Package adams.data.imagefilter
Class GrayFilterProvider
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.imagefilter.AbstractImageFilterProvider
-
- adams.data.imagefilter.GrayFilterProvider
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class GrayFilterProvider extends AbstractImageFilterProvider
Generates a javax.swing.GrayFilter image filter.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-brighten-pixels <boolean> (property: brightenPixels) If enabled, the pixels get brightened. default: false
-gray-percentage <int> (property: grayPercentage) The gray percentage: 0 = lightest, 100 = darkest. default: 0 minimum: 0 maximum: 100
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_BrightenPixels
whether to brighten the pixels.protected int
m_GrayPercentage
the gray percentage.-
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 GrayFilterProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
brightenPixelsTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected ImageFilter
doGenerate(BufferedImage img)
Generates the actorImageFilter
instance.boolean
getBrightenPixels()
Returns whether to brighten the pixels.int
getGrayPercentage()
Returns the gray percentage (0 lightest, 100 darkest).String
globalInfo()
Returns a string describing the object.String
grayPercentageTipText()
Returns the tip text for this property.void
setBrightenPixels(boolean value)
Sets whether to brighten the pixels.void
setGrayPercentage(int value)
Sets the gray percentage (0 lightest, 100 darkest).-
Methods inherited from class adams.data.imagefilter.AbstractImageFilterProvider
check, generate, imageToBufferedImage
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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
-
-
-
-
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
-
setBrightenPixels
public void setBrightenPixels(boolean value)
Sets whether to brighten the pixels.- Parameters:
value
- true if to brighten
-
getBrightenPixels
public boolean getBrightenPixels()
Returns whether to brighten the pixels.- Returns:
- true if to brighten
-
brightenPixelsTipText
public String brightenPixelsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setGrayPercentage
public void setGrayPercentage(int value)
Sets the gray percentage (0 lightest, 100 darkest).- Parameters:
value
- the percentage (0-100)
-
getGrayPercentage
public int getGrayPercentage()
Returns the gray percentage (0 lightest, 100 darkest).- Returns:
- the percentage (0-100)
-
grayPercentageTipText
public String grayPercentageTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
doGenerate
protected ImageFilter doGenerate(BufferedImage img)
Generates the actorImageFilter
instance.- Specified by:
doGenerate
in classAbstractImageFilterProvider
- Parameters:
img
- the buffered image to filter- Returns:
- the image filter instance
-
-