|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthenplus.property.PropertyHolder
henplus.property.EnumeratedPropertyHolder
public abstract class EnumeratedPropertyHolder
A PropertyHolder, that can change its values to a fixed set of values.
Field Summary |
---|
Fields inherited from class henplus.property.PropertyHolder |
---|
_propertyValue |
Constructor Summary | |
---|---|
EnumeratedPropertyHolder(Collection values)
same with collection as Input. |
|
EnumeratedPropertyHolder(String[] enumeratedValues)
create a new EnumeratedPropertyHolder that gets an array of Strings with possible values of this property. |
Method Summary | |
---|---|
Iterator |
completeValue(String partialValue)
given a partial value of a to-be-set value, this will return an iterator of possible values possible at that point or 'null' if no such completion can take place. |
protected abstract void |
enumeratedPropertyChanged(int index,
String value)
to be overridden to get informed of the change and veto it. |
protected String |
propertyChanged(String newValue)
do not override this method but the enumeratedPropertyChanged(int, String) method instead. |
Methods inherited from class henplus.property.PropertyHolder |
---|
getDefaultValue, getLongDescription, getShortDescription, getValue, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumeratedPropertyHolder(String[] enumeratedValues)
enumeratedValues
- the Values this property can take.public EnumeratedPropertyHolder(Collection values)
Method Detail |
---|
protected final String propertyChanged(String newValue) throws Exception
enumeratedPropertyChanged(int, String)
method instead.
propertyChanged
in class PropertyHolder
newValue
- a new value of the property. The old value
is still accessible with the PropertyHolder.getValue()
method.
Exception
protected abstract void enumeratedPropertyChanged(int index, String value) throws Exception
index
- the index of the property that changedvalue
- the new value of that property
Exception
- to veto that change.public Iterator completeValue(String partialValue)
PropertyHolder
completeValue
in class PropertyHolder
partialValue
- a partial given value
null
if no such completion exists.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |