Class RuntimeController

java.lang.Object
org.moeaframework.util.mvc.Controller
org.moeaframework.analysis.viewer.RuntimeController
All Implemented Interfaces:
EventListener, SettingChangedListener

public class RuntimeController extends Controller implements SettingChangedListener
Controller for the RuntimeViewer.
  • Constructor Details

    • RuntimeController

      public RuntimeController(RuntimeViewer viewer)
      Constructs a new controller with no data.
      Parameters:
      viewer - the viewer
  • Method Details

    • getPointSize

      public Setting<Integer> getPointSize()
      Returns the setting for the chart's point size, a value greater than 0.
      Returns:
      the point size setting
    • getPointTransparency

      public Setting<Integer> getPointTransparency()
      Returns the setting for the chart's transparency, a value between 0 and 100.
      Returns:
      the point transparency setting
    • getFitMode

      public Setting<RuntimeController.FitMode> getFitMode()
      Returns the setting for the chart's fit or scaling mode.
      Returns:
      the fit mode setting
    • getShowReferenceSet

      public Toggle getShowReferenceSet()
      Returns the toggle for optionally displaying the reference set.
      Returns:
      the reference set toggle
    • setReferenceSet

      public void setReferenceSet(NondominatedPopulation population)
      Sets or updates the reference set displayed in the plot.
      Parameters:
      population - the reference set population
    • getReferenceSet

      public org.moeaframework.analysis.viewer.RuntimeViewer.PlotSeries getReferenceSet()
      Returns the reference set.
      Returns:
      the reference set
    • addSeries

      public void addSeries(String name, ResultSeries series)
      Adds a series to the plot.
      Parameters:
      name - the name of the series
      series - the series itself
    • removeSeries

      public void removeSeries(int index)
      Removes a series from the plot.
      Parameters:
      index - the index of the series to remove
    • getSeries

      public List<org.moeaframework.analysis.viewer.RuntimeViewer.PlotSeries> getSeries()
      Returns all series included in the plot.
      Returns:
      all series
    • getStartingIndex

      public int getStartingIndex()
      Returns the starting or minimum index value. This value is derived from the individual series and can change when the model is updated.
      Returns:
      the starting index
    • getEndingIndex

      public int getEndingIndex()
      Returns the ending or maximum index value. This value is derived from the individual series and can change when the model is updated.
      Returns:
      the starting index
    • getStepSize

      public int getStepSize()
      Returns the step size for iterating over indices. This value is derived from the individual series and can change when the model is updated.
      Returns:
      the step size
    • getIndexType

      public IndexType getIndexType()
      Returns the index type. This value is derived from the individual series and can change when the model is updated.
      Returns:
      the index type
    • getCurrentIndex

      public int getCurrentIndex()
      Returns the current index being displayed.
      Returns:
      the current index
    • setCurrentIndex

      public void setCurrentIndex(int index)
      Sets the current index to display.
      Parameters:
      index - the new index
    • updateModel

      public void updateModel()
      Updates the derived values and triggers a "modelChanged" event.
    • play

      public void play()
      Starts the playback timer, which iterates through the indices displayed in the plot. Has no effect if playback is already started.
    • stop

      public void stop()
      Stops the playback timer.
    • isRunning

      public boolean isRunning()
      Returns true if playback is running; false otherwise.
      Returns:
      true if playback is running; false otherwise
    • settingChanged

      public void settingChanged(SettingChangedEvent event)
      Description copied from interface: SettingChangedListener
      Called when the value of a setting changed.
      Specified by:
      settingChanged in interface SettingChangedListener
      Parameters:
      event - details of the change