|
Eclipse GEF 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.SnapToHelper
org.eclipse.gef.SnapToGrid
| Field Summary | |
protected GraphicalEditPart |
container
The graphical part whose content's figure defines the grid. |
static int |
DEFAULT_GAP
Deprecated. use DEFAULT_GRID_SIZE |
static int |
DEFAULT_GRID_SIZE
The default grid size if the viewer does not specify a size. |
protected int |
gridX
The horizontal interval for the grid |
protected int |
gridY
The vertical interval for the grid |
protected Point |
origin
The origin of the grid. |
static String |
PROPERTY_GRID_ENABLED
A viewer property indicating whether the snap function is enabled. |
static String |
PROPERTY_GRID_ORIGIN
A viewer property indicating the grid's origin. |
static String |
PROPERTY_GRID_SPACING
A viewer property indicating the grid spacing. |
static String |
PROPERTY_GRID_VISIBLE
A viewer property indicating whether the grid should be displayed. |
| Constructor Summary | |
SnapToGrid(GraphicalEditPart container)
Constructs a gridded snap helper on the given editpart. |
|
| Method Summary | |
int |
snapRectangle(Request request,
int snapLocations,
PrecisionRectangle rect,
PrecisionRectangle result)
|
| Methods inherited from class org.eclipse.gef.SnapToHelper |
makeAbsolute, makeRelative, snapPoint, snapRectangle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String PROPERTY_GRID_ENABLED
public static final String PROPERTY_GRID_VISIBLE
public static final String PROPERTY_GRID_SPACING
Dimension.
public static final String PROPERTY_GRID_ORIGIN
Point.
public static final int DEFAULT_GRID_SIZE
PROPERTY_GRID_SPACING,
Constant Field Valuespublic static final int DEFAULT_GAP
protected GraphicalEditPart container
protected int gridX
protected int gridY
protected Point origin
| Constructor Detail |
public SnapToGrid(GraphicalEditPart container)
container - the editpart which the grid is on| Method Detail |
public int snapRectangle(Request request,
int snapLocations,
PrecisionRectangle rect,
PrecisionRectangle result)
snapRectangle in class SnapToHelperrequest - the request or nullrect - the prioritized rectangles to snap toresult - the outputsnapLocations - the input snap locations
SnapToHelper#snapRectangle(Request, int, PrecisionRectangle, PrecisionRectangle)
|
Eclipse GEF 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||