|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.lib.Sink
ptolemy.actor.lib.image.ImageDisplay
public class ImageDisplay
Display an image on the screen using the ptolemy.media.Picture class. For a sequence of images that are all the same size, this class will continually update the picture with new data. If the size of the input image changes, then a new Picture object is created. This class will only accept an ImageToken on its input.
Red |
Red |
Nested Class Summary | |
---|---|
protected class |
ImageDisplay.ImageWindow
Version of TableauFrame that removes its association with the ImageDisplay upon closing, and also records the size of the display. |
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary | |
---|---|
protected java.awt.Container |
_container
The container for the image display, set by calling place(). |
protected TokenEffigy |
_effigy
The effigy for the image data. |
protected ImageDisplay.ImageWindow |
_frame
The frame, if one is used. |
protected int |
_oldXSize
The horizontal size of the previous image. |
protected int |
_oldYSize
The vertical size of the previous image. |
protected Picture |
_picture
The picture panel. |
private SizeAttribute |
_pictureSize
A specification of the size of the picture if it's in its own window. |
private ImageTableau |
_tableau
The tableau with the display, if any. |
private WindowPropertiesAttribute |
_windowProperties
A specification for the window properties of the frame. |
Fields inherited from class ptolemy.actor.lib.Sink |
---|
input |
Fields inherited from class ptolemy.actor.AtomicActor |
---|
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
ImageDisplay(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name. |
Method Summary | |
---|---|
private void |
_createOrShowWindow()
Create or show the top-level window, unless there already is a container. |
protected void |
_display(Token in)
Display the specified token. |
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace. |
java.awt.Color |
getBackground()
Get the background. |
void |
initialize()
Initialize this actor. |
void |
place(java.awt.Container container)
Set the container that this actor should display data in. |
boolean |
postfire()
Consume a token from the input port and display the token as an image. |
void |
setBackground(java.awt.Color background)
Set the background. |
Methods inherited from class ptolemy.actor.TypedAtomicActor |
---|
_addPort, _fireAt, _fireAt, attributeTypeChanged, clone, newPort, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.actor.Actor |
---|
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList |
Methods inherited from interface ptolemy.actor.Executable |
---|
fire, isFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, preinitialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
protected java.awt.Container _container
protected TokenEffigy _effigy
protected ImageDisplay.ImageWindow _frame
protected int _oldXSize
protected int _oldYSize
protected Picture _picture
private SizeAttribute _pictureSize
private ImageTableau _tableau
private WindowPropertiesAttribute _windowProperties
Constructor Detail |
---|
public ImageDisplay(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor.
IllegalActionException
- If the actor cannot be contained
by the proposed container.
NameDuplicationException
- If the container already has an
actor with this name.Method Detail |
---|
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class AtomicActor
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public java.awt.Color getBackground()
setBackground(Color)
public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor
IllegalActionException
- If a contained method throws it.public void place(java.awt.Container container)
place
in interface Placeable
container
- The container in which to place the object, or
null to specify that there is no current container.public boolean postfire() throws IllegalActionException
postfire
in interface Executable
postfire
in class AtomicActor
IllegalActionException
- If there is no director, or
if the base class throws it.public void setBackground(java.awt.Color background)
background
- The background color.getBackground()
protected void _display(Token in)
in
- The token to displayprivate void _createOrShowWindow()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |