package net.miginfocom.layout;
+import java.io.*;
/*
* License (BSD):
* ==============
* @author Mikael Grev, MiG InfoCom AB
* Date: 2006-sep-08
*/
-//import java.io.Externalizable;
/** A parsed constraint that specifies how an entity (normally column/row or component) can shrink or
* grow compared to other entities.
*/
-final class ResizeConstraint //implements Externalizable
+final class ResizeConstraint implements Externalizable
{
static final Float WEIGHT_100 = 100f;
this.grow = growWeight;
}
-// // ************************************************
-// // 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() == ResizeConstraint.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() == ResizeConstraint.class)
+ LayoutUtil.writeAsXML(out, this);
+ }
}