|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.layout.AbstractDockableProperty bibliothek.gui.dock.station.split.SplitDockPathProperty
public class SplitDockPathProperty
A DockableProperty
used by the SplitDockStation
to describe
the location of a Dockable
in the tree of all children of the station.
Nested Class Summary | |
---|---|
static class |
SplitDockPathProperty.Location
The direction which the path takes |
static class |
SplitDockPathProperty.Node
Describes one turn of the path. |
Constructor Summary | |
---|---|
SplitDockPathProperty()
Creates a new, empty path |
Method Summary | |
---|---|
void |
add(SplitDockPathProperty.Location location,
double size,
long id)
Adds a new element to the end of the path. |
DockableProperty |
copy()
Gets a copy of this property, the successor must be
copied as well. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getFactoryID()
Gets the unique name of the DockablePropertyFactory which
can create this type of DockableProperty. |
SplitDockPathProperty.Node |
getLastNode()
Gets the last node of this path. |
long |
getLeafId()
Gets the unique identifier of the leaf that was stored in this path. |
SplitDockPathProperty.Node |
getNode(int index)
Gets the index'th node, where the node 0 is the node nearest to the root. |
int |
hashCode()
|
void |
insert(SplitDockPathProperty.Location location,
double size,
int index,
long id)
Adds a new element to the path. |
java.util.Iterator<SplitDockPathProperty.Node> |
iterator()
|
void |
load(java.io.DataInputStream in)
Reads the contents of this DockableProperty from a stream. |
void |
load(XElement element)
Reads the contents of this DockableProperty from an
xml element. |
void |
setLeafId(long leafId)
Sets the unique identifier of the leaf that was stored in this path. |
int |
size()
Gets the number of nodes stores in this property. |
void |
store(java.io.DataOutputStream out)
Stores the contents of this DockableProperty in a stream. |
void |
store(XElement element)
Stores the contents of this property as xml element. |
SplitDockProperty |
toLocation()
Calculates which bounds the element accessed through the given path would have. |
SplitDockProperty |
toLocation(SplitNode onPath)
Calculates which bounds the element accessed through this path would have. |
java.lang.String |
toString()
|
Methods inherited from class bibliothek.gui.dock.layout.AbstractDockableProperty |
---|
copy, equalsNoSuccessor, getSuccessor, setSuccessor |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SplitDockPathProperty()
Method Detail |
---|
public DockableProperty copy()
DockableProperty
successor
must be
copied as well.
copy
in interface DockableProperty
this
public java.util.Iterator<SplitDockPathProperty.Node> iterator()
iterator
in interface java.lang.Iterable<SplitDockPathProperty.Node>
public int size()
public SplitDockPathProperty.Node getNode(int index)
index
- the index of the node
public void setLeafId(long leafId)
leafId
- the id or -1public long getLeafId()
public SplitDockPathProperty.Node getLastNode()
null
if this path is emptypublic SplitDockProperty toLocation()
public SplitDockProperty toLocation(SplitNode onPath)
onPath
is a node that is on this path and
first searches for an item with the same unique identifier like onPath
. If
such an item is found, then the current boundaries of onPath
are taken
as start parameters.
onPath
- some node which might be on this path
public void add(SplitDockPathProperty.Location location, double size, long id)
location
- the direction into which the path goessize
- the relative size of the path, a value in the range 0.0
to 1.0id
- the unique identifier of the node or -1public void insert(SplitDockPathProperty.Location location, double size, int index, long id)
location
- the direction into which the path goessize
- the relative size of the path, a value in the range 0.0
to 1.0index
- where to add the new elementid
- the unique identifier of the new node or -1public java.lang.String getFactoryID()
DockableProperty
DockablePropertyFactory
which
can create this type of DockableProperty.
getFactoryID
in interface DockableProperty
DockablePropertyFactory
public void store(java.io.DataOutputStream out) throws java.io.IOException
DockableProperty
successor
(if there is one) must
not be saved.
store
in interface DockableProperty
out
- the stream to write in
java.io.IOException
- if anything unexpected happenspublic void store(XElement element)
DockableProperty
store
in interface DockableProperty
element
- the element into which to write, the attributes of
this element should not be changedpublic void load(java.io.DataInputStream in) throws java.io.IOException
DockableProperty
load
in interface DockableProperty
in
- the stream to read
java.io.IOException
- if anything unexpected happenspublic void load(XElement element)
DockableProperty
DockableProperty
from an
xml element.
load
in interface DockableProperty
element
- the element that was written earlier by this propertypublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class AbstractDockableProperty
public boolean equals(java.lang.Object obj)
equals
in class AbstractDockableProperty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |