public class ImageDisplayJavaSE extends AbstractPlaceableJavaSE implements ImageDisplayInterface
ImageDisplayJavaSE is the implementation of the ImageDisplayInterface that uses AWT and Swing classes.
Modifier and Type | Class and Description |
---|---|
protected class |
ImageDisplayJavaSE.ImageWindow
Version of TableauFrame that removes its association with the
ImageDisplay upon closing, and also records the size of the display.
|
(package private) class |
ImageDisplayJavaSE.WindowClosingAdapter
Listener for windowClosing action.
|
Modifier and Type | Field and Description |
---|---|
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 ImageDisplayJavaSE.ImageWindow |
_imageWindowFrame
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.
|
_frame, _paneSize, _windowClosingAdapter, _windowProperties
Constructor and Description |
---|
ImageDisplayJavaSE() |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp()
Free up memory when closing.
|
void |
display(Token in)
Display the specified token.
|
java.awt.Color |
getBackground()
Get the background.
|
java.lang.Object |
getFrame()
Get the image's frame.
|
java.lang.Object |
getPicture()
Get the platform dependent picture that contains the image.
|
java.lang.Object |
getPlatformContainer()
Get the platform dependent container that contains the image.
|
java.lang.Object |
getTableau()
Get the image tableau.
|
void |
init(ImageDisplay imageDisplayActor)
Initialize an object.
|
void |
initializeEffigy()
Initialize the effigy of the image.
|
void |
initWindowAndSizeProperties()
Initialize the effigy of the plotter.
|
void |
placeContainer(java.awt.Container container)
Remove the plot from the frame if the container is null.
|
void |
setBackground(java.awt.Color background)
Set the background.
|
void |
setFrame(java.lang.Object frame)
Set the frame of the image.
|
void |
setPicture(java.lang.Object picture)
Set the platform dependent picture of the image.
|
void |
setPlatformContainer(java.lang.Object container)
Set the platform dependent container of the image.
|
_exportMoMLContents, init, setFrame
protected java.awt.Container _container
protected TokenEffigy _effigy
protected ImageDisplayJavaSE.ImageWindow _imageWindowFrame
protected Picture _picture
protected int _oldXSize
protected int _oldYSize
public void cleanUp()
cleanUp
in interface ImageDisplayInterface
cleanUp
in class AbstractPlaceableJavaSE
public void display(Token in)
display
in interface ImageDisplayInterface
in
- The token to displaypublic java.awt.Color getBackground()
getBackground
in interface ImageDisplayInterface
setBackground(Color)
public java.lang.Object getFrame()
getFrame
in interface ImageDisplayInterface
setFrame(Object)
public java.lang.Object getPicture()
getPicture
in interface ImageDisplayInterface
setPicture(Object)
public java.lang.Object getPlatformContainer()
getPlatformContainer
in interface ImageDisplayInterface
setPlatformContainer(Object)
public java.lang.Object getTableau()
getTableau
in interface ImageDisplayInterface
public void init(ImageDisplay imageDisplayActor) throws IllegalActionException, NameDuplicationException
init
in interface ImageDisplayInterface
imageDisplayActor
- The object to be initialized.IllegalActionException
- If the entity cannot be contained
by the proposed container.NameDuplicationException
- If the container already has an
actor with this name.public void initializeEffigy() throws IllegalActionException
initializeEffigy
in interface ImageDisplayInterface
IllegalActionException
- If there is a problem initializing the effigypublic void initWindowAndSizeProperties() throws IllegalActionException, NameDuplicationException
initWindowAndSizeProperties
in interface ImageDisplayInterface
IllegalActionException
- If there is a problem initializing the effigyNameDuplicationException
- If there is a problem creating the attributes.public void placeContainer(java.awt.Container container)
placeContainer
in interface ImageDisplayInterface
container
- The Container to be placed.public void setBackground(java.awt.Color background)
setBackground
in interface ImageDisplayInterface
background
- The background color.getBackground()
public void setFrame(java.lang.Object frame)
setFrame
in interface ImageDisplayInterface
frame
- The frame to set.getFrame()
public void setPicture(java.lang.Object picture)
setPicture
in interface ImageDisplayInterface
picture
- The picturegetPicture()
public void setPlatformContainer(java.lang.Object container)
setPlatformContainer
in interface ImageDisplayInterface
container
- the platform dependent container.getPlatformContainer()