public class Thumbnail extends Figure implements UpdateListener
Figure.FigureIterator, Figure.IdentitySearchIFigure.NoInsetsbgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTipMAX_DIMENSION, MIN_DIMENSION, NO_INSETS| Constructor and Description |
|---|
Thumbnail()
Creates a new Thumbnail.
|
Thumbnail(IFigure fig)
Creates a new Thumbnail with the given IFigure as its source figure.
|
| Modifier and Type | Method and Description |
|---|---|
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,
java.util.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.
|
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validatepublic Thumbnail()
public Thumbnail(IFigure fig)
fig - The source figurepublic void deactivate()
public Dimension getPreferredSize(int wHint, int hHint)
getPreferredSize in interface IFiguregetPreferredSize in class FigurewHint - The width hinthHint - The height hintIFigure.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 changedpublic void notifyPainting(Rectangle damage, java.util.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()
UpdateListenernotifyValidating 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 valueprotected void setScales(float x,
float y)
x - The X scaley - The Y scalepublic void setSource(IFigure fig)
fig - The source figureCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.