Package ptolemy.actor.gui
Class AbstractPlaceableActor
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity<T>
-
- ptolemy.actor.AtomicActor<TypedIOPort>
-
- ptolemy.actor.TypedAtomicActor
-
- ptolemy.actor.gui.AbstractPlaceableActor
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Placeable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
- Direct Known Subclasses:
CAViewer
,JavaScript
,MatrixViewer
,ModelDisplay
public abstract class AbstractPlaceableActor extends TypedAtomicActor implements Placeable
Base class for actors that implement the Placeable interface.- Since:
- Ptolemy II 6.1
- Version:
- $Id$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Yellow (cxh)
- Pt.ProposedRating:
- Green (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JFrame
_frame
The associated frame.protected SizeAttribute
_paneSize
A specification of the size of the pane if it's in its own window.protected ptolemy.actor.gui.AbstractPlaceableActor.WindowClosingAdapter
_windowClosingAdapter
A reference to the listener for removal purposes.protected WindowPropertiesAttribute
_windowProperties
A specification for the window properties of the frame.-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _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
Constructors Constructor Description AbstractPlaceableActor(CompositeEntity container, java.lang.String name)
Construct an actor with the specified container and name.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
_exportMoMLContents(java.io.Writer output, int depth)
Write a MoML description of the contents of this object.protected void
cleanUp()
Free up memory when closing.java.lang.Object
clone(Workspace workspace)
Clone the actor.abstract void
place(java.awt.Container container)
Specify the container into which this object should be placed.void
setFrame(javax.swing.JFrame frame)
Specify the associated frame and set its properties (size, etc.) to match those stored in the _windowProperties attribute.-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
-
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
_addPort, _description, _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 ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
-
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.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, initialize, preinitialize, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
_frame
protected javax.swing.JFrame _frame
The associated frame.
-
_paneSize
protected SizeAttribute _paneSize
A specification of the size of the pane if it's in its own window.
-
_windowProperties
protected WindowPropertiesAttribute _windowProperties
A specification for the window properties of the frame.
-
_windowClosingAdapter
protected ptolemy.actor.gui.AbstractPlaceableActor.WindowClosingAdapter _windowClosingAdapter
A reference to the listener for removal purposes.
-
-
Constructor Detail
-
AbstractPlaceableActor
public AbstractPlaceableActor(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct an actor with the specified container and name.- Parameters:
container
- The container.name
- The name of this actor.- Throws:
IllegalActionException
- If the entity cannot be contained by the proposed container.NameDuplicationException
- If the container already has an actor with this name.
-
-
Method Detail
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the actor.- Overrides:
clone
in classTypedAtomicActor
- Parameters:
workspace
- The workspace in which to place the cloned variable.- Returns:
- The cloned variable.
- Throws:
java.lang.CloneNotSupportedException
- Not thrown in this base class.- See Also:
Object.clone()
-
place
public abstract void place(java.awt.Container container)
Specify the container into which this object should be placed. Obviously, this method needs to be called before the object is actually placed in a container. Otherwise, the object will be expected to create its own frame into which to place itself. For actors, this method should be called before initialize().
-
setFrame
public void setFrame(javax.swing.JFrame frame)
Specify the associated frame and set its properties (size, etc.) to match those stored in the _windowProperties attribute.- Parameters:
frame
- The associated frame.
-
cleanUp
protected void cleanUp()
Free up memory when closing.
-
_exportMoMLContents
protected void _exportMoMLContents(java.io.Writer output, int depth) throws java.io.IOException
Write a MoML description of the contents of this object. This overrides the base class to make sure that the current frame properties, if there is a frame, are recorded.- Overrides:
_exportMoMLContents
in classEntity<TypedIOPort>
- Parameters:
output
- The output stream to write to.depth
- The depth in the hierarchy, to determine indenting.- Throws:
java.io.IOException
- If an I/O error occurs.- See Also:
NamedObj.exportMoML(Writer, int)
-
-