|
Eclipse Draw2d 3.3 |
||||||||||
| 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.parts.Thumbnail
A Thumbnail is a Figure that displays an image of its source Figure at a smaller size. The Thumbnail will maintain the aspect ratio of the source Figure.
| 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 | |
Thumbnail()
Creates a new Thumbnail. |
|
Thumbnail(IFigure fig)
Creates a new Thumbnail with the given IFigure as its source figure. |
|
| Method Summary | |
void |
deactivate()
Deactivates this Thumbnail. |
Dimension |
getPreferredSize(int wHint,
int hHint)
Returns the preferred size of this Thumbnail. |
protected float |
getScaleX()
Returns the scale factor on the X-axis. |
protected float |
getScaleY()
Returns the scale factor on the Y-axis. |
protected IFigure |
getSource()
Returns the source figure being used to generate a thumbnail. |
protected Rectangle |
getSourceRectangle()
Returns the rectangular region relative to the source figure which will be the basis of the thumbnail. |
protected Image |
getThumbnailImage()
Returns the scaled Image of the source Figure. |
protected boolean |
isDirty()
Returns true if the source figure has changed. |
void |
notifyPainting(Rectangle damage,
Map dirtyRegions)
Notifies the listener that the listened to object is painting. |
void |
notifyValidating()
Notifies the listener that the listened to object is validating. |
protected void |
paintFigure(Graphics graphics)
Paints this Figure's primary representation, or background. |
void |
setDirty(boolean value)
Sets the dirty flag. |
protected void |
setScales(float x,
float y)
Sets the X and Y scales for the Thumbnail. |
void |
setSource(IFigure fig)
Sets the source Figure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Thumbnail()
public Thumbnail(IFigure fig)
fig - The source figure| Method Detail |
public void deactivate()
public Dimension getPreferredSize(int wHint,
int hHint)
getPreferredSize in interface IFiguregetPreferredSize in class FigurewHint - The width hinthHint - The height hint
IFigure.getPreferredSize(int, int)protected float getScaleX()
protected float getScaleY()
protected IFigure getSource()
protected Rectangle getSourceRectangle()
protected Image getThumbnailImage()
protected boolean isDirty()
true if the source figure has changed.
true if the source figure has changed
public void notifyPainting(Rectangle damage,
Map dirtyRegions)
UpdateListenerThumbnail, notification
still needs to occur. The map of dirty regions is passed to allow the listener to
determine if it needs to update, for instance when a particular figure is painting.
notifyPainting in interface UpdateListenerdamage - The area being painteddirtyRegions - a Map of figures to their dirty regionsUpdateListener.notifyPainting(Rectangle, Map)public void notifyValidating()
UpdateListener
notifyValidating in interface UpdateListenerUpdateListener.notifyValidating()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 setDirty(boolean value)
value - The dirty value
protected void setScales(float x,
float y)
x - The X scaley - The Y scalepublic void setSource(IFigure fig)
fig - The source figure
|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||