adams.flow.source
Class JAICreateImage

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.core.AbstractActor
              extended by adams.flow.source.AbstractSource
                  extended by adams.flow.source.JAICreateImage
All Implemented Interfaces:
AdditionalInformationHandler, CleanUpHandler, Debuggable, DebugOutputHandler, Destroyable, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractActor>, SizeOfHandler, Stoppable, VariableChangeListener, ErrorHandler, OutputProducer, Serializable, Comparable

public class JAICreateImage
extends AbstractSource

Generates an empty image with the specified dimensions.

Input/output:
- generates:
   adams.data.jai.BufferedImageContainer

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
 
-name <java.lang.String> (property: name)
    The name of the actor.
    default: JAICreateImage
 
-annotation <adams.core.base.BaseText> (property: annotations)
    The annotations to attach to this actor.
    default: 
 
-skip (property: skip)
    If set to true, transformation is skipped and the input token is just forwarded 
    as it is.
 
-stop-flow-on-error (property: stopFlowOnError)
    If set to true, the flow gets stopped in case this actor encounters an error;
     useful for critical actors.
 
-width <int> (property: width)
    The width of the image.
    default: 800
    minimum: 1
 
-height <int> (property: height)
    The height of the image.
    default: 600
    minimum: 1
 
-background <java.awt.Color> (property: background)
    The background color of the image.
    default: #ffffff
 

Version:
$Revision: 5354 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  Color m_Background
          the background color.
protected  int m_Height
          the height of the image.
protected  Token m_OutputToken
          the generated image token.
protected  int m_Width
          the width of the image.
 
Fields inherited from class adams.flow.core.AbstractActor
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
JAICreateImage()
           
 
Method Summary
 String backgroundTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  String doExecute()
          Executes the flow item.
 Class[] generates()
          Returns a string describing the object.
 Color getBackground()
          Returns the background color of the image.
 Color getDefaultBackground()
          Returns the default backrgound color of the image.
 int getDefaultHeight()
          Returns the default height of the image.
 int getDefaultWidth()
          Returns the default width of the image.
 int getHeight()
          Returns the height of the image.
 String getQuickInfo()
          Returns a quick info about the actor, which will be displayed in the GUI.
 int getWidth()
          Returns the width of the image.
 String globalInfo()
           
 boolean hasPendingOutput()
          Checks whether there is pending output to be collected after executing the flow item.
 String heightTipText()
          Returns the tip text for this property.
 Token output()
          Returns the generated token.
 void setBackground(Color value)
          Sets the background color of the image.
 void setHeight(int value)
          Sets the height of the image.
 void setWidth(int value)
          Sets the width of the image.
 String widthTipText()
          Returns the tip text for this property.
 
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, debug, destroy, equals, execute, findVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFullName, getName, getNextSibling, getParent, getPreviousSibling, getRoot, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, postExecute, preExecute, pruneBackup, pruneBackup, reset, restoreState, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged, wrapUp
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Width

protected int m_Width
the width of the image.


m_Height

protected int m_Height
the height of the image.


m_Background

protected Color m_Background
the background color.


m_OutputToken

protected Token m_OutputToken
the generated image token.

Constructor Detail

JAICreateImage

public JAICreateImage()
Method Detail

globalInfo

public String globalInfo()
Specified by:
globalInfo in class AbstractOptionHandler

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractActor

getQuickInfo

public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.

Specified by:
getQuickInfo in interface QuickInfoSupporter
Overrides:
getQuickInfo in class AbstractActor
Returns:
null if no info available, otherwise short string

getDefaultWidth

public int getDefaultWidth()
Returns the default width of the image.

Returns:
the default width

setWidth

public void setWidth(int value)
Sets the width of the image.

Parameters:
value - the width

getWidth

public int getWidth()
Returns the width of the image.

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.

getDefaultHeight

public int getDefaultHeight()
Returns the default height of the image.

Returns:
the default height

setHeight

public void setHeight(int value)
Sets the height of the image.

Parameters:
value - the height

getHeight

public int getHeight()
Returns the height of the image.

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.

getDefaultBackground

public Color getDefaultBackground()
Returns the default backrgound color of the image.

Returns:
the default color

setBackground

public void setBackground(Color value)
Sets the background color of the image.

Parameters:
value - the color

getBackground

public Color getBackground()
Returns the background color of the image.

Returns:
the color

backgroundTipText

public String backgroundTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

generates

public Class[] generates()
Returns a string describing the object.

Returns:
a description suitable for displaying in the gui

doExecute

protected String doExecute()
Executes the flow item.

Specified by:
doExecute in class AbstractActor
Returns:
null if everything is fine, otherwise error message

output

public Token output()
Returns the generated token.

Returns:
the generated token

hasPendingOutput

public boolean hasPendingOutput()
Checks whether there is pending output to be collected after executing the flow item.

Returns:
true if there is pending output


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.