public class FontEditor extends Object implements PropertyEditor, XMLPropertyEditor
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_NAME |
static String |
ATTR_SIZE |
static String |
ATTR_STYLE |
static String |
XML_FONT |
Constructor and Description |
---|
FontEditor() |
Modifier and Type | Method and Description |
---|---|
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() |
public static final String XML_FONT
public static final String ATTR_NAME
public static final String ATTR_STYLE
public static final String ATTR_SIZE
public Object getValue()
getValue
in interface PropertyEditor
public void setValue(Object object)
setValue
in interface PropertyEditor
public String getAsText()
getAsText
in interface PropertyEditor
public void setAsText(String string)
setAsText
in interface PropertyEditor
public String getJavaInitializationString()
getJavaInitializationString
in interface PropertyEditor
public String[] getTags()
getTags
in interface PropertyEditor
public boolean isPaintable()
isPaintable
in interface PropertyEditor
public void paintValue(Graphics g, Rectangle rectangle)
paintValue
in interface PropertyEditor
public boolean supportsCustomEditor()
supportsCustomEditor
in interface PropertyEditor
public Component getCustomEditor()
getCustomEditor
in interface PropertyEditor
public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
addPropertyChangeListener
in interface PropertyEditor
public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
removePropertyChangeListener
in interface PropertyEditor
public void readFromXML(Node element) throws IOException
readFromXML
in interface XMLPropertyEditor
element
- the XML DOM element representing a subtree of XML from which the value should be loadedIOException
- thrown when the value cannot be restored from the specified XML elementpublic Node storeToXML(Document doc)
storeToXML
in interface XMLPropertyEditor
doc
- The XML document to store the XML in - should be used for creating nodes only