|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.layout.PropertyTransformer
public class PropertyTransformer
A PropertTransformer can read and write instances of DockableProperty
, assuming that a factory is installed for the property.
Field Summary | |
---|---|
static Path |
FACTORY_EXTENSION
Name of the ExtensionName that allows to load additional DockablePropertyFactory s |
static String |
FACTORY_EXTENSION_PARAMETER
Name of the only property of an ExtensionName that points to this |
Constructor Summary | |
---|---|
PropertyTransformer(DockController controller)
Creates a new transformer, the factories for all DockableProperty s implemented
by this framework are installed. |
|
PropertyTransformer(DockController controller,
DockablePropertyFactory... factories)
Creates a new transformer and installs factories . |
Method Summary | |
---|---|
void |
addFactory(DockablePropertyFactory factory)
Installs a factory |
DockableProperty |
read(DataInputStream in)
Reads a property which was earlier stored. |
DockableProperty |
readXML(XElement element)
Reads a DockableProperty and its successors from an xml element. |
void |
write(DockableProperty property,
DataOutputStream out)
Writes property and all its successors into out . |
void |
writeXML(DockableProperty property,
XElement element)
Writes property and all its successors into
element . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Path FACTORY_EXTENSION
ExtensionName
that allows to load additional DockablePropertyFactory
s
public static final String FACTORY_EXTENSION_PARAMETER
ExtensionName
that points to this
Constructor Detail |
---|
public PropertyTransformer(DockController controller)
DockableProperty
s implemented
by this framework are installed.
controller
- the controller in whose realm this transformer is usedpublic PropertyTransformer(DockController controller, DockablePropertyFactory... factories)
factories
.
factories
- a list of factories to installcontroller
- the controller in whose realm this transformer is usedMethod Detail |
---|
public void addFactory(DockablePropertyFactory factory)
factory
- the new factorypublic void write(DockableProperty property, DataOutputStream out) throws IOException
property
and all its successors into out
.
property
- the property to writeout
- a stream to write into
IOException
- if the stream throws an exceptionpublic DockableProperty read(DataInputStream in) throws IOException
in
- a stream to read from
IOException
- if the property can't be readpublic void writeXML(DockableProperty property, XElement element)
property
and all its successors into
element
.
property
- the property to writeelement
- an xml element to which this method will add some childrenpublic DockableProperty readXML(XElement element)
DockableProperty
and its successors from an xml element.
element
- the element to read from
null
if element
is empty
IllegalArgumentException
- if a DockablePropertyFactory
is missing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |