java.lang.Object
repast.simphony.visualization.AbstractDisplay
repast.simphony.visualization.visualization2D.Display2D
All Implemented Interfaces:
WindowListener, EventListener, Renderer, ProjectionListener, IDisplay

public class Display2D extends AbstractDisplay implements WindowListener
Deprecated.
replaced by ogl 2D
  • Field Details

    • DISPLAY_HEIGHT

      public static int DISPLAY_HEIGHT
      Deprecated.
    • DISPLAY_WIDTH

      public static int DISPLAY_WIDTH
      Deprecated.
    • lock

      protected final Object lock
      Deprecated.
    • classStyleMap

      protected Map<Class,IDisplayLayer2D> classStyleMap
      Deprecated.
    • objectStyleMap

      protected Map<Object,IDisplayLayer2D> objectStyleMap
      Deprecated.
    • valueDisplayLayer

      protected ValueDisplayLayer2D valueDisplayLayer
      Deprecated.
    • layout

      protected Layout layout
      Deprecated.
    • layoutUpdater

      protected LayoutUpdater layoutUpdater
      Deprecated.
    • initData

      protected DisplayData<?> initData
      Deprecated.
    • iconified

      protected boolean iconified
      Deprecated.
    • panel

      protected JPanel panel
      Deprecated.
    • renderer

      protected Runnable renderer
      Deprecated.
    • updater

      protected repast.simphony.visualization.visualization2D.Display2D.Updater updater
      Deprecated.
    • canvas

      protected RepastCanvas2D canvas
      Deprecated.
    • decoratorMap

      protected Map<String,ProjectionDecorator2D> decoratorMap
      Deprecated.
    • valueLayers

      protected Iterable<ValueLayer> valueLayers
      Deprecated.
    • doRender

      protected boolean doRender
      Deprecated.
    • showHoverProbes

      protected boolean showHoverProbes
      Deprecated.
    • hoverProbe

      protected org.piccolo2d.nodes.PPath hoverProbe
      Deprecated.
    • hoverProbeBox

      protected org.piccolo2d.nodes.PPath hoverProbeBox
      Deprecated.
    • lastProbedObject

      protected Object lastProbedObject
      Deprecated.
    • pause

      protected boolean pause
      Deprecated.
  • Constructor Details

  • Method Details

    • getInitData

      public DisplayData getInitData()
      Deprecated.
      Gets the data used to initialize this display.
      Returns:
      the data used to initialize this display.
    • initScene

      protected void initScene()
      Deprecated.
    • findObjForItem

      public Object findObjForItem(org.piccolo2d.PNode node)
      Deprecated.
      Finds the object for which the specified PNode is the representation.
      Parameters:
      node - the representational PNode
      Returns:
      the object for which the specified PNode is the representation or null if the object is not found.
    • getprobedObjects

      protected List<Object> getprobedObjects(org.piccolo2d.util.PPickPath path, Point2D probeLocation)
      Deprecated.
      Returns a list of agents at the probe location
      Parameters:
      path - the path at the probe location
      probeLocation - the probe location
      Returns:
      the list of agents at the probe location.
    • registerDecorator

      public void registerDecorator(ProjectionDecorator2D decorator)
      Deprecated.
    • init

      public void init()
      Deprecated.
      Description copied from interface: IDisplay
      Initializes the display. Called once before the display is made visible.
      Specified by:
      init in interface IDisplay
    • setBoundingBox

      public void setBoundingBox(BoundingBox box)
      Deprecated.
    • registerStyle

      public void registerStyle(Class clazz, Style2D style)
      Deprecated.
    • registerNetworkStyle

      public void registerNetworkStyle(Network topology, EdgeStyle2D style)
      Deprecated.
    • registerValueLayerStyle

      public void registerValueLayerStyle(ValueLayerStyle style)
      Deprecated.
    • createPanel

      public void createPanel()
      Deprecated.
    • render

      public void render()
      Deprecated.
      The render method is alled each time the simulation runner thread steps the schedule.
      Specified by:
      render in interface Renderer
    • forceRender

      public void forceRender()
      Deprecated.
      Need to render displays when the sim is paused and initialized, because the display won't render with Display2D.render() if it is hidden.
    • destroy

      public void destroy()
      Deprecated.
      Description copied from class: AbstractDisplay
      Destroys the display, allowing it to free any resources it may have acquired.
      Specified by:
      destroy in interface IDisplay
      Overrides:
      destroy in class AbstractDisplay
    • getPanel

      public JPanel getPanel()
      Deprecated.
      Description copied from interface: IDisplay
      Gets a panel that contains the actual gui for visualization.
      Specified by:
      getPanel in interface IDisplay
      Returns:
      a panel that contains the actual gui for visualization.
    • addObject

      protected void addObject(Object o)
      Deprecated.
      Specified by:
      addObject in class AbstractDisplay
    • moveObject

      protected void moveObject(Object o)
      Deprecated.
      Specified by:
      moveObject in class AbstractDisplay
    • findLayer

      protected IDisplayLayer2D findLayer(Object obj)
      Deprecated.
    • removeObject

      protected void removeObject(Object o)
      Deprecated.
      Specified by:
      removeObject in class AbstractDisplay
    • setLayout

      public void setLayout(Layout layout)
      Deprecated.
      Description copied from interface: IDisplay
      Sets the Layout for the display to use.
      Specified by:
      setLayout in interface IDisplay
      Parameters:
      layout - the layout to use
    • setLayoutFrequency

      public void setLayoutFrequency(IDisplay.LayoutFrequency frequency, int interval)
      Deprecated.
      Description copied from interface: IDisplay
      Sets the frequency of the layout.
      Specified by:
      setLayoutFrequency in interface IDisplay
      Parameters:
      frequency - the frequency of the layout
      interval - the interval if the frequency is AT_INTERVAL. The interval is in terms of number of calls to update()
    • update

      public void update()
      Deprecated.
      The update method is called according to the frequency in the display descriptor. First the layoutUpdater.update() is called to calculate the new positions for objects, then the doRender flag is set so that the next render() call renders the updates, then the updater runnable is executed in the event dispatch thread.
      Specified by:
      update in interface IDisplay
    • getVisualItem

      public org.piccolo2d.PNode getVisualItem(Object o)
      Deprecated.
    • windowActivated

      public void windowActivated(WindowEvent arg0)
      Deprecated.
      Specified by:
      windowActivated in interface WindowListener
    • windowClosed

      public void windowClosed(WindowEvent arg0)
      Deprecated.
      Specified by:
      windowClosed in interface WindowListener
    • windowClosing

      public void windowClosing(WindowEvent arg0)
      Deprecated.
      Specified by:
      windowClosing in interface WindowListener
    • windowDeactivated

      public void windowDeactivated(WindowEvent arg0)
      Deprecated.
      Specified by:
      windowDeactivated in interface WindowListener
    • windowDeiconified

      public void windowDeiconified(WindowEvent e)
      Deprecated.
      Specified by:
      windowDeiconified in interface WindowListener
    • windowIconified

      public void windowIconified(WindowEvent e)
      Deprecated.
      Specified by:
      windowIconified in interface WindowListener
    • windowOpened

      public void windowOpened(WindowEvent arg0)
      Deprecated.
      Specified by:
      windowOpened in interface WindowListener
    • setPause

      public void setPause(boolean pause)
      Deprecated.
      Description copied from interface: Renderer
      Pause the rendering. The Renderer should update and render if pause is true, if possible. The rendering should take place asynchronously on the AWT thread.
      Specified by:
      setPause in interface Renderer
    • iconified

      public void iconified()
      Deprecated.
      Notifies this IDisplay that its associated gui widget has been iconified.
      Specified by:
      iconified in interface IDisplay
    • closed

      public void closed()
      Deprecated.
      Notifies this IDisplay that its associated gui widget has been closed.
      Specified by:
      closed in interface IDisplay
    • deIconified

      public void deIconified()
      Deprecated.
      Notifies this IDisplay that its associated gui widget has been deIconified.
      Specified by:
      deIconified in interface IDisplay
    • getLayout

      public Layout getLayout()
      Deprecated.
      Gets the layout.
      Specified by:
      getLayout in interface IDisplay
      Returns:
      the layout.
    • getRegisteredClasses

      public List<Class> getRegisteredClasses()
      Deprecated.
      Gets the classes for which styles have been registered.
      Returns:
      the classes for which styles have been registered.
    • createEditor

      public DisplayEditorLifecycle createEditor(JPanel panel)
      Deprecated.
      Creates an DisplayEditor appropriate for editing this display.
      Specified by:
      createEditor in interface IDisplay
      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

      public void resetHomeView()
      Deprecated.
      Description copied from interface: IDisplay
      Resets the home (initial) view of the display
      Specified by:
      resetHomeView in interface IDisplay
    • setBackgroundColor

      public void setBackgroundColor(Color color)
      Deprecated.
    • registerToolBar

      public void registerToolBar(JToolBar bar)
      Deprecated.
      Description copied from class: AbstractDisplay
      Registers the specified toolbar with this IDisplay. This IDisplay can then put buttons etc. are on this toolbar. This is a default no-op implementation.
      Specified by:
      registerToolBar in interface IDisplay
      Overrides:
      registerToolBar in class AbstractDisplay
      Parameters:
      bar - the bar to register
    • toggleInfoProbe

      public void toggleInfoProbe()
      Deprecated.