Package adams.flow.transformer.draw
Class FloodFill
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Serializable
public class FloodFill extends AbstractColorDrawOperation
Performs a flood-fill starting at the given position. The position also determines the color to replace.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-color <java.awt.Color> (property: color) The color of the pixel. default: #000000
-x <int> (property: X) The X of the starting position of the flood-fill. default: 1 minimum: 1
-y <int> (property: Y) The Y of the start position of the flood-fill. default: 1 minimum: 1
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_Xthe X position.protected intm_Ythe Y position.-
Fields inherited from class adams.flow.transformer.draw.AbstractColorDrawOperation
m_Color
-
Fields inherited from class adams.flow.transformer.draw.AbstractDrawOperation
m_Owner
-
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 FloodFill()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stringcheck(BufferedImageContainer image)Checks the image.voiddefineOptions()Adds options to the internal list of options.protected StringdoDraw(BufferedImageContainer image)Performs the actual draw operation.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.intgetX()Returns the X of the start position.intgetY()Returns the Y of the start position.StringglobalInfo()Returns a string describing the object.voidsetX(int value)Sets the X of the start position.voidsetY(int value)Sets the Y of the start position.StringXTipText()Returns the tip text for this property.StringYTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.transformer.draw.AbstractColorDrawOperation
colorTipText, getColor, setColor
-
Methods inherited from class adams.flow.transformer.draw.AbstractDrawOperation
draw, getOwner, setOwner
-
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 classAbstractColorDrawOperation
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractDrawOperation- Returns:
- null if no info available, otherwise short string
-
setX
public void setX(int value)
Sets the X of the start position.- Parameters:
value- the position, 1-based
-
getX
public int getX()
Returns the X of the start position.- Returns:
- the position, 1-based
-
XTipText
public String XTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setY
public void setY(int value)
Sets the Y of the start position.- Parameters:
value- the position, 1-based
-
getY
public int getY()
Returns the Y of the start position.- Returns:
- the position, 1-based
-
YTipText
public String YTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
check
protected String check(BufferedImageContainer image)
Checks the image.- Overrides:
checkin classAbstractDrawOperation- Parameters:
image- the image to check- Returns:
- null if OK, otherwise error message
-
doDraw
protected String doDraw(BufferedImageContainer image)
Performs the actual draw operation.- Specified by:
doDrawin classAbstractDrawOperation- Parameters:
image- the image to draw on- Returns:
- null if OK, otherwise error message
-
-