JAL-3032 adds Java 8 functionality (2/2)
[jalview.git] / src2 / net / miginfocom / layout / ResizeConstraint.java
@@ -1,5 +1,6 @@
 package net.miginfocom.layout;
 
+import java.io.*;
 /*
  * License (BSD):
  * ==============
@@ -33,12 +34,11 @@ package net.miginfocom.layout;
  * @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;
 
@@ -70,25 +70,25 @@ final class ResizeConstraint //implements Externalizable
                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);
+       }
 }