X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src2%2Fnet%2Fmiginfocom%2Flayout%2FLC.java;fp=src%2Fnet%2Fmiginfocom%2Flayout%2FLC.java;h=b40fa75eb9c9840e66651e627f9b68cfa3b8ec54;hb=665d2c2f4c1310e6985b93b7c2c8a8eec2fa9086;hp=3c8fc693caba5e75c033531921fc17b2fc2e7c0e;hpb=0e684f72690bd6532272a39ab6c188a27559fd09;p=jalview.git diff --git a/src/net/miginfocom/layout/LC.java b/src2/net/miginfocom/layout/LC.java similarity index 98% rename from src/net/miginfocom/layout/LC.java rename to src2/net/miginfocom/layout/LC.java index 3c8fc69..b40fa75 100644 --- a/src/net/miginfocom/layout/LC.java +++ b/src2/net/miginfocom/layout/LC.java @@ -1,5 +1,6 @@ package net.miginfocom.layout; +import java.io.*; /* * License (BSD): * ============== @@ -34,11 +35,9 @@ package net.miginfocom.layout; * Date: 2006-sep-08 */ - - /** Contains the constraints for an instance of the {@link LC} layout manager. */ -public final class LC //implements Externalizable +public final class LC implements Externalizable { // See the corresponding set/get method for documentation of the property! @@ -1020,26 +1019,26 @@ public final class LC //implements Externalizable setHeight(LayoutUtil.derive(getHeight(), null, null, ConstraintParser.parseUnitValue(height, false))); return 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() == LC.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() == LC.class) + LayoutUtil.writeAsXML(out, this); + } }