|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gmf.runtime.diagram.ui.figures.LayoutHelper
A utility class used to find the location to place an undefined child figure.
| Field Summary | |
static Rectangle |
UNDEFINED
Constant that represetns an undefined element. |
| Constructor Summary | |
LayoutHelper()
constructor |
|
| Method Summary | |
IFigure |
findFigureIn(IFigure parent,
Rectangle bounds)
Return a child figure that is already occupying the a position within the supplied bounds figure. |
Point |
getReferencePosition(IFigure parent)
Return an initial point to position UNDEFINED children. |
java.util.List |
getUnpositionedChildren(IFigure parent)
Return the supplied figures children whose location is LayoutHelper.UNDEFINED. |
void |
layoutUndefinedChildren(ICanonicalShapeCompartmentLayout mgr,
IFigure parent,
java.util.Map registry)
Layout the supplied parent's children whose position is equal to LayoutHelper.UNDEFINED. |
Point |
updateClobberedPosition(IFigure clobbered,
IFigure newlyAddedChild)
Returns a position not contained with the supplied figures bounds. |
Point |
validatePosition(IFigure parent,
Rectangle bounds)
Returns a location inside the supplied parent that is currently unoccupied by another figure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Rectangle UNDEFINED
| Constructor Detail |
public LayoutHelper()
| Method Detail |
public void layoutUndefinedChildren(ICanonicalShapeCompartmentLayout mgr,
IFigure parent,
java.util.Map registry)
LayoutHelper.UNDEFINED.
mgr - the calling layout managerparent - the containing figure.registry - the [figure,editpart] registryLayoutHelper.getReferencePosition(IFigure)public final java.util.List getUnpositionedChildren(IFigure parent)
LayoutHelper.UNDEFINED.
parent - the containing figure.
public Point getReferencePosition(IFigure parent)
parent - the containing figure (typically layout()'s input parameter)
parent.getBounds().getCenter().getCopy();LayoutHelper.validatePosition(IFigure, Rectangle)
public Point validatePosition(IFigure parent,
Rectangle bounds)
parent - containing figure.bounds - are being searched.
public IFigure findFigureIn(IFigure parent,
Rectangle bounds)
parent - The parent figure of the newly added child.bounds - the area being tested.
public Point updateClobberedPosition(IFigure clobbered,
IFigure newlyAddedChild)
clobbered - the figure currently occuping the reference position<\i>newlyAddedChild - the child figure being added. NOTE, MAY BE NULL
clobbered.getBounds().getRight().getCopy().translate(30,0);LayoutHelper.getReferencePosition(IFigure),
LayoutHelper.validatePosition(IFigure, Rectangle)
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.