package net.miginfocom.layout;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.ObjectStreamException;
+import java.io.*;
import java.util.ArrayList;
/*
* Note that there are two way to build this constraint. Through String (e.g. <code>"[100]3[200,fill]"</code> or through API (E.g.
* <code>new AC().size("100").gap("3").size("200").fill()</code>.
*/
-public final class AC //implements Externalizable
+public final class AC implements Externalizable
{
private final ArrayList<DimConstraint> cList = new ArrayList<DimConstraint>(1);
}
}
-// // ************************************************
-// // Persistence Delegate and Serializable combined.
-// // ************************************************
-//
-// private Object readResolve() throws ObjectStreamException
-// {
-// return LayoutUtil.getSerializedObject(this);
-// }
-//
-// @Override
-// public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
-// {
-// LayoutUtil.setSerializedObject(this, LayoutUtil.readAsXML(in));
-// }
-//
-// @Override
-// public void writeExternal(ObjectOutput out) throws IOException
-// {
-// if (getClass() == AC.class)
-// LayoutUtil.writeAsXML(out, this);
-// }
+ // ************************************************
+ // Persistence Delegate and Serializable combined.
+ // ************************************************
+
+ private Object readResolve() throws ObjectStreamException
+ {
+ return LayoutUtil.getSerializedObject(this);
+ }
+
+ @Override
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ LayoutUtil.setSerializedObject(this, LayoutUtil.readAsXML(in));
+ }
+
+ @Override
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ if (getClass() == AC.class)
+ LayoutUtil.writeAsXML(out, this);
+ }
}
\ No newline at end of file