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 boolean
m_Fill
whether to fill the oval.protected int
m_Height
the height of the oval.protected int
m_Width
the width of the oval.protected int
m_X
the X position of the oval (1-based).protected int
m_Y
the 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 String
check(BufferedImageContainer image)
Checks the image.void
defineOptions()
Adds options to the internal list of options.protected String
doDraw(BufferedImageContainer image)
Performs the actual draw operation.String
fillTipText()
Returns the tip text for this property.boolean
getFill()
Returns whether to fill the oval.int
getHeight()
Returns the height of the oval.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.int
getWidth()
Returns the width of the oval.int
getX()
Returns the X position of the oval (top-left corner).int
getY()
Returns the Y position of the oval (top-left corner).String
globalInfo()
Returns a string describing the object.String
heightTipText()
Returns the tip text for this property.void
setFill(boolean value)
Sets whether to fill the oval.void
setHeight(int value)
Sets the height of the oval.void
setWidth(int value)
Sets the width of the oval.void
setX(int value)
Sets the X position of the oval (top-left corner).void
setY(int value)
Sets the Y position of the oval (top-left corner).String
widthTipText()
Returns the tip text for this property.String
XTipText()
Returns the tip text for this property.String
YTipText()
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:
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 classAbstractColorStrokeDrawOperation
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in 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:
check
in 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:
doDraw
in classAbstractDrawOperation
- Parameters:
image
- the image to draw on- Returns:
- null if OK, otherwise error message
-
-