net.officefloor.demo.macro
Class WaitMacro

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

public class WaitMacro
extends java.lang.Object
implements Macro, MacroTask

Allows Thread to wait (block) until this Macro is complete.

This is typically used as last Macro to run for testing to coordinate running and validating output.

Author:
Daniel Sagenschneider

Constructor Summary
WaitMacro()
           
 
Method Summary
 java.lang.String getConfigurationMemento()
          Obtains the configuration memento to reinitialise a new instance of this Macro.
 java.lang.String getDisplayLabel()
          Obtains the label for displaying this Macro.
 MacroTask[] getMacroTasks()
          Obtains the listing of MacroTask instances.
 long getPostRunWaitTime()
          Obtains the time to wait after executing the MacroTask.
 java.awt.Point getStartingMouseLocation()
           Obtains the Point where the mouse cursor must be to start this Macro.
 void runMacroTask(MacroTaskContext context)
          Runs this MacroTask.
 void setConfigurationMemento(java.lang.String memento)
          Initialises this Macro from the configuration memento.
 void waitUntilRun()
          Blocks the invoking Thread until this Macro is run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaitMacro

public WaitMacro()
Method Detail

waitUntilRun

public void waitUntilRun()
Blocks the invoking Thread until this Macro is run.


getConfigurationMemento

public java.lang.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(java.lang.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 java.lang.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 java.awt.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-2012. All Rights Reserved.