Interface VisualizationModel<V,E>

All Superinterfaces:
ChangeEventSupport
All Known Implementing Classes:
DefaultVisualizationModel

public interface VisualizationModel<V,E> extends ChangeEventSupport
Interface for the state holding model of the VisualizationViewer. Refactored and extracted from the 1.6.0 version of VisualizationViewer
  • Method Details

    • getRelaxer

      Relaxer getRelaxer()
    • setGraphLayout

      void setGraphLayout(Layout<V,E> layout)
      set the graph Layout
      Parameters:
      layout - the layout to use
    • setGraphLayout

      void setGraphLayout(Layout<V,E> layout, Dimension d)
      Sets the graph Layout and initialize the Layout size to the passed dimensions. The passed Dimension will often be the size of the View that will display the graph.
      Parameters:
      layout - the layout to use
      d - the dimensions to use
    • getGraphLayout

      Layout<V,E> getGraphLayout()
      Returns:
      the current graph layout
    • addChangeListener

      void addChangeListener(ChangeListener l)
      Register l as a listeners to changes in the model. The View registers in order to repaint itself when the model changes.
      Specified by:
      addChangeListener in interface ChangeEventSupport
      Parameters:
      l - the listener to add
    • removeChangeListener

      void removeChangeListener(ChangeListener l)
      Removes a ChangeListener.
      Specified by:
      removeChangeListener in interface ChangeEventSupport
      Parameters:
      l - the listener to be removed
    • getChangeListeners

      ChangeListener[] getChangeListeners()
      Returns an array of all the ChangeListeners added with addChangeListener().
      Specified by:
      getChangeListeners in interface ChangeEventSupport
      Returns:
      all of the ChangeListeners added or an empty array if no listeners have been added