当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
MoveStrategy (Visual Library API) - NetBeans API Javadoc (Current Development Version)
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. |
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 widgetoriginalLocation
- the original location specified by the MoveProvider.getOriginalLocation methodsuggestedLocation
- the location suggested by an user (usually by a mouse cursor position)
- Returns:
- the new (optional modified) location processed by the strategy