Class OppNetFrame

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, org.graphstream.ui.view.ViewerListener

public class OppNetFrame extends JFrame implements org.graphstream.ui.view.ViewerListener
A frame used to display and control a OppNetGraph. When the frame is displayed, the simulation is started. Buttons allows to stop/resume the simulation and open/close a console. Mouse clicks on nodes moving on the frame allow to tag/untag nodes. A background image or a background graph can be displayed on the frame. The image zoom is controled by the up/down keys.
See Also:
  • Constructor Details

  • Method Details

    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class Window
    • start

      public void start()
      Start playing the simulation.
    • stop

      public void stop()
      Stop playing the simulation.
    • end

      public void end()
      Stop the simulation in such a way that it will not be possible to start it again.
    • viewClosed

      public void viewClosed(String nodeId)
      Specified by:
      viewClosed in interface org.graphstream.ui.view.ViewerListener
    • buttonPushed

      public void buttonPushed(String nodeId)
      Specified by:
      buttonPushed in interface org.graphstream.ui.view.ViewerListener
    • buttonReleased

      public void buttonReleased(String nodeId)
      Add/remove the 'TAG' tag for the selected node.
      Specified by:
      buttonReleased in interface org.graphstream.ui.view.ViewerListener
    • pump

      public void pump()
      Allows the viewer to catch mouse event.