net.officefloor.demo.macro
Class DragMacro

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

public class DragMacro
extends java.lang.Object
implements MacroSource, Macro

Macro to drag content.

Author:
Daniel Sagenschneider

Constructor Summary
DragMacro()
           
 
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.
 java.lang.String getDisplayName()
          Obtains the display name for the Macro.
 MacroTask[] getMacroTasks()
          Obtains the listing of MacroTask instances.
 java.awt.Point getStartingMouseLocation()
           Obtains the Point where the mouse cursor must be to start this Macro.
 java.awt.Point getTargetLocation()
          Obtains the target location.
 void setConfigurationMemento(java.lang.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

DragMacro

public DragMacro()
Method Detail

getTargetLocation

public java.awt.Point getTargetLocation()
Obtains the target location.

Returns:
Target location.

getDisplayName

public java.lang.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 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.


Copyright © 2005-2012. All Rights Reserved.