X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src2%2Fnet%2Fmiginfocom%2Flayout%2FDimConstraint.java;fp=src%2Fnet%2Fmiginfocom%2Flayout%2FDimConstraint.java;h=c36d88cee44490ba3317fd6c419f3e092264e4d8;hb=665d2c2f4c1310e6985b93b7c2c8a8eec2fa9086;hp=0ea29df6111e8bebab8f968ce1995e402efb205a;hpb=0e684f72690bd6532272a39ab6c188a27559fd09;p=jalview.git diff --git a/src/net/miginfocom/layout/DimConstraint.java b/src2/net/miginfocom/layout/DimConstraint.java similarity index 96% rename from src/net/miginfocom/layout/DimConstraint.java rename to src2/net/miginfocom/layout/DimConstraint.java index 0ea29df..c36d88c 100644 --- a/src/net/miginfocom/layout/DimConstraint.java +++ b/src2/net/miginfocom/layout/DimConstraint.java @@ -41,7 +41,7 @@ import java.io.ObjectStreamException; /** A simple value holder for a constraint for one dimension. */ -public final class DimConstraint// implements Externalizable +public final class DimConstraint implements Externalizable { /** How this entity can be resized in the dimension that this constraint represents. */ @@ -453,25 +453,25 @@ public final class DimConstraint// implements Externalizable return ret; } -// // ************************************************ -// // 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() == DimConstraint.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() == DimConstraint.class) + LayoutUtil.writeAsXML(out, this); + } }