|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.lite.figures.SideAffixedElementPositioner
public abstract class SideAffixedElementPositioner
Defines position for side-affixed elements. Used both for already created elements (by BorderItemLocator
and for feedback positioning while creating the element (by SideAffixedLayoutEditPolicy
).
Constructor Summary | |
---|---|
SideAffixedElementPositioner()
|
Method Summary | |
---|---|
protected boolean |
conflicts(org.eclipse.draw2d.geometry.Rectangle recommendedLocation)
Determine if the the given rectangle conflicts with the position of an existing borderItemFigure. |
static int |
findClosestSideOfParent(org.eclipse.draw2d.geometry.Rectangle proposedLocation,
org.eclipse.draw2d.geometry.Rectangle parentBorder)
Find the closest side when x,y is inside parent. |
org.eclipse.draw2d.geometry.Dimension |
getBorderItemOffset()
|
protected abstract org.eclipse.draw2d.geometry.Dimension |
getBorderItemSize()
|
protected org.eclipse.draw2d.geometry.Dimension |
getGap()
Returns the gap to introduce if a side-affixed element conflicts to its sibling. |
protected abstract org.eclipse.draw2d.IFigure |
getHostFigure()
|
protected org.eclipse.draw2d.geometry.Rectangle |
getParentBorder()
Utility to calculate the parent bounds with consideration for the handle bounds inset. |
protected abstract Collection<? extends org.eclipse.draw2d.IFigure> |
getSiblings()
|
org.eclipse.draw2d.geometry.Rectangle |
getValidLocation(org.eclipse.draw2d.geometry.Rectangle proposedLocation)
Returns the valid location that is as close as possible to the given location. |
protected org.eclipse.draw2d.geometry.Rectangle |
locateOnBorder(org.eclipse.draw2d.geometry.Rectangle suggestedLocation,
int suggestedSide,
int circuitCount)
The preferred side takes precedence. |
void |
setBorderItemOffset(org.eclipse.draw2d.geometry.Dimension borderItemOffset)
|
protected void |
setGap(org.eclipse.draw2d.geometry.Dimension gap)
Sets the gap to introduce if a side-affixed element conflicts to its sibling. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SideAffixedElementPositioner()
Method Detail |
---|
public org.eclipse.draw2d.geometry.Dimension getBorderItemOffset()
public void setBorderItemOffset(org.eclipse.draw2d.geometry.Dimension borderItemOffset)
borderItemOffset
- The borderItemOffset to set.protected org.eclipse.draw2d.geometry.Rectangle getParentBorder()
Rectangle
that is the bounds of the parent.protected final org.eclipse.draw2d.geometry.Rectangle locateOnBorder(org.eclipse.draw2d.geometry.Rectangle suggestedLocation, int suggestedSide, int circuitCount)
suggestedLocation
- suggestedSide
- circuitCount
- recursion count to avoid an infinite loop
protected boolean conflicts(org.eclipse.draw2d.geometry.Rectangle recommendedLocation)
recommendedLocation
-
true
or false
protected abstract Collection<? extends org.eclipse.draw2d.IFigure> getSiblings()
protected org.eclipse.draw2d.geometry.Dimension getGap()
protected void setGap(org.eclipse.draw2d.geometry.Dimension gap)
gap
- public org.eclipse.draw2d.geometry.Rectangle getValidLocation(org.eclipse.draw2d.geometry.Rectangle proposedLocation)
proposedLocation
- proposed location.public static int findClosestSideOfParent(org.eclipse.draw2d.geometry.Rectangle proposedLocation, org.eclipse.draw2d.geometry.Rectangle parentBorder)
proposedLocation
- parentBorder
-
protected abstract org.eclipse.draw2d.IFigure getHostFigure()
protected abstract org.eclipse.draw2d.geometry.Dimension getBorderItemSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |