Package megamek.client.ui.preferences
Class PreferencesNode
java.lang.Object
megamek.client.ui.preferences.PreferencesNode
Represents a group of
PreferenceElements that are part of the same Class.
This class is not thread-safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method should only be called once.Class<?> getNode()voidinitialize(Map<String, String> initialValues) Sets the initial values for elements managed for this node.booleanbooleanvoidmanage(PreferenceElement... elements) Adds new elements to be managed by this node.voidsetFinalized(boolean finalized) voidsetInitialized(boolean initialized) voidsetInitialValues(Map<String, String> initialValues)
-
Constructor Details
-
PreferencesNode
-
-
Method Details
-
getNode
-
getElements
-
getInitialValues
-
setInitialValues
-
isInitialized
public boolean isInitialized() -
setInitialized
public void setInitialized(boolean initialized) -
isFinalized
public boolean isFinalized() -
setFinalized
public void setFinalized(boolean finalized) -
manage
Adds new elements to be managed by this node. If there are initial values set for this node, we will try to set an initial value for each element.- Parameters:
elements- the elements to manage.
-
initialize
Sets the initial values for elements managed for this node. This method should only be called once.- Parameters:
initialValues- the initial values for the elements.- Throws:
Exception- if initialization has already occurred
-
getFinalValues
This method should only be called once.- Returns:
- the final values of all the elements managed by this node.
- Throws:
Exception- if this method is called a second time
-