public class ObserverCenter extends java.lang.Object implements IObserverCenter
Modifier and Type | Field and Description |
---|---|
protected IClockService |
clock |
protected IChangeListener |
clocklistener
The clock listener for sync gui updates.
|
protected boolean |
disposed
Flag to indicate that observer is disposed.
|
protected boolean |
killonexit
Kill the application on exit.
|
protected java.util.List |
selectedObjectListeners
Selected object listeners
|
Constructor and Description |
---|
ObserverCenter() |
Modifier and Type | Method and Description |
---|---|
void |
addDataView(java.lang.String name,
IDataView dataview)
Adds an additional dataview.
|
IFuture<java.lang.Void> |
addPerspective(java.lang.String name,
IPerspective perspective)
Adds a perspective.
|
void |
addSelectedObjectListener(javax.swing.event.ChangeListener listener)
Adds a listener for change of the selected object
|
void |
dispose()
Dispose the observer center.
|
void |
fireSelectedObjectChange()
Fires a selected object change event.
|
java.lang.ClassLoader |
getClassLoader()
Get the class loader.
|
java.util.Map |
getDataViews()
Returns the available dataviews.
|
java.util.Map |
getPerspectives()
Returns the available perspectives.
|
IDataView |
getSelectedDataView()
Returns the selected dataview.
|
java.lang.String |
getSelectedDataViewName()
Returns the selected dataview name.
|
IPerspective |
getSelectedPerspective()
Returns the selected perspective.
|
AbstractEnvironmentSpace |
getSpace()
Returns the space.
|
protected void |
internalLoadPlugins(java.util.List customplugins) |
void |
loadPlugins(java.util.List customplugins)
Loads all available plugins
|
void |
removeSelectedObjectListener(javax.swing.event.ChangeListener listener)
Removes a listener for change of the selected object
|
void |
setOpenGLMode(java.lang.String name,
boolean opengl)
Sets the OpenGL mode for a perspective
|
void |
setSelectedDataView(java.lang.String name)
Sets the selected dataview.
|
void |
setSelectedPerspective(java.lang.String name)
Sets the selected perspective.
|
void |
startObserver(java.lang.String title,
IEnvironmentSpace space,
java.lang.ClassLoader classloader,
boolean killonexit)
Starts an observer center.
|
protected java.util.List selectedObjectListeners
protected IChangeListener clocklistener
protected boolean killonexit
protected IClockService clock
protected boolean disposed
public void startObserver(java.lang.String title, IEnvironmentSpace space, java.lang.ClassLoader classloader, boolean killonexit)
startObserver
in interface IObserverCenter
title
- title of the observer windowspace
- the space being observedclassloader
- the application class loader for loading resources (images etc.)plugins
- custom plugins used in the observerpublic void addDataView(java.lang.String name, IDataView dataview)
name
- name of the dataviewdataview
- an additional dataviewpublic java.util.Map getDataViews()
public IDataView getSelectedDataView()
getSelectedDataView
in interface IObserverCenter
public java.lang.String getSelectedDataViewName()
public void setSelectedDataView(java.lang.String name)
name
- name of the dataview to be selectedpublic IFuture<java.lang.Void> addPerspective(java.lang.String name, IPerspective perspective)
addPerspective
in interface IObserverCenter
name
- name of the perspectiveperspective
- the perspectivepublic java.util.Map getPerspectives()
public IPerspective getSelectedPerspective()
public void setSelectedPerspective(java.lang.String name)
name
- name of the perspectivepublic void setOpenGLMode(java.lang.String name, boolean opengl)
name
- name of the perspectiveopengl
- true to activate OpenGL modepublic AbstractEnvironmentSpace getSpace()
getSpace
in interface IObserverCenter
public void addSelectedObjectListener(javax.swing.event.ChangeListener listener)
object
- listenerpublic void removeSelectedObjectListener(javax.swing.event.ChangeListener listener)
object
- listenerpublic void fireSelectedObjectChange()
fireSelectedObjectChange
in interface IObserverCenter
public void loadPlugins(java.util.List customplugins)
loadPlugins
in interface IObserverCenter
customplugins
- custom plugins used in addition to standard pluginsprotected void internalLoadPlugins(java.util.List customplugins)
public void dispose()
dispose
in interface IObserverCenter
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface IObserverCenter