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 booleanm_BrightenPixelswhether to brighten the pixels.protected intm_GrayPercentagethe 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 StringbrightenPixelsTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected ImageFilterdoGenerate(BufferedImage img)Generates the actorImageFilterinstance.booleangetBrightenPixels()Returns whether to brighten the pixels.intgetGrayPercentage()Returns the gray percentage (0 lightest, 100 darkest).StringglobalInfo()Returns a string describing the object.StringgrayPercentageTipText()Returns the tip text for this property.voidsetBrightenPixels(boolean value)Sets whether to brighten the pixels.voidsetGrayPercentage(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:
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
-
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 actorImageFilterinstance.- Specified by:
doGeneratein classAbstractImageFilterProvider- Parameters:
img- the buffered image to filter- Returns:
- the image filter instance
-
-