public class Style extends java.lang.Object implements java.io.Externalizable, NotifyPropertyChanged
| Constructor and Description |
|---|
Style()
Initializes a new instance of the
Style class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
protected java.lang.Object |
getValue(java.lang.Object property)
Gets the value of the specified property.
|
protected boolean |
isPropertySet(java.lang.Object property)
Checks whether the specified property has a value.
|
protected void |
loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Loads the style content from an XML element.
|
void |
readExternal(java.io.ObjectInput in)
Externalizable.readExternal(java.io.ObjectInput) implementation. |
protected java.lang.Object |
registerProperty(java.lang.String name)
Registers a new property with the specified name and type.
|
static void |
registerType(java.lang.Class<?> type,
java.lang.String alias)
Associates a type with an alias.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
protected void |
saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Saves the style content into an XML element.
|
protected void |
setValue(java.lang.Object property,
java.lang.Object value)
Sets the value of the specified property.
|
protected void |
unsetValue(java.lang.Object property)
Clears the value of the specified property.
|
void |
writeExternal(java.io.ObjectOutput out)
Externalizable.writeExternal(java.io.ObjectOutput) implementation. |
public Style()
Style class.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
Externalizable.writeExternal(java.io.ObjectOutput) implementation.writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
Externalizable.readExternal(java.io.ObjectInput) implementation.readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionprotected void saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
xmlElement - An Element the style's data should be stored into.context - An XmlPersistContext object providing contextual information
about the serialization process and some helper serialization methods.protected void loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
throws javax.xml.transform.TransformerException,
XmlException
xmlElement - An Element containing the style's data.context - An XmlPersistContext object providing contextual information about
/// the serialization process and some helper serialization methods.javax.xml.transform.TransformerExceptionXmlExceptionprotected java.lang.Object registerProperty(java.lang.String name)
name - The name of the property.setValue(java.lang.Object, java.lang.Object) and getValue(java.lang.Object).protected java.lang.Object getValue(java.lang.Object property)
property - The property to get.null if the property is not defined.protected void setValue(java.lang.Object property,
java.lang.Object value)
property - The property to set.value - The new property value.protected void unsetValue(java.lang.Object property)
property - The property to clear.protected boolean isPropertySet(java.lang.Object property)
property - The property to check.true if the property has a local value; otherwise, false.public static void registerType(java.lang.Class<?> type,
java.lang.String alias)
type - The type to associate.alias - The unique alias for the type.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface NotifyPropertyChangedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface NotifyPropertyChanged