Class SimpleProperty<T>
- java.lang.Object
-
- org.eclipse.emfforms.internal.common.SimpleProperty<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.emfforms.common.Property
Property.ChangeListener<T>
-
-
Constructor Summary
Constructors Constructor Description SimpleProperty(java.lang.String name, T defaultValue)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChangeListener(Property.ChangeListener<T> listener)Attach a listener.voiddispose()Dispose the value.TgetDefault()Returns the default value.java.lang.StringgetName()Get the name of the property.TgetValue()Get the current value.voidremoveChangeListener(Property.ChangeListener<T> listener)Remove the listener.TresetToDefault()Resets the value to the initial value and returns the new value.voidsetValue(T value)Set the new value.
-
-
-
Constructor Detail
-
SimpleProperty
public SimpleProperty(java.lang.String name, T defaultValue)The constructor.- Parameters:
name- the name of the propertydefaultValue- the default value
-
-
Method Detail
-
setValue
public void setValue(T value)
Description copied from interface:PropertySet the new value.
-
getName
public java.lang.String getName()
Description copied from interface:PropertyGet the name of the property.
-
getDefault
public T getDefault()
Description copied from interface:PropertyReturns the default value.- Specified by:
getDefaultin interfaceProperty<T>- Returns:
- the value
-
resetToDefault
public T resetToDefault()
Description copied from interface:PropertyResets the value to the initial value and returns the new value.- Specified by:
resetToDefaultin interfaceProperty<T>- Returns:
- the value
-
dispose
public void dispose()
Description copied from interface:PropertyDispose the value.
-
addChangeListener
public void addChangeListener(Property.ChangeListener<T> listener)
Description copied from interface:PropertyAttach a listener.- Specified by:
addChangeListenerin interfaceProperty<T>- Parameters:
listener- the listener
-
removeChangeListener
public void removeChangeListener(Property.ChangeListener<T> listener)
Description copied from interface:PropertyRemove the listener.- Specified by:
removeChangeListenerin interfaceProperty<T>- Parameters:
listener- the listener
-
-