X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src2%2Fnet%2Fmiginfocom%2Flayout%2FAC.java;fp=src%2Fnet%2Fmiginfocom%2Flayout%2FAC.java;h=2d1032cead2bd306b47f83bb936d47ee9f5080ed;hb=665d2c2f4c1310e6985b93b7c2c8a8eec2fa9086;hp=231b333faba468e822dd7a0313613475983f990b;hpb=0e684f72690bd6532272a39ab6c188a27559fd09;p=jalview.git diff --git a/src/net/miginfocom/layout/AC.java b/src2/net/miginfocom/layout/AC.java similarity index 96% rename from src/net/miginfocom/layout/AC.java rename to src2/net/miginfocom/layout/AC.java index 231b333..2d1032c 100644 --- a/src/net/miginfocom/layout/AC.java +++ b/src2/net/miginfocom/layout/AC.java @@ -1,10 +1,6 @@ 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; /* @@ -50,7 +46,7 @@ import java.util.ArrayList; * Note that there are two way to build this constraint. Through String (e.g. "[100]3[200,fill]" or through API (E.g. * new AC().size("100").gap("3").size("200").fill(). */ -public final class AC //implements Externalizable +public final class AC implements Externalizable { private final ArrayList cList = new ArrayList(1); @@ -547,25 +543,25 @@ public final class AC //implements Externalizable } } -// // ************************************************ -// // 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