org.netbeans.beaninfo.editors
Class FontEditor
java.lang.Object
org.netbeans.beaninfo.editors.FontEditor
- All Implemented Interfaces:
- PropertyEditor, XMLPropertyEditor
public class FontEditor
- extends Object
- implements PropertyEditor, XMLPropertyEditor
A property editor for Font class.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_FONT
public static final String XML_FONT
- See Also:
- Constant Field Values
ATTR_NAME
public static final String ATTR_NAME
- See Also:
- Constant Field Values
ATTR_STYLE
public static final String ATTR_STYLE
- See Also:
- Constant Field Values
ATTR_SIZE
public static final String ATTR_SIZE
- See Also:
- Constant Field Values
FontEditor
public FontEditor()
getValue
public Object getValue()
- Specified by:
getValue in interface PropertyEditor
setValue
public void setValue(Object object)
- Specified by:
setValue in interface PropertyEditor
getAsText
public String getAsText()
- Specified by:
getAsText in interface PropertyEditor
setAsText
public void setAsText(String string)
- Specified by:
setAsText in interface PropertyEditor
getJavaInitializationString
public String getJavaInitializationString()
- Specified by:
getJavaInitializationString in interface PropertyEditor
getTags
public String[] getTags()
- Specified by:
getTags in interface PropertyEditor
isPaintable
public boolean isPaintable()
- Specified by:
isPaintable in interface PropertyEditor
paintValue
public void paintValue(Graphics g,
Rectangle rectangle)
- Specified by:
paintValue in interface PropertyEditor
supportsCustomEditor
public boolean supportsCustomEditor()
- Specified by:
supportsCustomEditor in interface PropertyEditor
getCustomEditor
public Component getCustomEditor()
- Specified by:
getCustomEditor in interface PropertyEditor
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
- Specified by:
addPropertyChangeListener in interface PropertyEditor
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
- Specified by:
removePropertyChangeListener in interface PropertyEditor
readFromXML
public void readFromXML(Node element)
throws IOException
- Called to load property value from specified XML subtree. If succesfully loaded,
the value should be available via the getValue method.
An IOException should be thrown when the value cannot be restored from the specified XML element
- Specified by:
readFromXML in interface XMLPropertyEditor
- Parameters:
element - the XML DOM element representing a subtree of XML from which the value should be loaded
- Throws:
IOException - thrown when the value cannot be restored from the specified XML element
storeToXML
public Node storeToXML(Document doc)
- Called to store current property value into XML subtree. The property value should be set using the
setValue method prior to calling this method.
- Specified by:
storeToXML in interface XMLPropertyEditor
- Parameters:
doc - The XML document to store the XML in - should be used for creating nodes only
- Returns:
- the XML DOM element representing a subtree of XML from which the value should be loaded