public class StackDockProperty extends AbstractDockableProperty
Dockable
on a StackDockStation
. The Dockables
on
a StackDockStation
are ordered in some way, and
the location is used to tell which Dockable
is
in front of another Dockable
.Modifier and Type | Field and Description |
---|---|
static StackDockProperty |
BACK
The last location on a
StackDockStation |
static StackDockProperty |
FRONT
The first location on a
StackDockStation |
Constructor and Description |
---|
StackDockProperty()
Constructs a property with a location equal to 0.
|
StackDockProperty(int index)
Constructs a property.
|
StackDockProperty(int index,
Path placeholder)
Constructs a property.
|
Modifier and Type | Method and Description |
---|---|
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. |
int |
getIndex()
Gets the location of this property.
|
Path |
getPlaceholder()
Gets the placeholder naming this location.
|
int |
hashCode() |
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 |
setIndex(int index)
Sets the location which is determined by this property.
|
void |
setPlaceholder(Path placeholder)
Sets the placeholder name this location.
|
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.
|
java.lang.String |
toString() |
copy, equalsNoSuccessor, getSuccessor, setSuccessor
public static final StackDockProperty FRONT
StackDockStation
public static final StackDockProperty BACK
StackDockStation
public StackDockProperty(int index)
index
- The locationpublic StackDockProperty(int index, Path placeholder)
index
- The locationplaceholder
- a name for this locationpublic StackDockProperty()
public java.lang.String toString()
toString
in class java.lang.Object
public DockableProperty copy()
DockableProperty
successor
must be
copied as well.this
public void setIndex(int index)
index
- the locationpublic int getIndex()
setIndex(int)
public void setPlaceholder(Path placeholder)
placeholder
- the placeholder, can be null
public Path getPlaceholder()
null
public java.lang.String getFactoryID()
DockableProperty
DockablePropertyFactory
which
can create this type of DockableProperty.DockablePropertyFactory
public void store(java.io.DataOutputStream out) throws java.io.IOException
DockableProperty
successor
(if there is one) must
not be saved.out
- the stream to write injava.io.IOException
- if anything unexpected happenspublic void store(XElement element)
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
in
- the stream to readjava.io.IOException
- if anything unexpected happenspublic void load(XElement element)
DockableProperty
DockableProperty
from an
xml element.element
- the element that was written earlier by this propertypublic int hashCode()
hashCode
in class AbstractDockableProperty
public boolean equals(java.lang.Object obj)
equals
in class AbstractDockableProperty