net.officefloor.demo.macro
Class InputTextMacro

java.lang.Object
  extended by net.officefloor.demo.macro.InputTextMacro
All Implemented Interfaces:
Macro, MacroSource, MacroTask

public class InputTextMacro
extends Object
implements MacroSource, Macro, MacroTask

Macro to input text.

Author:
Daniel Sagenschneider

Constructor Summary
InputTextMacro()
           
 
Method Summary
 String getConfigurationMemento()
          Obtains the configuration memento to reinitialise a new instance of this Macro.
 String getDisplayLabel()
          Obtains the label for displaying this Macro.
 String getDisplayName()
          Obtains the display name for the Macro.
 String getInputText()
          Obtains the text to input.
 MacroTask[] getMacroTasks()
          Obtains the listing of MacroTask instances.
 long getPostRunWaitTime()
          Obtains the time to wait after executing the MacroTask.
 Point getStartingMouseLocation()
           Obtains the Point where the mouse cursor must be to start this Macro.
 void runMacroTask(MacroTaskContext context)
          Runs this MacroTask.
 void setConfigurationMemento(String memento)
          Initialises this Macro from the configuration memento.
 void sourceMacro(MacroSourceContext context)
          Sources a new Macro.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputTextMacro

public InputTextMacro()
Method Detail

getInputText

public String getInputText()
Obtains the text to input.

Returns:
Text to input.

getDisplayName

public String getDisplayName()
Description copied from interface: MacroSource
Obtains the display name for the Macro.

Specified by:
getDisplayName in interface MacroSource
Returns:
Display name for the Macro.

sourceMacro

public void sourceMacro(MacroSourceContext context)
Description copied from interface: MacroSource
Sources a new Macro.

Specified by:
sourceMacro in interface MacroSource
Parameters:
context - MacroSourceContext.

getConfigurationMemento

public String getConfigurationMemento()
Description copied from interface: Macro
Obtains the configuration memento to reinitialise a new instance of this Macro.

Specified by:
getConfigurationMemento in interface Macro
Returns:
Configuration memento.

setConfigurationMemento

public void setConfigurationMemento(String memento)
Description copied from interface: Macro
Initialises this Macro from the configuration memento.

Specified by:
setConfigurationMemento in interface Macro
Parameters:
memento - Memento containing the configuration.

getDisplayLabel

public String getDisplayLabel()
Description copied from interface: Macro
Obtains the label for displaying this Macro.

Specified by:
getDisplayLabel in interface Macro
Returns:
Label for displaying this Macro. May return null for label based on type.

getStartingMouseLocation

public Point getStartingMouseLocation()
Description copied from interface: Macro

Obtains the Point where the mouse cursor must be to start this Macro.

This allows for visually moving the mouse to this location before running this Macro.

Specified by:
getStartingMouseLocation in interface Macro
Returns:
Point where the mouse cursor must be to start this Macro. null indicates non-mouse Macro (typically keyboard entry).

getMacroTasks

public MacroTask[] getMacroTasks()
Description copied from interface: Macro
Obtains the listing of MacroTask instances.

Specified by:
getMacroTasks in interface Macro
Returns:
Listing of MacroTask instances.

runMacroTask

public void runMacroTask(MacroTaskContext context)
Description copied from interface: MacroTask
Runs this MacroTask.

Specified by:
runMacroTask in interface MacroTask
Parameters:
context - MacroTaskContext.

getPostRunWaitTime

public long getPostRunWaitTime()
Description copied from interface: MacroTask
Obtains the time to wait after executing the MacroTask.

Specified by:
getPostRunWaitTime in interface MacroTask
Returns:
Time to wait after executing the MacroTask.


Copyright © 2005-2011. All Rights Reserved.