|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.common.intern.RootStationAdjacentFactory
public class RootStationAdjacentFactory
This factory stores the property CStation.getTypeId()
for any
CStation
that is found.
Field Summary | |
---|---|
static java.lang.String |
FACTORY_ID
The unique identifier of this factory |
Constructor Summary | |
---|---|
RootStationAdjacentFactory()
|
Method Summary | |
---|---|
java.lang.String |
getID()
Gets the unique name of this converter. |
Path |
getLayout(DockElement element,
java.util.Map<Dockable,java.lang.Integer> children)
Gets the layout of element . |
Path |
getPerspectiveLayout(PerspectiveElement element,
java.util.Map<PerspectiveDockable,java.lang.Integer> children)
Gets the layout information that is associated with element . |
boolean |
interested(DockElement element)
Tells whether this factory is interested in storing information for element . |
boolean |
interested(PerspectiveElement element)
Tells whether this factory is interested in storing information for element . |
Path |
read(java.io.DataInputStream in,
PlaceholderStrategy placeholders)
Reads a layout from a stream. |
Path |
read(XElement element,
PlaceholderStrategy placeholders)
Reads a layout from an xml-element. |
void |
setLayout(DockElement element,
Path layout,
java.util.Map<java.lang.Integer,Dockable> children,
PlaceholderStrategy placeholders)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
setLayout(DockElement element,
Path layout,
PlaceholderStrategy placeholders)
Reads the contents of layout and changes the layout of
element accordingly. |
void |
write(Path layout,
java.io.DataOutputStream out)
Writes the contents of layout into out . |
void |
write(Path layout,
XElement element)
Writes the contents of layout 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 java.lang.String FACTORY_ID
Constructor Detail |
---|
public RootStationAdjacentFactory()
Method Detail |
---|
public boolean interested(DockElement element)
AdjacentDockFactory
element
.
interested
in interface AdjacentDockFactory<Path>
element
- the element which might be stored by this factory
true
if the factory wants to store element
public boolean interested(PerspectiveElement element)
AdjacentDockFactory
element
.
interested
in interface AdjacentDockFactory<Path>
element
- the element which might be stored by this factory
true
if the factory wants to store element
public java.lang.String getID()
DockConverter
getID
in interface DockConverter<DockElement,PerspectiveElement,Path>
public Path getLayout(DockElement element, java.util.Map<Dockable,java.lang.Integer> children)
DockConverter
element
. This method should create
a new instance of the layout object, that new object should not be
tied to element
in any way. A layout can be living for
a long period of time and might be used on another dockable
object.
getLayout
in interface DockConverter<DockElement,PerspectiveElement,Path>
element
- the element for which a new layout should be createdchildren
- a map containing unique identifiers for the children
of the element. Children which are not in this map should not be
stored in the layout.children.size()
(excl.). The
same identifiers will be used as indices by a LocationEstimationMap
. See
also DockFactory.estimateLocations(Object, LocationEstimationMap)
.
public Path getPerspectiveLayout(PerspectiveElement element, java.util.Map<PerspectiveDockable,java.lang.Integer> children)
DockConverter
element
.
The layout information can be any Object
. The only restriction
of the object is, that the associated DockFactory
understands
how to read that object.
getPerspectiveLayout
in interface DockConverter<DockElement,PerspectiveElement,Path>
element
- the element whose layout information is asked.children
- a map providing identifiers for the children of this element. The
identifiers are in the range from 0 (incl.) to children.size()
(excl.),
the exact same identifiers would be given to DockConverter.getLayout(bibliothek.gui.dock.DockElement, Map)
.
Is null
if the children of this station should be ignored.
null
if this converter does not support perspectivespublic Path read(java.io.DataInputStream in, PlaceholderStrategy placeholders) throws java.io.IOException
DockConverter
read
in interface DockConverter<DockElement,PerspectiveElement,Path>
in
- the stream to read fromplaceholders
- a strategy to detect invalid placeholders, can be null
.
Factories loading only Dockable
s but no DockStation
s can safely ignore this argument.
null
if the layout
should be discarded
java.io.IOException
- if an I/O-error occurspublic Path read(XElement element, PlaceholderStrategy placeholders)
DockConverter
read
in interface DockConverter<DockElement,PerspectiveElement,Path>
element
- the element to read, should not be changed by this
method.placeholders
- a strategy to detect invalid placeholders, can be null
.
Factories loading only Dockable
s but no DockStation
s can safely ignore this argument.
null
if the layout
should be discardedpublic void setLayout(DockElement element, Path layout, java.util.Map<java.lang.Integer,Dockable> children, PlaceholderStrategy placeholders)
DockConverter
layout
and changes the layout of
element
accordingly. This method should remove all
children from element
and add new children.
setLayout
in interface DockConverter<DockElement,PerspectiveElement,Path>
element
- the element whose content and children will be rearranged.layout
- the new layout of element
children
- some children, note that the map may not contain all elements
which were present when the layout was created.placeholders
- a strategy to detect invalid placeholders, can be null
.
Factories loading only Dockable
s but no DockStation
s can safely ignore this argument.public void setLayout(DockElement element, Path layout, PlaceholderStrategy placeholders)
DockConverter
layout
and changes the layout of
element
accordingly. This method should not add or remove
children to or from element
.
setLayout
in interface DockConverter<DockElement,PerspectiveElement,Path>
element
- the element whose properties will be changedlayout
- the new set of propertiesplaceholders
- a strategy to detect invalid placeholders, can be null
.
Factories loading only Dockable
s but no DockStation
s can safely ignore this argument.public void write(Path layout, java.io.DataOutputStream out) throws java.io.IOException
DockConverter
layout
into out
.
write
in interface DockConverter<DockElement,PerspectiveElement,Path>
layout
- the layout to storeout
- the stream to write into
java.io.IOException
- if an I/O-error occurspublic void write(Path layout, XElement element)
DockConverter
layout
into element
.
write
in interface DockConverter<DockElement,PerspectiveElement,Path>
layout
- the layout to storeelement
- an xml-element into which this method should write, the
attributes of element
should not be changed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |