bibliothek.gui.dock.common.intern.layout
Class CControlPerspectiveResource

java.lang.Object
  extended by bibliothek.gui.dock.common.intern.layout.CControlPerspectiveResource
All Implemented Interfaces:
ApplicationResource

public class CControlPerspectiveResource
extends Object
implements ApplicationResource

An ApplicationResource that emulates reading and writing layouts like CControl would do, but creates CPerspectives instead of actual layouts.

Author:
Benjamin Sigg

Constructor Summary
CControlPerspectiveResource(CControlPerspective control)
          Creates a new resource.
 
Method Summary
 SettingsBlop getSettings()
          Gets the settings that were read by this resource.
 void read(DataInputStream in)
          Reads the content of this resource from a stream of bytes.
 void readXML(XElement element)
          Reads the contents of this resource from a xml element.
 void setSettings(SettingsBlop settings)
          Sets the settings which should be written by this resource.
 void write(DataOutputStream out)
          Transforms this resource in a stream of bytes.
 void writeXML(XElement element)
          Writes the contents of this resource in xml format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CControlPerspectiveResource

public CControlPerspectiveResource(CControlPerspective control)
Creates a new resource.

Parameters:
control - the control which creates the CPerspectives
Method Detail

getSettings

public SettingsBlop getSettings()
Gets the settings that were read by this resource.

Returns:
the settings that were read

setSettings

public void setSettings(SettingsBlop settings)
Sets the settings which should be written by this resource.

Parameters:
settings - the settings to write

write

public void write(DataOutputStream out)
           throws IOException
Description copied from interface: ApplicationResource
Transforms this resource in a stream of bytes.

Specified by:
write in interface ApplicationResource
Parameters:
out - the stream to write into
Throws:
IOException - if the operation can't be completed

read

public void read(DataInputStream in)
          throws IOException
Description copied from interface: ApplicationResource
Reads the content of this resource from a stream of bytes.

Specified by:
read in interface ApplicationResource
Parameters:
in - the stream to read from
Throws:
IOException - if the operation can't be finished

writeXML

public void writeXML(XElement element)
Description copied from interface: ApplicationResource
Writes the contents of this resource in xml format.

Specified by:
writeXML in interface ApplicationResource
Parameters:
element - the element to write into, the attributes of element should not be changed.

readXML

public void readXML(XElement element)
Description copied from interface: ApplicationResource
Reads the contents of this resource from a xml element.

Specified by:
readXML in interface ApplicationResource
Parameters:
element - the element to read from.