Package adams.flow.transformer.draw
Class Image
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class Image extends AbstractDrawOperation
Draws the image obtained from a callable actor at the specified location.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING min-user-mode: Expert
-x <int> (property: X) The X position of the top-left corner of the image (1-based). default: 1 minimum: 1
-y <int> (property: Y) The Y position of the top-left corner of the image (1-based). default: 1 minimum: 1
-image-actor <adams.flow.core.CallableActorReference> (property: imageActor) The callable actor to use for obtaining the image from. default:
-alpha <int> (property: alpha) The alpha value to use for the overlay: 0=transparent, 255=opaque. default: 255 minimum: 0 maximum: 255
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Alpha
the alpha value to use for the overlay (0: transparent, 255: opaque).protected CallableActorReference
m_ImageActor
the callable actor to get the image from.protected int
m_X
the X position of the image (1-based).protected int
m_Y
the Y position of the image (1-based).-
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 Image()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
alphaTipText()
Returns the tip text for this property.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.int
getAlpha()
Returns the alpha value to use for the overlay: 0=transparent, 255=opaque.CallableActorReference
getImageActor()
Returns the callable actor to obtain the image from.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.int
getX()
Returns the X position of the image (top-left corner).int
getY()
Returns the Y position of the image (top-left corner).String
globalInfo()
Returns a string describing the object.String
imageActorTipText()
Returns the tip text for this property.void
setAlpha(int value)
Sets the alpha value to use for the overlay: 0=transparent, 255=opaque.void
setImageActor(CallableActorReference value)
Sets the callable actor to obtain the image from.void
setX(int value)
Sets the X position of the image (top-left corner).void
setY(int value)
Sets the Y position of the image (top-left corner).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.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
-
-
-
-
Field Detail
-
m_X
protected int m_X
the X position of the image (1-based).
-
m_Y
protected int m_Y
the Y position of the image (1-based).
-
m_ImageActor
protected CallableActorReference m_ImageActor
the callable actor to get the image from.
-
m_Alpha
protected int m_Alpha
the alpha value to use for the overlay (0: transparent, 255: opaque).
-
-
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
-
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 image (top-left corner).- Parameters:
value
- the position, 1-based
-
getX
public int getX()
Returns the X position of the image (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 image (top-left corner).- Parameters:
value
- the position, 1-based
-
getY
public int getY()
Returns the Y position of the image (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.
-
setImageActor
public void setImageActor(CallableActorReference value)
Sets the callable actor to obtain the image from.- Parameters:
value
- the actor reference
-
getImageActor
public CallableActorReference getImageActor()
Returns the callable actor to obtain the image from.- Returns:
- the actor reference
-
imageActorTipText
public String imageActorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAlpha
public void setAlpha(int value)
Sets the alpha value to use for the overlay: 0=transparent, 255=opaque.- Parameters:
value
- the alphae value
-
getAlpha
public int getAlpha()
Returns the alpha value to use for the overlay: 0=transparent, 255=opaque.- Returns:
- the alpha value
-
alphaTipText
public String alphaTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
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
-
-