站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

MoveProvider (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.action
Interface MoveProvider


public interface MoveProvider

This interface controls move action.


Method Summary
 Point getOriginalLocation(Widget widget)
          Called to acquire a origin location against which the movement will be calculated.
 void movementFinished(Widget widget)
          Called to notify about the end of movement of a specified widget.
 void movementStarted(Widget widget)
          Called to nofity about the start of movement of a specified widget.
 void setNewLocation(Widget widget, Point location)
          Called to set a new location of a moved widget.
 

Method Detail

movementStarted

void movementStarted(Widget widget)
Called to nofity about the start of movement of a specified widget.

Parameters:
widget - the moving widget

movementFinished

void movementFinished(Widget widget)
Called to notify about the end of movement of a specified widget.

Parameters:
widget - the moved widget

getOriginalLocation

Point getOriginalLocation(Widget widget)
Called to acquire a origin location against which the movement will be calculated. Usually it is a value of the Widget.getLocation method.

Parameters:
widget - the moving widget
Returns:
the origin location

setNewLocation

void setNewLocation(Widget widget,
                    Point location)
Called to set a new location of a moved widget. The new location is based on the location returned by getOriginalLocation method. Usually it is implemented as the Widget.setPreferredLocation method call.

Parameters:
widget - the moved widget
location - the new location

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.