public class SplitDockPathProperty extends AbstractDockableProperty implements Iterable<SplitDockPathProperty.Node>
DockableProperty used by the SplitDockStation to describe
the location of a Dockable in the tree of all children of the station.| Modifier and Type | Class and Description |
|---|---|
static class |
SplitDockPathProperty.Location
The direction which the path takes
|
static class |
SplitDockPathProperty.Node
Describes one turn of the path.
|
| Constructor and Description |
|---|
SplitDockPathProperty()
Creates a new, empty path
|
| Modifier and Type | Method and Description |
|---|---|
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(Object obj) |
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.
|
Iterator<SplitDockPathProperty.Node> |
iterator() |
void |
load(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(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.
|
String |
toString() |
copy, equalsNoSuccessor, getSuccessor, setSuccessorclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic DockableProperty copy()
DockablePropertysuccessor must be
copied as well.copy in interface DockablePropertythispublic Iterator<SplitDockPathProperty.Node> iterator()
iterator in interface Iterable<SplitDockPathProperty.Node>public int size()
public SplitDockPathProperty.Node getNode(int index)
index - the index of the nodepublic 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 pathpublic 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 String getFactoryID()
DockablePropertyDockablePropertyFactory which
can create this type of DockableProperty.getFactoryID in interface DockablePropertyDockablePropertyFactorypublic void store(DataOutputStream out) throws IOException
DockablePropertysuccessor (if there is one) must
not be saved.store in interface DockablePropertyout - the stream to write inIOException - if anything unexpected happenspublic void store(XElement element)
DockablePropertystore in interface DockablePropertyelement - the element into which to write, the attributes of
this element should not be changedpublic void load(DataInputStream in) throws IOException
DockablePropertyload in interface DockablePropertyin - the stream to readIOException - if anything unexpected happenspublic void load(XElement element)
DockablePropertyDockableProperty from an
xml element.load in interface DockablePropertyelement - the element that was written earlier by this propertypublic int hashCode()
hashCode in class AbstractDockablePropertypublic boolean equals(Object obj)
equals in class AbstractDockablePropertyCopyright © 2017 Docking Frames. All rights reserved.