org.graffiti.plugins.modes.advanced
Class PositionInfo

java.lang.Object
  extended by org.graffiti.plugins.modes.advanced.PositionInfo

public class PositionInfo
extends Object

This class is used in conjunction with a FunctionComponent and stores position-information (mouse, mouse when popup-menu was opened, possibly other things as well in future). This way, the FunctionActions can be feeded with position-information (via the FunctionActionEvents).


Constructor Summary
PositionInfo()
           
 
Method Summary
 Point getLastPopupPosition()
          Returns the position the mouse had when the popup-menu was opened the last time.
 Point getMousePosition()
          Returns the last mouse-position.
 void setLastPopupPosition(Point lastPopupPosition)
          Sets the position the mouse had when the popup-menu was opened the last time.
 void setMousePosition(Point mousePosition)
          Sets the last mouse-position.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionInfo

public PositionInfo()
Method Detail

setLastPopupPosition

public void setLastPopupPosition(Point lastPopupPosition)
Sets the position the mouse had when the popup-menu was opened the last time.

Parameters:
lastPopupPosition - the position the mouse had when the popup-menu was opened the last time, may be null if no such position is available

getLastPopupPosition

public Point getLastPopupPosition()
Returns the position the mouse had when the popup-menu was opened the last time.

Returns:
the position the mouse had when the popup-menu was opened the last time, null if no such position is available

setMousePosition

public void setMousePosition(Point mousePosition)
Sets the last mouse-position.

Parameters:
mousePosition - the last mouse-position, may be null if no mouse-position is available

getMousePosition

public Point getMousePosition()
Returns the last mouse-position.

Returns:
the last mouse-position, null if presently no mouse-position is available


Generated at 2012-05-30 11:01:25 PM CEST