Interface MoveStrategy
public interface MoveStrategy
This interfaces provides a movement strategy.
-
Method Summary
Modifier and TypeMethodDescriptionlocationSuggested
(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 Details
-
locationSuggested
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
-