Package docking.wizard
Class WizardState<T>
- java.lang.Object
-
- docking.wizard.WizardState<T>
-
- All Implemented Interfaces:
java.lang.Cloneable
public class WizardState<T> extends java.lang.Object implements java.lang.Cloneable
-
-
Constructor Summary
Constructors Constructor Description WizardState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDependency(T dependent, T predecessor)Defines a dependency from one property to another.voidclear(T key)Removes the property key,value pair from this wizard state.protected java.lang.Objectclone()java.lang.Objectget(T key)Gets the value for a property key.voidput(T key, java.lang.Object value)Sets the property value for a given property key.
-
-
-
Method Detail
-
clone
protected java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
get
public java.lang.Object get(T key)
Gets the value for a property key.- Parameters:
key- the identifier for the property. Typically, it would be a string or enum.- Returns:
- the value associated with the given property key or null if the property has no value.
-
put
public void put(T key, java.lang.Object value)
Sets the property value for a given property key. Also clears out the property values for any properties that depend on this property.- Parameters:
key- the propertyKey whose value is to be set or changed with the new value.value- the new value for the property.
-
clear
public void clear(T key)
Removes the property key,value pair from this wizard state.- Parameters:
key- the property key of the property to be cleared.
-
addDependency
public void addDependency(T dependent, T predecessor)
Defines a dependency from one property to another. A property dependency has the effect of clear the dependent's property value whenever the predecessor property is changed or cleared.- Parameters:
dependent- the property whose value is to be cleared when the predecessor property is changed or cleared.predecessor- the property that, when changed or cleared, will cause the dependent property to be cleared.
-
-