Class StringEditor

java.lang.Object
java.beans.PropertyEditorSupport
docking.options.editor.StringEditor
All Implemented Interfaces:
PropertyEditor

public class StringEditor extends PropertyEditorSupport
  • 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