net.officefloor.demo.macro
Interface MacroSourceContext


public interface MacroSourceContext

Context for the MacroSource.

Author:
Daniel Sagenschneider

Method Summary
 Point getAbsoluteLocation(Point relativeLocation)
          Obtains the absolute location for the relative location.
 Point getAnotherLocation()
           Obtains another location for the Macro.
 Point getLocation()
          Obtains the location for the Macro.
 Frame getOwnerFrame()
           Obtains the owner Frame.
 Point getRelativeLocation(Point absoluteLocation)
          Obtains the relative location for the absolute location.
 void setNewMacro(Macro macro)
          Call back to specify the Macro being created.
 

Method Detail

setNewMacro

void setNewMacro(Macro macro)
Call back to specify the Macro being created.

Parameters:
macro - Macro created.

getLocation

Point getLocation()
Obtains the location for the Macro.

Returns:
Location.

getAnotherLocation

Point getAnotherLocation()

Obtains another location for the Macro.

An example use of this is dragging:

  1. getLocation() provides item location
  2. use this method to obtain target location to drag item

Returns:
Another location for the Macro.

getAbsoluteLocation

Point getAbsoluteLocation(Point relativeLocation)
Obtains the absolute location for the relative location.

Parameters:
relativeLocation - Relative location.
Returns:
Absolute location.

getRelativeLocation

Point getRelativeLocation(Point absoluteLocation)
Obtains the relative location for the absolute location.

Parameters:
absoluteLocation - Absolute location.
Returns:
Relative location.

getOwnerFrame

Frame getOwnerFrame()

Obtains the owner Frame.

This is useful should there for example be a JDialog necessary to obtain information for creating the Macro.

Returns:
Owner Frame.


Copyright © 2005-2011. All Rights Reserved.