Class RolesPopulationLineChartDrawer


public class RolesPopulationLineChartDrawer extends LineChartDrawer<Probe>
A Viewer that displays the population of roles in the artificial organization
  • Constructor Details

    • RolesPopulationLineChartDrawer

      public RolesPopulationLineChartDrawer()
  • Method Details

    • onActivation

      protected void onActivation()
      Description copied from class: LineChartDrawer
      This method is called when the agent is activated. By default, it requests the role SimuOrganization.VIEWER_ROLE in the group SimuOrganization.ENGINE_GROUP.

      The GUI is initialized with a LineChart as the central node.

      Overrides:
      onActivation in class LineChartDrawer<Probe>
    • getLineChartTitle

      protected String getLineChartTitle()
      Gets the title of the line chart
      Specified by:
      getLineChartTitle in class LineChartDrawer<Probe>
      Returns:
      the title of the line chart
    • getyAxisLabel

      protected String getyAxisLabel()
      Gets the label of the y axis
      Specified by:
      getyAxisLabel in class LineChartDrawer<Probe>
      Returns:
      the label of the y-axis of the line chart
    • getxAxisLabel

      protected String getxAxisLabel()
      Gets the label of the x axis
      Specified by:
      getxAxisLabel in class LineChartDrawer<Probe>
      Returns:
      the label of the x-axis of the line chart
    • display

      public void display()
      The display method called by the simulation engine. It displays the population of roles at the current time in the simulation.
      Overrides:
      display in class Viewer
    • addRoleToMonitoring

      protected void addRoleToMonitoring(String group, String role)
      Adds a role to the monitoring
      Parameters:
      group - the group to monitor
      role - the role to monitor
    • render

      public void render()
      Description copied from class: Viewer
      Renders the simulation state. This method is called by the GUI bounded to this agent when it is time to render the simulation state. The rendering is done in the JavaFX thread.
      Specified by:
      render in class Viewer