Class ParametersUI

java.lang.Object
repast.simphony.ui.parameters.ParametersUI

public class ParametersUI extends Object
Author:
Nick Collier
  • Field Details

  • Constructor Details

    • ParametersUI

      public ParametersUI(Parameters params)
  • Method Details

    • addBinder

      public void addBinder(String group, ParameterBinder creator, double displayOrder)
    • updatePanel

      public void updatePanel(File paramsFile) throws FileNotFoundException, XMLStreamException
      Updates the panel with the latest parameters from the parameters file.
      Throws:
      XMLStreamException
      FileNotFoundException
    • createPanel

      public JPanel createPanel(String parametersFile) throws FileNotFoundException, XMLStreamException
      Creates a JPanel that will display the specified parameters. This assumes the passed in parameters are identical to those used to make the creators that were added with addBinder.
      Parameters:
      params -
      Returns:
      the created JPanel.
      Throws:
      XMLStreamException
      FileNotFoundException
    • createPanel

      public JPanel createPanel(File parametersFile) throws FileNotFoundException, XMLStreamException
      Creates a JPanel that will display the specified parameters. This assumes the passed in parameters are identical to those used to make the creators that were added with addCreator.
      Parameters:
      params -
      Returns:
      the created JPanel.
      Throws:
      XMLStreamException
      FileNotFoundException
    • commitParameters

      public void commitParameters()
      Commits any changes made using the parameter JComponents to the specified params.
      Parameters:
      params - the Parameters to commmit the changes to
    • resetParameters

      public void resetParameters()
    • getDisplayOrder

      public Map<String,Double> getDisplayOrder()
      Gets GUI display order of the current parameters.
      Returns:
      the order (a double) of the display parameters by display id.
    • toXML

      public String toXML()
      Gets the parameter xml representation of the currently created parameter UI. The current values in the UI will become the default values.
      Returns:
      the XML.