|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.Figure | +--org.eclipse.draw2d.ImageFigure
A Figure that simply contains an Image. Use this Figure, instead of a Label, when displaying Images without any accompanying text. Using Labels for displaying Images can stress your resources.
Nested Class Summary |
Nested classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator |
Nested classes inherited from class org.eclipse.draw2d.IFigure |
IFigure.NoInsets |
Field Summary |
Fields inherited from class org.eclipse.draw2d.Figure |
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
Fields inherited from interface org.eclipse.draw2d.IFigure |
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
Constructor Summary | |
ImageFigure()
Constructor |
|
ImageFigure(Image image)
Constructor |
Method Summary | |
Image |
getImage()
|
Dimension |
getPreferredSize(int wHint,
int hHint)
Returns the size of the Image that this Figure displays; or (0,0) if no Image has been set yet. |
protected void |
paintFigure(Graphics graphics)
Paints this Figure's primary representation, or background. |
void |
setAlignment(int flag)
Sets the alignment of the Image within this Figure. |
void |
setImage(Image image)
Sets the Image that this ImageFigure displays. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ImageFigure()
public ImageFigure(Image image)
image
- The Image to be displayedMethod Detail |
public Image getImage()
public Dimension getPreferredSize(int wHint, int hHint)
getPreferredSize
in interface IFigure
getPreferredSize
in class Figure
Figure.getPreferredSize(int, int)
protected void paintFigure(Graphics graphics)
Figure
Figure.paintClientArea(Graphics)
and Figure.paintBorder(Graphics)
. Furthermore, it is safe
to call graphics.restoreState()
within this method, and doing so will
restore the graphics to its original state upon entry.
paintFigure
in class Figure
graphics
- The Graphics used to paintFigure.paintFigure(Graphics)
public void setAlignment(int flag)
flag
- A constant indicating the alignmentpublic void setImage(Image image)
image
- The Image to be displayed.
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |