|
Eclipse Draw2d 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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. This figure is not intended to have a layout mananger or children.
Note that it is the client's responsibility to dispose the given image. There is no "free" resource management in draw2d.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator, Figure.IdentitySearch |
| 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 The default alignment is PositionConstants.CENTER. |
|
ImageFigure(Image image)
Constructor The default alignment is PositionConstants.CENTER. |
|
ImageFigure(Image image,
int alignment)
Constructor |
|
| Method Summary | |
Image |
getImage()
|
Dimension |
getPreferredSize(int wHint,
int hHint)
Calculates the necessary size to display the Image within the figure's client area. |
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()
PositionConstants.CENTER.
public ImageFigure(Image image)
PositionConstants.CENTER.
image - The Image to be displayed
public ImageFigure(Image image,
int alignment)
image - The Image to be displayedalignment - A PositionConstant indicating the alignmentsetImage(Image),
setAlignment(int)| Method Detail |
public Image getImage()
public Dimension getPreferredSize(int wHint,
int hHint)
getPreferredSize in interface IFiguregetPreferredSize in class FigureFigure.getPreferredSize(int, int)protected void paintFigure(Graphics graphics)
FigureFigure.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 Figuregraphics - The Graphics used to paintFigure.paintFigure(Graphics)public void setAlignment(int flag)
flag - A constant indicating the alignmentpublic void setImage(Image image)
IMPORTANT: Note that it is the client's responsibility to dispose the given image.
image - The Image to be displayed. It can be null.
|
Eclipse Draw2d 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||