com.allen_sauer.gwt.dnd.client.util
Interface Location

All Known Implementing Classes:
AbstractLocation, CoordinateLocation, WidgetLocation

public interface Location

Class representing a location defined by left (x) and top (y) coordinates.


Method Summary
 int getLeft()
          Get x coordinate.
 int getTop()
          Get the y coordinate.
 Location newLocationSnappedToGrid(int gridX, int gridY)
          Return a new location, snapped to the grid based on a spacing of (gridX, gridY).
 

Method Detail

getLeft

int getLeft()
Get x coordinate.

Returns:
the left offset in pixels

getTop

int getTop()
Get the y coordinate.

Returns:
the top offset in pixels

newLocationSnappedToGrid

Location newLocationSnappedToGrid(int gridX,
                                  int gridY)
Return a new location, snapped to the grid based on a spacing of (gridX, gridY).

Parameters:
gridX - the horizontal grid spacing in pixels
gridY - the vertical grid spacing in pixels
Returns:
the new location


Copyright © 2011 Sage Software, Inc. All rights reserved.