org.netbeans.core/2 3.32

org.netbeans.beaninfo.editors
Class FontEditor

java.lang.Object
  extended by org.netbeans.beaninfo.editors.FontEditor
All Implemented Interfaces:
PropertyEditor, XMLPropertyEditor

public class FontEditor
extends Object
implements PropertyEditor, XMLPropertyEditor

A property editor for Font class.


Field Summary
static String ATTR_NAME
           
static String ATTR_SIZE
           
static String ATTR_STYLE
           
static String XML_FONT
           
 
Constructor Summary
FontEditor()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
           
 String getAsText()
           
 Component getCustomEditor()
           
 String getJavaInitializationString()
           
 String[] getTags()
           
 Object getValue()
           
 boolean isPaintable()
           
 void paintValue(Graphics g, Rectangle rectangle)
           
 void readFromXML(Node element)
          Called to load property value from specified XML subtree.
 void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
           
 void setAsText(String string)
           
 void setValue(Object object)
           
 Node storeToXML(Document doc)
          Called to store current property value into XML subtree.
 boolean supportsCustomEditor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

FontEditor

public FontEditor()
Method Detail

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

org.netbeans.core/2 3.32

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.