com.allen_sauer.gwt.dnd.client.util
Class AbstractLocation

java.lang.Object
  extended by com.allen_sauer.gwt.dnd.client.util.AbstractLocation
All Implemented Interfaces:
Location
Direct Known Subclasses:
CoordinateLocation, WidgetLocation

public abstract class AbstractLocation
extends java.lang.Object
implements Location

Provides default method implementations.


Constructor Summary
AbstractLocation()
           
 
Method Summary
 Location newLocationSnappedToGrid(int gridX, int gridY)
          Return a new location, snapped to the grid based on a spacing of (gridX, gridY).
 java.lang.String toString()
          Textual representation of this location formatted as (x, y).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.allen_sauer.gwt.dnd.client.util.Location
getLeft, getTop
 

Constructor Detail

AbstractLocation

public AbstractLocation()
Method Detail

newLocationSnappedToGrid

public Location newLocationSnappedToGrid(int gridX,
                                         int gridY)
Description copied from interface: Location
Return a new location, snapped to the grid based on a spacing of (gridX, gridY).

Specified by:
newLocationSnappedToGrid in interface Location
Parameters:
gridX - the horizontal grid spacing in pixels
gridY - the vertical grid spacing in pixels
Returns:
the new location

toString

public java.lang.String toString()
Textual representation of this location formatted as (x, y).

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this location


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