|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.support.action.ModeTransitionSetting<A,B>
public class ModeTransitionSetting<A,B>
A storage device used to store a specific set of modes from a
ModeTransitionManager
. This setting can be used later to load
the set of modes again.
Constructor Summary | |
---|---|
ModeTransitionSetting(ModeTransitionConverter<A,B> converter)
Creates a new setting |
Method Summary | |
---|---|
void |
add(String id,
String current,
Map<String,A> properties,
Collection<String> history)
Adds a new set of properties to this setting. |
ModeTransitionConverter<A,B> |
getConverter()
Gets the converter that is used to transform internal and external properties. |
String |
getCurrent(int index)
Gets the current mode of the index'th set. |
String[] |
getHistory(int index)
Gets the history of the index'th set. |
String |
getId(int index)
Gets the unique id of the index'th set. |
Map<String,A> |
getProperties(int index)
Gets the converted properties of the index'th set. |
void |
read(DataInputStream in)
Clears all properties of this setting and then reads new properties from in . |
void |
readXML(XElement element)
Clears all properties of this setting and then reads new properties from element . |
int |
size()
Gets the number of sets this setting stores. |
void |
write(DataOutputStream out)
Writes all properties of this setting into out . |
void |
writeXML(XElement element)
Writes the contents of this setting in xml format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModeTransitionSetting(ModeTransitionConverter<A,B> converter)
converter
- the converter to read and write propertiesMethod Detail |
---|
public ModeTransitionConverter<A,B> getConverter()
null
public void add(String id, String current, Map<String,A> properties, Collection<String> history)
id
- the unique identifier of this set of propertiescurrent
- the current mode of the setproperties
- the properties, will be copied by this methodhistory
- older modes of the setting, will be copied by this methodpublic int size()
public String getId(int index)
index
- the index of the set
public String getCurrent(int index)
index
- the index of the set
public String[] getHistory(int index)
index
- the index of the set
public Map<String,A> getProperties(int index)
index
- the index of the set
public void write(DataOutputStream out) throws IOException
out
.
out
- the stream to write into
IOException
- if an I/O-error occurspublic void read(DataInputStream in) throws IOException
in
.
in
- the stream to read from
IOException
- if an I/O-error occurspublic void writeXML(XElement element)
element
- the elemnt to write into, the attributes of
element will not be changed.readXML(XElement)
public void readXML(XElement element)
element
.
element
- the element from which the properties should be readwriteXML(XElement)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |