Package adams.flow.transformer.draw
Class Oval
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,AntiAliasingDrawOperation,Serializable
public class Oval extends AbstractColorStrokeDrawOperation
Draws an oval with the specified color and dimensions at the given location. The oval can be filled as well.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-color <java.awt.Color> (property: color) The color of the pixel. default: #000000
-stroke-thickness <float> (property: strokeThickness) The thickness of the stroke. default: 1.0 minimum: 0.01
-anti-aliasing-enabled (property: antiAliasingEnabled) If enabled, uses anti-aliasing for drawing.
-x <int> (property: X) The X position of the top-left corner of the oval (1-based). default: 1 minimum: 1
-y <int> (property: Y) The Y position of the top-left corner of the oval (1-based). default: 1 minimum: 1
-width <int> (property: width) The width of the oval. default: 10 minimum: 1
-height <int> (property: height) The height of the oval. default: 10 minimum: 1
-fill (property: fill) If enabled, the oval gets filled with the specified color.
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Fillwhether to fill the oval.protected intm_Heightthe height of the oval.protected intm_Widththe width of the oval.protected intm_Xthe X position of the oval (1-based).protected intm_Ythe Y position of the oval (1-based).-
Fields inherited from class adams.flow.transformer.draw.AbstractColorStrokeDrawOperation
m_AntiAliasingEnabled, m_StrokeThickness
-
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 Oval()
-
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.StringfillTipText()Returns the tip text for this property.booleangetFill()Returns whether to fill the oval.intgetHeight()Returns the height of the oval.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.intgetWidth()Returns the width of the oval.intgetX()Returns the X position of the oval (top-left corner).intgetY()Returns the Y position of the oval (top-left corner).StringglobalInfo()Returns a string describing the object.StringheightTipText()Returns the tip text for this property.voidsetFill(boolean value)Sets whether to fill the oval.voidsetHeight(int value)Sets the height of the oval.voidsetWidth(int value)Sets the width of the oval.voidsetX(int value)Sets the X position of the oval (top-left corner).voidsetY(int value)Sets the Y position of the oval (top-left corner).StringwidthTipText()Returns the tip text for this property.StringXTipText()Returns the tip text for this property.StringYTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.transformer.draw.AbstractColorStrokeDrawOperation
antiAliasingEnabledTipText, getStrokeThickness, isAntiAliasingEnabled, setAntiAliasingEnabled, setStrokeThickness, strokeThicknessTipText
-
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 classAbstractColorStrokeDrawOperation
-
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 position of the oval (top-left corner).- Parameters:
value- the position, 1-based
-
getX
public int getX()
Returns the X position of the oval (top-left corner).- 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 position of the oval (top-left corner).- Parameters:
value- the position, 1-based
-
getY
public int getY()
Returns the Y position of the oval (top-left corner).- 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.
-
setWidth
public void setWidth(int value)
Sets the width of the oval.- Parameters:
value- the width
-
getWidth
public int getWidth()
Returns the width of the oval.- Returns:
- the width
-
widthTipText
public String widthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setHeight
public void setHeight(int value)
Sets the height of the oval.- Parameters:
value- the height
-
getHeight
public int getHeight()
Returns the height of the oval.- Returns:
- the height
-
heightTipText
public String heightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFill
public void setFill(boolean value)
Sets whether to fill the oval.- Parameters:
value- true if to fill
-
getFill
public boolean getFill()
Returns whether to fill the oval.- Returns:
- true if to fill
-
fillTipText
public String fillTipText()
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
-
-