org.jdesktop.swingx.editors
Class InsetsPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.jdesktop.swingx.editors.InsetsPropertyEditor
All Implemented Interfaces:
PropertyEditor

public class InsetsPropertyEditor
extends PropertyEditorSupport


Constructor Summary
InsetsPropertyEditor()
          Creates a new instance of InsetsPropertyEditor
 
Method Summary
 String getAsText()
          Gets the property value as a string suitable for presentation to a human to edit.
 Insets getValue()
          Gets the value of the property.
 void setAsText(String text)
          Sets the property value by parsing a given String.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, 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 Detail

InsetsPropertyEditor

public InsetsPropertyEditor()
Creates a new instance of InsetsPropertyEditor

Method Detail

getValue

public Insets getValue()
Description copied from class: java.beans.PropertyEditorSupport
Gets the value of the property.

Specified by:
getValue in interface PropertyEditor
Overrides:
getValue in class PropertyEditorSupport
Returns:
The value of the property.

setAsText

public void setAsText(String text)
Description copied from class: java.beans.PropertyEditorSupport
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.

Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Parameters:
text - The string to be parsed.

getAsText

public String getAsText()
Description copied from class: java.beans.PropertyEditorSupport
Gets the property value as a string suitable for presentation to a human to edit.

Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport
Returns:
The property value as a string suitable for presentation to a human to edit.

Returns "null" is the value can't be expressed as a string.

If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().