X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src2%2Fnet%2Fmiginfocom%2Flayout%2FCC.java;fp=src%2Fnet%2Fmiginfocom%2Flayout%2FCC.java;h=7206733d59a2a105e5f5fee15e91b2827f21fba7;hb=665d2c2f4c1310e6985b93b7c2c8a8eec2fa9086;hp=e4cfff92775ee564c5090b78b6a5390eb44b03ba;hpb=0e684f72690bd6532272a39ab6c188a27559fd09;p=jalview.git diff --git a/src/net/miginfocom/layout/CC.java b/src2/net/miginfocom/layout/CC.java similarity index 99% rename from src/net/miginfocom/layout/CC.java rename to src2/net/miginfocom/layout/CC.java index e4cfff9..7206733 100644 --- a/src/net/miginfocom/layout/CC.java +++ b/src2/net/miginfocom/layout/CC.java @@ -1,5 +1,6 @@ package net.miginfocom.layout; +import java.io.*; import java.util.ArrayList; /* * License (BSD): @@ -37,7 +38,7 @@ import java.util.ArrayList; /** A simple value holder for one component's constraint. */ -public final class CC// s implements Externalizable +public final class CC implements Externalizable { private static final BoundSize DEF_GAP = BoundSize.NULL_SIZE; // Only used to denote default wrap/newline gap. @@ -1856,25 +1857,25 @@ public final class CC// s 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() == CC.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() == CC.class) + LayoutUtil.writeAsXML(out, this); + } } \ No newline at end of file