|
||||||||||
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.ListProperty<E,L>
E
- the list element typeL
- the list typepublic class ListProperty<E,L extends java.util.Collection<E>>
The ListProperty
serves for customizing a value from a list.
Constructor Summary | |
---|---|
ListProperty(java.lang.String name,
E defaultValue,
L list)
|
|
ListProperty(java.lang.String name,
E defaultValue,
L list,
boolean readonly)
|
|
ListProperty(java.lang.String name,
java.lang.String nameForDisplay,
E defaultValue,
L list)
|
|
ListProperty(java.lang.String name,
java.lang.String nameForDisplay,
E defaultValue,
L list,
boolean readonly)
|
|
ListProperty(java.lang.String name,
java.lang.String nameForDisplay,
E defaultValue,
L list,
boolean readonly,
java.lang.String buttonText)
|
Method Summary | |
---|---|
java.lang.String |
getButton2Text()
|
java.lang.String |
getButton2Tooltip()
|
E |
getDefaultValue()
Gets the default (initial) value fo this property. |
L |
getList()
Gets the data list. |
E |
getSelectedValue()
Gets the currently selected element. |
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 new selected value for this property. |
protected boolean |
setSelectedValue(E value,
boolean firstTime)
Sets the new selected value for this property. |
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 ListProperty(java.lang.String name, java.lang.String nameForDisplay, E defaultValue, L list, 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 valuelist
- the data listreadonly
- read only property?buttonText
- the text for the displayed button in the editorpublic ListProperty(java.lang.String name, java.lang.String nameForDisplay, E defaultValue, L list, 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 valuelist
- the data listreadonly
- read only property?public ListProperty(java.lang.String name, java.lang.String nameForDisplay, E defaultValue, L list)
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 valuelist
- the data listpublic ListProperty(java.lang.String name, E defaultValue, L list, boolean readonly)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.defaultValue
- the default valuelist
- the data listreadonly
- read only property?public ListProperty(java.lang.String name, E defaultValue, L list)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.defaultValue
- the default valuelist
- the data listMethod Detail |
---|
public E getDefaultValue()
getDefaultValue
in class Property
public final L getList()
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
- the new valuefirstTime
-
public final boolean setSelectedValue(E value)
value
- the new 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 loadpublic java.lang.String getButton2Text()
public java.lang.String getButton2Tooltip()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |