Package docking.options.editor

# Class StringEditor

java.lang.Object
java.beans.PropertyEditorSupport
docking.options.editor.StringEditor

All Implemented Interfaces:
  `PropertyEditor`

public class StringEditor extends PropertyEditorSupport

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StringEditor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setAsText(String text)`
  The comment in the parent "PropertyEditorSupport" reads:

  ### Methods inherited from class java.beans.PropertyEditorSupport

  `addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### StringEditor

    public StringEditor()

- ## Method Details

  - ### setAsText

    public void setAsText(String text) throws IllegalArgumentException
    The comment in the parent "PropertyEditorSupport" reads:

    > Sets the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text.

    which would be fine, except for the fact that Java initializes "value" to null, so every use of this method has to insure that setValue has been called at least once with a non-null value. If not, the method throws the IllegalArgumentException despite the fact that the input is not badly formatted and CAN be expressed as text.

    Specified by:
      `setAsText` in interface `PropertyEditor`
    Overrides:
      `setAsText` in class `PropertyEditorSupport`
    Throws:
      `IllegalArgumentException`