public abstract class GraphicalObserver extends java.lang.Object implements SimRunListener, IGraphicalObserver
| Constructor and Description |
|---|
GraphicalObserver(java.lang.String name,
GraphicalObserverContext c)
Creates a new graphical observer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deregister()
Deregisters the observer from the context
|
GraphicalObserverContext |
getContext()
Returns the context this observer is displayed in
|
abstract java.awt.Component |
getGUI()
Should return the graphical observer's main GUI component
|
java.lang.String |
getName()
Returns the observer's name
|
void |
register()
Registers the observer with the context
|
void |
setLocation(int x,
int y)
Sets the position of the observer's main window's upper left edge.
|
void |
setSize(int width,
int height)
Sets the observer's main window's size.
|
void |
setVisible(boolean visible)
Sets the observer visible withing the context
|
void |
update()
Requests an update of the observer's display from the context.
|
public GraphicalObserver(java.lang.String name,
GraphicalObserverContext c)
name - Name of the graphical observerc - the context this graphical observer is displayed inpublic GraphicalObserverContext getContext()
IGraphicalObservergetContext in interface IGraphicalObserverpublic abstract java.awt.Component getGUI()
IGraphicalObservergetGUI in interface IGraphicalObserverpublic void register()
IGraphicalObserverregister in interface IGraphicalObserverpublic void deregister()
IGraphicalObserverderegister in interface IGraphicalObserverpublic void setVisible(boolean visible)
IGraphicalObserversetVisible in interface IGraphicalObserverpublic void setSize(int width,
int height)
IGraphicalObserversetSize in interface IGraphicalObserverwidth - window widthheight - window heightpublic void setLocation(int x,
int y)
IGraphicalObserversetLocation in interface IGraphicalObserverx - horizontal positiony - vertical positionpublic java.lang.String getName()
IGraphicalObservergetName in interface IGraphicalObserverpublic void update()
IGraphicalObserverupdate in interface IGraphicalObserver