Package repast.simphony.visualization
Interface IDisplay
- All Superinterfaces:
Renderer
- All Known Implementing Classes:
AbstractDisplay
,AbstractDisplay3D
,Display2D
,Display3D
,DisplayGIS
,DisplayGIS3D
,DisplayOGL2D
Interface for displays used in repast simphony. Classes that implement this
interface can provide custom displays.
- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:35 $
- Author:
- Nick Collier
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Enum values for specifying the frequency of laying out a display. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDisplayListener
(DisplayListener listener) Adds a display listener to this display.void
addProbeListener
(ProbeListener listener) Adds a probe listener to listen for probe events produced by this IDisplay.void
closed()
Notifies this IDisplay that its associated gui widget has been closed.createEditor
(JPanel panel) Deprecated.2D piccolo based code is being removedvoid
Notifies this IDisplay that its associated gui widget has been deIconified.void
destroy()
Destroys the display, allowing it to free any resources it may have acquired.Layout<?,
?> Gets the layout the display usesgetPanel()
Gets a panel that contains the actual gui for visualization.void
Notifies this IDisplay that its associated gui widget has been iconified.void
init()
Initializes the display.void
registerToolBar
(JToolBar bar) Registers the specified toolbar with this IDisplay.void
Resets the home (initial) view of the displayvoid
Sets the Layout for the display to use.void
setLayoutFrequency
(IDisplay.LayoutFrequency frequency, int interval) Sets the frequency of the layout.void
update()
Updates the state of the display to reflect whatever it is that it is displaying.
-
Method Details
-
update
void update()Updates the state of the display to reflect whatever it is that it is displaying. -
init
void init()Initializes the display. Called once before the display is made visible. -
setLayout
Sets the Layout for the display to use.- Parameters:
layout
- the layout to use
-
addDisplayListener
Adds a display listener to this display.- Parameters:
listener
- the listener to add
-
setLayoutFrequency
Sets the frequency of the layout.- Parameters:
frequency
- the frequency of the layoutinterval
- the interval if the frequency is AT_INTERVAL. The interval is in terms of number of calls to update()
-
getPanel
JPanel getPanel()Gets a panel that contains the actual gui for visualization.- Returns:
- a panel that contains the actual gui for visualization.
-
registerToolBar
Registers the specified toolbar with this IDisplay. This IDisplay can then put buttons etc. are on this toolbar.- Parameters:
bar
- the bar to register
-
destroy
void destroy()Destroys the display, allowing it to free any resources it may have acquired. -
iconified
void iconified()Notifies this IDisplay that its associated gui widget has been iconified. -
deIconified
void deIconified()Notifies this IDisplay that its associated gui widget has been deIconified. -
closed
void closed()Notifies this IDisplay that its associated gui widget has been closed. -
addProbeListener
Adds a probe listener to listen for probe events produced by this IDisplay.- Parameters:
listener
- the listener to add
-
getLayout
Layout<?,?> getLayout()Gets the layout the display uses- Returns:
- a layout object
-
createEditor
Deprecated.2D piccolo based code is being removedCreates an DisplayEditor appropriate for editing this display.- Parameters:
panel
- a JPanel with a BorderLayout to which editor components can be added- Returns:
- an DisplayEditor appropriate for editing this display or null if this display cannot be edited.
-
resetHomeView
void resetHomeView()Resets the home (initial) view of the display
-