Package repast.simphony.visualization
Interface IDisplay
-
- All Superinterfaces:
Renderer
- All Known Implementing Classes:
AbstractDisplay
,AbstractDisplay3D
,Display2D
,Display3D
,DisplayGIS
,DisplayGIS3D
,DisplayOGL2D
public interface IDisplay extends Renderer
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
Nested Classes Modifier and Type Interface Description static class
IDisplay.LayoutFrequency
Enum values for specifying the frequency of laying out a display.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
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.DisplayEditorLifecycle
createEditor(JPanel panel)
Deprecated.2D piccolo based code is being removedvoid
deIconified()
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<?,?>
getLayout()
Gets the layout the display usesJPanel
getPanel()
Gets a panel that contains the actual gui for visualization.void
iconified()
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
resetHomeView()
Resets the home (initial) view of the displayvoid
setLayout(Layout<?,?> layout)
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 Detail
-
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
void setLayout(Layout<?,?> layout)
Sets the Layout for the display to use.- Parameters:
layout
- the layout to use
-
addDisplayListener
void addDisplayListener(DisplayListener listener)
Adds a display listener to this display.- Parameters:
listener
- the listener to add
-
setLayoutFrequency
void setLayoutFrequency(IDisplay.LayoutFrequency frequency, int interval)
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
void registerToolBar(JToolBar bar)
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
void addProbeListener(ProbeListener listener)
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
DisplayEditorLifecycle createEditor(JPanel panel)
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
-
-