Package repast.simphony.ui
Class RSGui
java.lang.Object
repast.simphony.ui.RSGui
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
,saf.core.ui.event.DockableFrameListener
public class RSGui
extends Object
implements saf.core.ui.event.DockableFrameListener, PropertyChangeListener
Mediator for gui manipulation.
- Version:
- $Revision: 1.2 $ $Date: 2006/01/03 15:24:30 $
- Author:
- Nick Collier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCustomUserPanel
(JPanel panel) saf.core.ui.dock.DockableFrame
addLogView
(String id, String title, JComponent comp) addParameterView
(Parameters params, File currentDirectory, RSApplication rsApp) void
saf.core.ui.dock.DockableFrame
addProbeView
(String id, String title, JPanel panel) void
addRunOptionsView
(RunOptionsModel model) void
addViewListener
(saf.core.ui.event.DockableFrameListener listener) Adds the specified listener as a listener for view events.void
addViewsFromRegistry
(GUIRegistry registry, ProbeManager probeManager) saf.core.ui.dock.DockableFrame
addVizualization
(String name, JComponent component) void
dockableClosed
(saf.core.ui.event.DockableFrameEvent viewEvent) void
dockableClosing
(saf.core.ui.event.DockableFrameEvent arg0) void
dockableFloated
(saf.core.ui.event.DockableFrameEvent viewEvent) void
dockableFloating
(saf.core.ui.event.DockableFrameEvent arg0) void
dockableMaximized
(saf.core.ui.event.DockableFrameEvent viewEvent) void
dockableMaximizing
(saf.core.ui.event.DockableFrameEvent evt) void
dockableMinimized
(saf.core.ui.event.DockableFrameEvent viewEvent) void
dockableMinimizing
(saf.core.ui.event.DockableFrameEvent evt) void
dockableRestored
(saf.core.ui.event.DockableFrameEvent viewEvent) void
dockableRestoring
(saf.core.ui.event.DockableFrameEvent arg0) saf.core.ui.dock.DockableFrame
getDockable
(String id) getFrame()
Gets the main application frame.Gets the current TickCountFormatter that is used to format the text in the tick label.getToolBar
(JComponent comp) boolean
void
void
Called when probed properties are updated.void
void
void
removeViewListener
(saf.core.ui.event.DockableFrameListener listener) Removes the specified listener as a listener for view events.void
reset()
void
resetLayout
(InputStream stream) Resets the layout using a layout file that defines the initial state.void
saveLayout
(File file) Saves the current frame layout to the specified file.void
setActiveView
(saf.core.ui.dock.DockableFrame dockable) void
void
void
void
void
void
void
setStatusBarText
(Color color, String text) Sets the status bar to the specified text and text color.void
setStatusBarText
(Font font, Color color, String text) Sets the status bar to the specified text and text color.void
setStatusBarText
(String text) Sets the status bar to the specified text..void
setTickCountFormatter
(TickCountFormatter formatter) Sets the current TickCountFormatter that is used to format the text in the tick label.void
void
updateProbePanel
(Probe probe, MutableParameters params) void
updateTickCountLabel
(double newTick)
-
Constructor Details
-
RSGui
-
-
Method Details
-
getDockable
-
addLogView
-
resetLayout
Resets the layout using a layout file that defines the initial state. -
saveLayout
Saves the current frame layout to the specified file.- Parameters:
file
- the file to save the layout to
-
addVizualization
-
addViewListener
public void addViewListener(saf.core.ui.event.DockableFrameListener listener) Adds the specified listener as a listener for view events. View events are such things as view closed, iconified, etc.- Parameters:
listener
- the listener to add
-
removeViewListener
public void removeViewListener(saf.core.ui.event.DockableFrameListener listener) Removes the specified listener as a listener for view events. View events are such things as view closed, iconified, etc.- Parameters:
listener
- the listener to remove
-
addViewsFromRegistry
-
reset
public void reset() -
removeParameterViews
public void removeParameterViews() -
updateProbePanel
-
addPlaceHolderUserPanel
public void addPlaceHolderUserPanel() -
addCustomUserPanel
-
hasCustomUserPanelDefined
public boolean hasCustomUserPanelDefined() -
removeCustomUserPanel
public void removeCustomUserPanel() -
addRunOptionsView
-
addParameterView
public ParametersUI addParameterView(Parameters params, File currentDirectory, RSApplication rsApp) throws FileNotFoundException, XMLStreamException -
setGUIForStarted
public void setGUIForStarted() -
setGUIForStepped
public void setGUIForStepped() -
setGUIForPaused
public void setGUIForPaused() -
setGUIForStopped
public void setGUIForStopped() -
setGUIForPostSimInit
public void setGUIForPostSimInit() -
setGUIForModelLoaded
public void setGUIForModelLoaded() -
init
-
getTickCountFormatter
Gets the current TickCountFormatter that is used to format the text in the tick label.- Returns:
- the current TickCountFormatter that is used to format the text in the tick label.
-
setTickCountFormatter
Sets the current TickCountFormatter that is used to format the text in the tick label.- Parameters:
formatter
- the formatter to use
-
updateTickCountLabel
public void updateTickCountLabel(double newTick) -
setStatusBarText
Sets the status bar to the specified text..- Parameters:
text
- the new status bar text
-
setStatusBarText
Sets the status bar to the specified text and text color.- Parameters:
color
- the new colortext
- the new text
-
setStatusBarText
Sets the status bar to the specified text and text color.- Parameters:
font
- the new fontcolor
- the new colortext
- the new text
-
setTitle
-
getFrame
Gets the main application frame.- Returns:
- the main application frame.
-
getToolBar
-
dockableClosed
public void dockableClosed(saf.core.ui.event.DockableFrameEvent viewEvent) - Specified by:
dockableClosed
in interfacesaf.core.ui.event.DockableFrameListener
-
dockableFloated
public void dockableFloated(saf.core.ui.event.DockableFrameEvent viewEvent) - Specified by:
dockableFloated
in interfacesaf.core.ui.event.DockableFrameListener
-
dockableMaximized
public void dockableMaximized(saf.core.ui.event.DockableFrameEvent viewEvent) - Specified by:
dockableMaximized
in interfacesaf.core.ui.event.DockableFrameListener
-
dockableMinimized
public void dockableMinimized(saf.core.ui.event.DockableFrameEvent viewEvent) - Specified by:
dockableMinimized
in interfacesaf.core.ui.event.DockableFrameListener
-
dockableRestored
public void dockableRestored(saf.core.ui.event.DockableFrameEvent viewEvent) - Specified by:
dockableRestored
in interfacesaf.core.ui.event.DockableFrameListener
-
setActiveView
public void setActiveView(saf.core.ui.dock.DockableFrame dockable) -
addProbeView
-
showError
-
propertyChange
Called when probed properties are updated.- Specified by:
propertyChange
in interfacePropertyChangeListener
-
dockableClosing
public void dockableClosing(saf.core.ui.event.DockableFrameEvent arg0) - Specified by:
dockableClosing
in interfacesaf.core.ui.event.DockableFrameListener
-
dockableFloating
public void dockableFloating(saf.core.ui.event.DockableFrameEvent arg0) - Specified by:
dockableFloating
in interfacesaf.core.ui.event.DockableFrameListener
-
dockableRestoring
public void dockableRestoring(saf.core.ui.event.DockableFrameEvent arg0) - Specified by:
dockableRestoring
in interfacesaf.core.ui.event.DockableFrameListener
-
dockableMaximizing
public void dockableMaximizing(saf.core.ui.event.DockableFrameEvent evt) - Specified by:
dockableMaximizing
in interfacesaf.core.ui.event.DockableFrameListener
-
dockableMinimizing
public void dockableMinimizing(saf.core.ui.event.DockableFrameEvent evt) - Specified by:
dockableMinimizing
in interfacesaf.core.ui.event.DockableFrameListener
-