|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.FigureUtilities
org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities
A set of methods that are useful when manipulating figures. These are often used in the paint routines or locators of IFigure implementors to do complex geometry calculations that may be common across different parts of a hierarchy.
| Constructor Summary | |
FigureUtilities()
|
|
| Method Summary | |
static java.lang.Integer |
colorToInteger(Color c)
Method colorToInteger. |
static Point |
getLocation(int pos,
Dimension dim,
Rectangle constraint)
Return the location within the supplied constraint of an object of dimension dim according to the alignment parameter. |
static Point |
getLocation(int pos,
Rectangle topos,
Rectangle constraint)
Return the location within the supplied constraint the supplied rectangle requires to be positioned according to the alignment parameter pos. |
static Color |
integerToColor(java.lang.Integer i)
Method integerToColor. |
static RGB |
integerToRGB(java.lang.Integer color)
Method integerToRGB converts from an Integer to an RGB representation |
static java.lang.Integer |
RGBToInteger(RGB rgb)
Method RGBToInteger converts from an RGB to an Integer representation |
| Methods inherited from class org.eclipse.draw2d.FigureUtilities |
darker, findCommonAncestor, getFontMetrics, getGC, getRoot, getStringDimension, getStringExtents, getTextDimension, getTextExtents, getTextExtents, getTextWidth, isAncestor, lighter, makeGhostShape, mixColors, mixColors, paintEtchedBorder, paintEtchedBorder, paintGrid, setFont |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FigureUtilities()
| Method Detail |
public static java.lang.Integer colorToInteger(Color c)
c -
public static Color integerToColor(java.lang.Integer i)
i -
public static java.lang.Integer RGBToInteger(RGB rgb)
rgb -
public static RGB integerToRGB(java.lang.Integer color)
color -
public static Point getLocation(int pos,
Rectangle topos,
Rectangle constraint)
NW-----N------NE | | W NS/EW E | | SW-----S------SE
pos - a geographic PositionConstant (N,E,W,S,NW,NW,NS,EW)topos - the rectangle to be (re)positioned.constraint - the containing bounds.
public static Point getLocation(int pos,
Dimension dim,
Rectangle constraint)
pos - a geographic PositionConstant (N,E,W,S,NW,NW,NS,EW)dim - some dimension.constraint - the containing bounds.
FigureUtilities.getLocation(int, Rectangle, 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.