FilenameProperty

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.ctdp.rfdynhud.properties
Class FilenameProperty

    java.lang.Object
      net.ctdp.rfdynhud.properties.Property
          net.ctdp.rfdynhud.properties.FilenameProperty

    public class FilenameProperty

extends Property

The `FilenameProperty` serves for customizing a simple String value.

Author:
  Marvin Froehlich (CTDP)

Constructor Summary
`` | `FilenameProperty(java.lang.String name, java.lang.String defaultValue, java.lang.String[] extensions, java.lang.String[] extensionDescs)`
`` | `FilenameProperty(java.lang.String name, java.lang.String defaultValue, java.lang.String[] extensions, java.lang.String[] extensionDescs, boolean readonly)`
`` | `FilenameProperty(java.lang.String name, java.lang.String nameForDisplay, java.lang.String defaultValue, java.lang.String[] extensions, java.lang.String[] extensionDescs)`
`protected` | `FilenameProperty(java.lang.String name, java.lang.String nameForDisplay, java.lang.String defaultValue, java.lang.String[] extensions, java.lang.String[] extensionDescs, boolean readonly)`
`protected` | `FilenameProperty(java.lang.String name, java.lang.String nameForDisplay, java.lang.String defaultValue, java.lang.String[] extensions, java.lang.String[] extensionDescs, java.io.File base, boolean readonly)`

Method Summary
`java.lang.String` | `getDefaultValue()` Gets the default (initial) value fo this property.
`java.lang.String` | `getFilenameValue()` Gets the property's current value.
`java.io.File` | `getFileValue()` Gets the property's current value.
`java.lang.String` | `getValue()` Gets the current value fo this property.
`void` | `loadValue(PropertyLoader loader, java.lang.String value)` Loads the value from the configuration file.
`void` | `onButtonClicked(java.lang.Object button)`
`protected void` | `onKeeperSet()`
`protected void` | `onValueChanged(java.lang.String oldValue, java.lang.String newValue)` Invoked when the property's value has changed.
`boolean` | `setFilenameValue(java.lang.String value)` Sets the property's new value.
`protected boolean` | `setFilenameValue(java.lang.String value, boolean firstTime)`
`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, quoteValueInConfigurationFile, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FilenameProperty

    protected FilenameProperty(java.lang.String name,
                               java.lang.String nameForDisplay,
                               java.lang.String defaultValue,
                               java.lang.String[] extensions,
                               java.lang.String[] extensionDescs,
                               java.io.File base,
                               boolean readonly)

Parameters:
  `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 value
  `extensions` - the extensions to browse for
  `extensionDescs` - the extension descriptions
  `base` - the base folder
  `readonly` - read only property?

### FilenameProperty

    protected FilenameProperty(java.lang.String name,
                               java.lang.String nameForDisplay,
                               java.lang.String defaultValue,
                               java.lang.String[] extensions,
                               java.lang.String[] extensionDescs,
                               boolean readonly)

Parameters:
  `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 value
  `extensions` - the extensions to browse for
  `extensionDescs` - the extension descriptions
  `readonly` - read only property?

### FilenameProperty

    public FilenameProperty(java.lang.String name,
                            java.lang.String nameForDisplay,
                            java.lang.String defaultValue,
                            java.lang.String[] extensions,
                            java.lang.String[] extensionDescs)

Parameters:
  `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 value
  `extensions` - the extensions to browse for
  `extensionDescs` - the extension descriptions

### FilenameProperty

    public FilenameProperty(java.lang.String name,
                            java.lang.String defaultValue,
                            java.lang.String[] extensions,
                            java.lang.String[] extensionDescs,
                            boolean readonly)

Parameters:
  `name` - the technical name used internally. See `Property.getName()`. 'nameForDisplay' is set to the same value.
  `defaultValue` - the default value
  `extensions` - the extensions to browse for
  `extensionDescs` - the extension descriptions
  `readonly` - read only property?

### FilenameProperty

    public FilenameProperty(java.lang.String name,
                            java.lang.String defaultValue,
                            java.lang.String[] extensions,
                            java.lang.String[] extensionDescs)

Parameters:
  `name` - the technical name used internally. See `Property.getName()`. 'nameForDisplay' is set to the same value.
  `defaultValue` - the default value
  `extensions` - the extensions to browse for
  `extensionDescs` - the extension descriptions

Method Detail

### getDefaultValue

    public java.lang.String getDefaultValue()

  Gets the default (initial) value fo this property.

  Specified by:
    `getDefaultValue` in class `Property`
  Returns:
    the default value fo this property.

### onKeeperSet

    protected void onKeeperSet()

  Overrides:
    `onKeeperSet` in class `Property`

### onValueChanged

    protected void onValueChanged(java.lang.String oldValue,
                                  java.lang.String newValue)

  Invoked when the property's value has changed.

  Parameters:
    `oldValue` - the old value
    `newValue` - the new value

### setFilenameValue

    protected boolean setFilenameValue(java.lang.String value,
                                       boolean firstTime)

### setFilenameValue

    public final boolean setFilenameValue(java.lang.String value)

  Sets the property's new value.

  Parameters:
    `value` - the new value
  Returns:
    changed?

### getFilenameValue

    public final java.lang.String getFilenameValue()

  Gets the property's current value.

  Returns:
    the property's current value.

### getFileValue

    public final java.io.File getFileValue()

  Gets the property's current value.

  Returns:
    the property's current value.

### setValue

    public void setValue(java.lang.Object value)

  Sets the new value for this property.

  Specified by:
    `setValue` in class `Property`
  Parameters:
    `value` - the new value

### getValue

    public java.lang.String getValue()

  Gets the current value fo this property.

  Specified by:
    `getValue` in class `Property`
  Returns:
    the current value fo this property.

### loadValue

    public void loadValue(PropertyLoader loader,
                          java.lang.String value)

  Loads the value from the configuration file.

  Specified by:
    `loadValue` in class `Property`
  Parameters:
    `loader` - the loader
    `value` - the value to load

### onButtonClicked

    public void onButtonClicked(java.lang.Object button)

  Overrides:
    `onButtonClicked` in class `Property`
  Parameters:
    `button` - the clicked button

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD