net.officefloor.demo.macro
Interface MacroSourceContext


public interface MacroSourceContext

Context for the MacroSource.

Author:
Daniel Sagenschneider

Method Summary
 java.awt.Point getAbsoluteLocation(java.awt.Point relativeLocation)
          Obtains the absolute location for the relative location.
 java.awt.Point getAnotherLocation()
           Obtains another location for the Macro.
 java.awt.Point getLocation()
          Obtains the location for the Macro.
 java.awt.Frame getOwnerFrame()
           Obtains the owner Frame.
 java.awt.Point getRelativeLocation(java.awt.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

java.awt.Point getLocation()
Obtains the location for the Macro.

Returns:
Location.

getAnotherLocation

java.awt.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

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

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

getRelativeLocation

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

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

getOwnerFrame

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