public class DockLayoutInfo
extends java.lang.Object
DockLayoutInfo
is a wrapper around a DockLayout
. The DockLayout
can either be stored as real object, as byte-stream or as part of an xml tree. This information
is normally used by a DockConverter
to create or store DockElement
s.Modifier and Type | Class and Description |
---|---|
static class |
DockLayoutInfo.Data
The kind of information a
DockLayoutInfo contains. |
Constructor and Description |
---|
DockLayoutInfo()
Creates a new info.
|
DockLayoutInfo(byte[] data)
Creates a new info.
|
DockLayoutInfo(DockLayout<?> data)
Creates a new info
|
DockLayoutInfo(XElement data)
Creates a new info.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getDataByte()
Gets the data of this info as byte array.
|
DockLayout<?> |
getDataLayout()
Gets the data of this info as
DockLayout . |
XElement |
getDataXML()
Gets the data of this info formated as xml.
|
DockLayoutInfo.Data |
getKind()
Tells what kind of information can be found in this info.
|
DockableProperty |
getLocation()
Gets the location of of the
Dockable on its parent station. |
Path |
getPlaceholder()
Gets the representation of this element as placeholder.
|
void |
setData(java.lang.Object data)
Sets the information of this info.
|
void |
setLocation(DockableProperty location)
Sets the location of the
Dockable ,represented by this info,
on its parent station. |
void |
setPlaceholder(Path placeholder)
Sets a placeholder which represents this element.
|
public DockLayoutInfo()
public DockLayoutInfo(byte[] data)
data
- the data of this infopublic DockLayoutInfo(XElement data)
data
- the data of this infopublic DockLayoutInfo(DockLayout<?> data)
data
- the data of this infopublic DockLayoutInfo.Data getKind()
null
public void setLocation(DockableProperty location)
Dockable
,represented by this info,
on its parent station.location
- the location, can be null
public DockableProperty getLocation()
Dockable
on its parent station.null
public void setPlaceholder(Path placeholder)
placeholder
- the placeholder, can be null
public Path getPlaceholder()
null
public void setData(java.lang.Object data)
data
must either be null
, or an instance of XElement
,
byte[]
or DockLayout
data
- the new datajava.lang.IllegalArgumentException
- if data
has not one
of the specified typespublic XElement getDataXML()
null
if it cannot be convertedpublic byte[] getDataByte()
null
if it cannot be convertedpublic DockLayout<?> getDataLayout()
DockLayout
.DockLayout
data or null