Package repast.simphony.ui.parameters
Class ParametersUI
- java.lang.Object
-
- repast.simphony.ui.parameters.ParametersUI
-
public class ParametersUI extends Object
- Author:
- Nick Collier
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_PARAM_GROUP
static double
LAST
static String
NAME
-
Constructor Summary
Constructors Constructor Description ParametersUI(Parameters params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBinder(String group, ParameterBinder creator, double displayOrder)
void
commitParameters()
Commits any changes made using the parameter JComponents to the specified params.JPanel
createPanel(File parametersFile)
Creates a JPanel that will display the specified parameters.JPanel
createPanel(String parametersFile)
Creates a JPanel that will display the specified parameters.Map<String,Double>
getDisplayOrder()
Gets GUI display order of the current parameters.void
resetParameters()
String
toXML()
Gets the parameter xml representation of the currently created parameter UI.void
updatePanel(File paramsFile)
Updates the panel with the latest parameters from the parameters file.
-
-
-
Field Detail
-
DEFAULT_PARAM_GROUP
public static final String DEFAULT_PARAM_GROUP
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
LAST
public static final double LAST
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ParametersUI
public ParametersUI(Parameters params)
-
-
Method Detail
-
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.
-
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.
-
-