org.eclipse.gmf.runtime.draw2d.ui.figures
Interface IBorderItemLocator
-
All Superinterfaces:
-
Locator
-
public interface IBorderItemLocator
- extends
Locator
Controls the location of border items around another figure.
An IBorderItemLocator
is used in conjunction with
org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy
for feedback when moving border items and with
org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart
when refreshing the bounds of the border item figure.
setConstraint
void setConstraint(
Rectangle constraint)
- Sets the constraint for the location of this border item.
-
-
-
Parameters:
-
constraint
- the position and optionally size
getValidLocation
Rectangle getValidLocation(
Rectangle proposedLocation,
IFigure borderItem)
- Returns a suitable location for the border item given a proposed
location. By implementing this method, the feedback shown when the user
moves a border item can reflect where the locator will actually place the
border item.
For example, if the border item is restricted to being on the border of
its parent shape, when the user attempts to move the border item outside
the border of the parent shape (the proposed location), the feedback will
always show the border item on the border. In this case, this method
would return a location on the border close to the proposed location.
-
-
-
Parameters:
-
proposedLocation
- a proposed location and optionally size -
borderItem
- the border item in question
-
Returns:
- a rectangle containing the valid location
getCurrentSideOfParent
int getCurrentSideOfParent()
- Returns the side of the parent figure on which the border item is
currently on.
-
-
-
Returns:
- the side on which this border item appears as defined in
PositionConstants
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.