|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ctdp.rfdynhud.properties.Property
net.ctdp.rfdynhud.properties.ArrayProperty<E>
E
- the array element typepublic class ArrayProperty<E>
The ArrayProperty
serves for customizing a value from an array.
Constructor Summary | |
---|---|
ArrayProperty(java.lang.String name,
E defaultValue,
E[] array)
|
|
ArrayProperty(java.lang.String name,
E defaultValue,
E[] array,
boolean readonly)
|
|
ArrayProperty(java.lang.String name,
java.lang.String nameForDisplay,
E defaultValue,
E[] array)
|
|
ArrayProperty(java.lang.String name,
java.lang.String nameForDisplay,
E defaultValue,
E[] array,
boolean readonly)
|
|
ArrayProperty(java.lang.String name,
java.lang.String nameForDisplay,
E defaultValue,
E[] array,
boolean readonly,
java.lang.String buttonText)
|
Method Summary | |
---|---|
E[] |
getArray()
Gets the data array. |
E |
getDefaultValue()
Gets the default (initial) value fo this property. |
E |
getSelectedValue()
Gets the currently selected value. |
E |
getValue()
Gets the current value fo this property. |
void |
loadValue(PropertyLoader loader,
java.lang.String value)
Loads the value from the configuration file. |
protected void |
onKeeperSet()
|
protected void |
onValueChanged(E oldValue,
E newValue)
Invoked when the value has changed. |
boolean |
setSelectedValue(E value)
Sets the currently selected value. |
protected boolean |
setSelectedValue(E value,
boolean firstTime)
Sets the currently selected value. |
void |
setValue(java.lang.Object value)
Sets the new value for this property. |
Methods inherited from class net.ctdp.rfdynhud.properties.Property |
---|
getButtonText, getButtonTooltip, getDocumentationSource, getEditorType, getKeeper, getName, getNameForDisplay, getValueForConfigurationFile, hasDefaultValue, isMatchingKey, isReadOnly, onButtonClicked, quoteValueInConfigurationFile, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArrayProperty(java.lang.String name, java.lang.String nameForDisplay, E defaultValue, E[] array, boolean readonly, java.lang.String buttonText)
name
- the technical name used internally. See Property.getName()
.nameForDisplay
- the name displayed in the editor. See Property.getNameForDisplay()
. If null
is passed, the value of the name parameter is used.defaultValue
- the default valuearray
- the data arrayreadonly
- read only property?buttonText
- the button textpublic ArrayProperty(java.lang.String name, java.lang.String nameForDisplay, E defaultValue, E[] array, boolean readonly)
name
- the technical name used internally. See Property.getName()
.nameForDisplay
- the name displayed in the editor. See Property.getNameForDisplay()
. If null
is passed, the value of the name parameter is used.defaultValue
- the default valuearray
- the data arrayreadonly
- read only property?public ArrayProperty(java.lang.String name, java.lang.String nameForDisplay, E defaultValue, E[] array)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.nameForDisplay
- the name displayed in the editor. See Property.getNameForDisplay()
. If null
is passed, the value of the name parameter is used.defaultValue
- the default valuearray
- the data arraypublic ArrayProperty(java.lang.String name, E defaultValue, E[] array, boolean readonly)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.defaultValue
- the default valuearray
- the data arrayreadonly
- read only property?public ArrayProperty(java.lang.String name, E defaultValue, E[] array)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.defaultValue
- the default valuearray
- the data arrayMethod Detail |
---|
public E getDefaultValue()
getDefaultValue
in class Property
public final E[] getArray()
protected void onKeeperSet()
onKeeperSet
in class Property
protected void onValueChanged(E oldValue, E newValue)
oldValue
- the old valuenewValue
- the new valueprotected final boolean setSelectedValue(E value, boolean firstTime)
value
- firstTime
-
public final boolean setSelectedValue(E value)
value
-
public final E getSelectedValue()
public void setValue(java.lang.Object value)
setValue
in class Property
value
- the new valuepublic E getValue()
getValue
in class Property
public void loadValue(PropertyLoader loader, java.lang.String value)
loadValue
in class Property
loader
- the loadervalue
- the value to load
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |