public class ImageIcon extends DynamicEditorIcon implements java.awt.image.ImageObserver
NamedObj.ContainedObjectsIterator
_figures
_containerToBe, _iconCache
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
ImageIcon(NamedObj container,
java.lang.String name)
Create a new icon with the given name in the given container.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
Figure |
createBackgroundFigure()
Create a new default background figure, which is scaled image,
if it has been set, or a default image if not.
|
javax.swing.Icon |
createIcon()
Create a new Swing icon.
|
boolean |
imageUpdate(java.awt.Image image,
int infoflags,
int x,
int y,
int width,
int height)
This method, which is required by the ImageObserver interface,
is called if something has changed in a background loading of
the image.
|
void |
scaleImage(double percentage)
Specify a scaling for the image as a percentage.
|
void |
setImage(java.awt.Image image)
Specify an image to display.
|
_addLiveFigure, _liveFigureIterator, _trimLiveFigures
_createDefaultBackgroundFigure, _isPropertySet, _recreateFigure, createFigure, getContainerOrContainerToBe, setContainerToBe
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
public ImageIcon(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the attribute.IllegalActionException
- If the attribute is not of an
acceptable class for the container.NameDuplicationException
- If the name coincides with
an attribute already in the container.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class DynamicEditorIcon
workspace
- The workspace for the cloned object.java.lang.CloneNotSupportedException
- Not thrown in this base classNamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public Figure createBackgroundFigure()
createBackgroundFigure
in class EditorIcon
public javax.swing.Icon createIcon()
createIcon
in class EditorIcon
public boolean imageUpdate(java.awt.Image image, int infoflags, int x, int y, int width, int height)
imageUpdate
in interface java.awt.image.ImageObserver
image
- The image being observed.infoflags
- The bitwise inclusive OR of the following flags:
WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR,
ABORT.x
- The x coordinate of the image.y
- The y coordinate of the image.width
- The width of the image.height
- The height of the image.public void scaleImage(double percentage)
percentage
- The scaling percentage.public void setImage(java.awt.Image image)
image
- The image to display.