Interface MoveStrategy


public interface MoveStrategy
This interfaces provides a movement strategy.
  • Method Summary

    Modifier and Type
    Method
    Description
    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 Details

    • 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