Package ptolemy.actor.lib.gui
Class PlotterBaseJavaSE
- java.lang.Object
-
- ptolemy.actor.lib.gui.PlotterBaseJavaSE
-
- All Implemented Interfaces:
PlotterBaseInterface
public class PlotterBaseJavaSE extends java.lang.Object implements PlotterBaseInterface
Java SE implementation of PlotterBaseInterface. The code is largely based on the original platform dependent version of the PlotterBase but was moved here in order to support portability of the actor.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Edward A. Lee Contributors: Anar Huseynov
- Pt.AcceptedRating:
- Red (ahuseyno)
- Pt.ProposedRating:
- Red (ahuseyno)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classPlotterBaseJavaSE.PlotWindowTableauTableau that creates a PlotterPlotFrame.
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Container_containerContainer into which this plot should be placed.protected PlotTableauFrame_frameFrame into which plot is placed, if any.protected SizeAttribute_plotSizeAn attribute that contains the size of the plot.protected PlotterBase_plotterBaseThe base instance that created the implementation.protected PlotterBaseJavaSE.PlotWindowTableau_tableauThe Plotter tableau.protected ptolemy.actor.lib.gui.PlotterBaseJavaSE.WindowClosingAdapter_windowClosingAdapterA reference to the listener for removal purposes.protected WindowPropertiesAttribute_windowPropertiesAn attribute tha contains the size and position of the window.
-
Constructor Summary
Constructors Constructor Description PlotterBaseJavaSE()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbringToFront()Show and then bing the frame to the front.voidcleanUp()Free up memory when closing.java.lang.ObjectgetFrame()Get the plotter's frame.java.lang.ObjectgetPlatformContainer()Get the platform dependent container that contains the plotter.java.lang.ObjectgetTableau()Get the plotter tableau.voidinit(PlotterBase plotterBase)Initialize the implementation.voidinitializeEffigy()Initialize the effigy of the plotter.voidinitWindowAndSizeProperties()Initialize the effigy of the plotter.PlotBoxInterfacenewPlot()Create a new instance of the PlotBoxInterface implementation.voidremove()Remove the plot from the current container, if there is one.voidremoveNullContainer()Remove the plot from the frame if the container is null.voidsetFrame(java.lang.Object frame)Set the frame of the plotter.voidsetPlatformContainer(java.lang.Object container)Set the platform dependent container of the plotter.voidsetTableauTitle(java.lang.String title)Set the title of the tableau.voidupdateSize()Update size attribute of the plotter.voidupdateWindowAndSizeAttributes()Update values of the attributes.
-
-
-
Field Detail
-
_container
protected java.awt.Container _container
Container into which this plot should be placed.
-
_frame
protected transient PlotTableauFrame _frame
Frame into which plot is placed, if any.
-
_plotSize
protected SizeAttribute _plotSize
An attribute that contains the size of the plot.
-
_plotterBase
protected PlotterBase _plotterBase
The base instance that created the implementation.
-
_tableau
protected PlotterBaseJavaSE.PlotWindowTableau _tableau
The Plotter tableau.
-
_windowClosingAdapter
protected ptolemy.actor.lib.gui.PlotterBaseJavaSE.WindowClosingAdapter _windowClosingAdapter
A reference to the listener for removal purposes.
-
_windowProperties
protected WindowPropertiesAttribute _windowProperties
An attribute tha contains the size and position of the window.
-
-
Method Detail
-
bringToFront
public void bringToFront()
Show and then bing the frame to the front.- Specified by:
bringToFrontin interfacePlotterBaseInterface
-
cleanUp
public void cleanUp()
Free up memory when closing.- Specified by:
cleanUpin interfacePlotterBaseInterface
-
getFrame
public java.lang.Object getFrame()
Get the plotter's frame.- Specified by:
getFramein interfacePlotterBaseInterface- Returns:
- the plotter's frame.
- See Also:
setFrame(Object)
-
getPlatformContainer
public java.lang.Object getPlatformContainer()
Get the platform dependent container that contains the plotter.- Specified by:
getPlatformContainerin interfacePlotterBaseInterface- Returns:
- the platform dependent container.
- See Also:
setPlatformContainer(Object)
-
getTableau
public java.lang.Object getTableau()
Get the plotter tableau.- Specified by:
getTableauin interfacePlotterBaseInterface- Returns:
- the plotter tableau.
-
init
public void init(PlotterBase plotterBase)
Initialize the implementation.- Specified by:
initin interfacePlotterBaseInterface- Parameters:
plotterBase- the instance that created the implementation.
-
initializeEffigy
public void initializeEffigy() throws IllegalActionExceptionInitialize the effigy of the plotter.- Specified by:
initializeEffigyin interfacePlotterBaseInterface- Throws:
IllegalActionException- If there is a problem initializing the effigy
-
initWindowAndSizeProperties
public void initWindowAndSizeProperties() throws IllegalActionException, NameDuplicationExceptionInitialize the effigy of the plotter.- Specified by:
initWindowAndSizePropertiesin interfacePlotterBaseInterface- Throws:
IllegalActionException- If there is a problem initializing the effigyNameDuplicationException- if there is a problem creating the attributes.
-
newPlot
public PlotBoxInterface newPlot()
Create a new instance of the PlotBoxInterface implementation.- Specified by:
newPlotin interfacePlotterBaseInterface- Returns:
- a new instance of the PlotBoxInterface implementation.
-
remove
public void remove()
Remove the plot from the current container, if there is one.- Specified by:
removein interfacePlotterBaseInterface
-
removeNullContainer
public void removeNullContainer()
Remove the plot from the frame if the container is null.- Specified by:
removeNullContainerin interfacePlotterBaseInterface
-
setFrame
public void setFrame(java.lang.Object frame)
Set the frame of the plotter.- Specified by:
setFramein interfacePlotterBaseInterface- Parameters:
frame- The frame to set.- See Also:
getFrame()
-
setPlatformContainer
public void setPlatformContainer(java.lang.Object container)
Set the platform dependent container of the plotter. The container can be AWT container or Android view.- Specified by:
setPlatformContainerin interfacePlotterBaseInterface- Parameters:
container- the platform dependent container.- See Also:
getPlatformContainer()
-
setTableauTitle
public void setTableauTitle(java.lang.String title)
Set the title of the tableau.- Specified by:
setTableauTitlein interfacePlotterBaseInterface- Parameters:
title- the title to set.
-
updateSize
public void updateSize()
Update size attribute of the plotter.- Specified by:
updateSizein interfacePlotterBaseInterface
-
updateWindowAndSizeAttributes
public void updateWindowAndSizeAttributes()
Update values of the attributes.- Specified by:
updateWindowAndSizeAttributesin interfacePlotterBaseInterface
-
-