public class Setting extends Object
DockFrontend
.Constructor and Description |
---|
Setting() |
Modifier and Type | Method and Description |
---|---|
void |
addInvisible(String key,
String root,
DockLayoutComposition layout,
DockableProperty location)
Stores the location of an invisible element.
|
void |
fillMissing(DockSituation situation)
Using the factories given by
situation , this method tries
to fill any gaps in the layout. |
int |
getInvisibleCount()
Gets the number of stored invisible elements.
|
String |
getInvisibleKey(int index)
Gets the key of the index'th invisible element.
|
DockLayoutComposition |
getInvisibleLayout(int index)
Gets the layout of the index'th invisible element.
|
DockableProperty |
getInvisibleLocation(int index)
Gets the location of the index'th invisible element.
|
String |
getInvisibleRoot(int index)
Gets the preferred root of the index'th invisible element.
|
DockLayoutComposition |
getRoot(String root)
Gets the layout of a root.
|
String[] |
getRootKeys()
Gets the keys of all known roots.
|
void |
putRoot(String root,
DockLayoutComposition layout)
Stores the layout of a root.
|
void |
read(DockSituation situation,
PropertyTransformer transformer,
boolean entry,
DataInputStream in)
Reads the properties of this setting.
|
void |
readXML(DockSituation situation,
PropertyTransformer transformer,
boolean entry,
XElement element)
Reads the properties of this setting.
|
void |
write(DockSituation situation,
PropertyTransformer transformer,
boolean entry,
DataOutputStream out)
Writes the properties of this setting into
out . |
void |
writeXML(DockSituation situation,
PropertyTransformer transformer,
boolean entry,
XElement element)
Writes the properties of this setting in xml format.
|
public void putRoot(String root, DockLayoutComposition layout)
root
- the name of the rootlayout
- the layoutpublic DockLayoutComposition getRoot(String root)
root
- the rootnull
public String[] getRootKeys()
public void addInvisible(String key, String root, DockLayoutComposition layout, DockableProperty location)
key
- the key of the elementroot
- the preferred root of the elementlayout
- the layout of the element, may be null
location
- the location of the element on root
public int getInvisibleCount()
public String getInvisibleKey(int index)
index
- the index of the elementpublic String getInvisibleRoot(int index)
index
- the index of the elementpublic DockableProperty getInvisibleLocation(int index)
index
- the index of the elementpublic DockLayoutComposition getInvisibleLayout(int index)
index
- the index of the layoutnull
public void fillMissing(DockSituation situation)
situation
, this method tries
to fill any gaps in the layout.situation
- a set of factories to useIllegalArgumentException
- if situation
cannot handle
the content of this settingpublic void write(DockSituation situation, PropertyTransformer transformer, boolean entry, DataOutputStream out) throws IOException
out
.situation
- can be used to write DockLayout
stransformer
- can be used to write DockableProperty
sentry
- if true
, then this setting is used as one of
the settings a user can choose. If false
then this setting
is used as the final setting that is written when the application
shuts down.out
- a stream to write intoIOException
- if an I/O-error occurspublic void writeXML(DockSituation situation, PropertyTransformer transformer, boolean entry, XElement element)
situation
- can be used to write DockLayout
stransformer
- can be used to write DockableProperty
sentry
- if true
, then this setting is used as one of
the settings a user can choose. If false
then this setting
is used as the final setting that is written when the application
shuts down.element
- the element into which this setting writes, the attributes
of element
are not changed.public void read(DockSituation situation, PropertyTransformer transformer, boolean entry, DataInputStream in) throws IOException
situation
- can be used to read DockLayout
stransformer
- can be used to read DockableProperty
sentry
- if true
, then this setting is used as one of
the settings a user can choose. If false
then this setting
is used as the first setting that is read when the application
starts up.in
- the stream to read fromIOException
- if an I/O-error occurspublic void readXML(DockSituation situation, PropertyTransformer transformer, boolean entry, XElement element)
situation
- can be used to read DockLayout
stransformer
- can be used to read DockableProperty
sentry
- if true
, then this setting is used as one of
the settings a user can choose. If false
then this setting
is used as the first setting that is read when the application
starts up.element
- the element which should be read