info.clearthought.layout
Class TableLayoutPersistenceDelegate
java.lang.Object
java.beans.PersistenceDelegate
java.beans.DefaultPersistenceDelegate
info.clearthought.layout.TableLayoutPersistenceDelegate
public class TableLayoutPersistenceDelegate
- extends java.beans.DefaultPersistenceDelegate
Method Summary |
protected void |
initialize(java.lang.Class type,
java.lang.Object oldInstance,
java.lang.Object newInstance,
java.beans.Encoder out)
Writes an instance of TableLayout to a given encoder stream. |
static java.awt.Container |
readContainer(java.lang.String filename)
Reads a container previously written by writeContainer. |
static java.awt.Window |
readWindow(java.lang.String filename)
Reads a container previously written by writeContainer. |
static void |
writeContainer(java.lang.String filename,
java.lang.Object container)
Writes a container to a file. |
Methods inherited from class java.beans.DefaultPersistenceDelegate |
instantiate, mutatesTo |
Methods inherited from class java.beans.PersistenceDelegate |
writeObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableLayoutPersistenceDelegate
public TableLayoutPersistenceDelegate()
writeContainer
public static void writeContainer(java.lang.String filename,
java.lang.Object container)
throws java.io.FileNotFoundException
- Writes a container to a file.
- Parameters:
filename
- name of file to writecontainer
- container to write
- Throws:
java.io.FileNotFoundException
readContainer
public static java.awt.Container readContainer(java.lang.String filename)
throws java.io.FileNotFoundException
- Reads a container previously written by writeContainer.
- Parameters:
filename
- name of the file to read
- Returns:
- the read container
- Throws:
java.io.FileNotFoundException
readWindow
public static java.awt.Window readWindow(java.lang.String filename)
throws java.io.FileNotFoundException
- Reads a container previously written by writeContainer. The container
written must have been an instance of Window or this method will throw a
CastClassException.
- Parameters:
filename
- name of the file to read
- Returns:
- the read container as a window
- Throws:
java.io.FileNotFoundException
initialize
protected void initialize(java.lang.Class type,
java.lang.Object oldInstance,
java.lang.Object newInstance,
java.beans.Encoder out)
- Writes an instance of TableLayout to a given encoder stream.
- Overrides:
initialize
in class java.beans.DefaultPersistenceDelegate
- Parameters:
oldInstance
- instance to be copiednewInstance
- instance that is to be modifiedout
- stream to which any initialization statements should
be written