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

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

org.netbeans.api.visual 2.2

org.netbeans.api.visual.action
Interface MoveStrategy


public interface MoveStrategy

This interfaces provides a movement strategy.


Method Summary
 Point locationSuggested(Widget widget, Point originalLocation, Point suggestedLocation)
          Called after an user suggests a new location and before the suggested location is stored to a specified widget.
 

Method Detail

locationSuggested

Point locationSuggested(Widget widget,
                        Point originalLocation,
                        Point suggestedLocation)
Called after an user suggests a new location and before the suggested location is stored to a specified widget. This allows to manipulate with a suggested location to perform snap-to-grid, locked-axis on any other movement strategy.

Parameters:
widget - the moved widget
originalLocation - the original location specified by the MoveProvider.getOriginalLocation method
suggestedLocation - the location suggested by an user (usually by a mouse cursor position)
Returns:
the new (optional modified) location processed by the strategy

org.netbeans.api.visual 2.2

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