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 intm_Alphathe alpha value to use for the overlay (0: transparent, 255: opaque).protected CallableActorReferencem_ImageActorthe callable actor to get the image from.protected intm_Xthe X position of the image (1-based).protected intm_Ythe 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 StringalphaTipText()Returns the tip text for this property.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.intgetAlpha()Returns the alpha value to use for the overlay: 0=transparent, 255=opaque.CallableActorReferencegetImageActor()Returns the callable actor to obtain the image from.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.intgetX()Returns the X position of the image (top-left corner).intgetY()Returns the Y position of the image (top-left corner).StringglobalInfo()Returns a string describing the object.StringimageActorTipText()Returns the tip text for this property.voidsetAlpha(int value)Sets the alpha value to use for the overlay: 0=transparent, 255=opaque.voidsetImageActor(CallableActorReference value)Sets the callable actor to obtain the image from.voidsetX(int value)Sets the X position of the image (top-left corner).voidsetY(int value)Sets the Y position of the image (top-left corner).StringXTipText()Returns the tip text for this property.StringYTipText()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:
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
-
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 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 alpha 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:
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
-
-