Package ptolemy.actor.gui
Class AbstractPlaceableJavaSE
- java.lang.Object
-
- ptolemy.actor.gui.AbstractPlaceableJavaSE
-
- Direct Known Subclasses:
DisplayJavaSE,ImageDisplayJavaSE
public abstract class AbstractPlaceableJavaSE extends java.lang.ObjectBase class for AWT and Swing implementation of actors the implement PortablePlaceable.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Edward A. Lee, Ishwinder Singh
- Pt.AcceptedRating:
- Red (ishwinde)
- Pt.ProposedRating:
- Red (ishwinde)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractPlaceableJavaSE.WindowClosingAdapterListener for windowClosing action.
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JFrame_frameThe associated frame.protected SizeAttribute_paneSizeA specification of the size of the pane if it's in its own window.protected AbstractPlaceableJavaSE.WindowClosingAdapter_windowClosingAdapterA reference to the listener for removal purposes.protected WindowPropertiesAttribute_windowPropertiesA specification for the window properties of the frame.
-
Constructor Summary
Constructors Constructor Description AbstractPlaceableJavaSE()
-
Method Summary
All Methods Instance 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 voidcleanUp()Free up memory when closing.voidinit(TypedAtomicActor actor)Initialize the specified actor with window properties and pane size attributes.voidsetFrame(javax.swing.JFrame frame)Specify the associated frame and set its properties (size, etc.) to match those stored in the _windowProperties attribute.
-
-
-
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 AbstractPlaceableJavaSE.WindowClosingAdapter _windowClosingAdapter
A reference to the listener for removal purposes.
-
-
Method Detail
-
init
public void init(TypedAtomicActor actor) throws IllegalActionException, NameDuplicationException
Initialize the specified actor with window properties and pane size attributes.- Parameters:
actor- The actor contained in the Window.- Throws:
IllegalActionException- If the entity cannot be contained by the proposed container.NameDuplicationException- If the container already has an actor with this name.
-
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.IOExceptionWrite 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.- 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.
-
-