home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / java / awt / Insets.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  1.4 KB  |  40 lines

  1. package java.awt;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public class Insets implements Cloneable, Serializable {
  6.    public int top;
  7.    public int left;
  8.    public int bottom;
  9.    public int right;
  10.    private static final long serialVersionUID = -2272572637695466749L;
  11.  
  12.    public Insets(int var1, int var2, int var3, int var4) {
  13.       this.top = var1;
  14.       this.left = var2;
  15.       this.bottom = var3;
  16.       this.right = var4;
  17.    }
  18.  
  19.    public boolean equals(Object var1) {
  20.       if (var1 instanceof Insets) {
  21.          Insets var2 = (Insets)var1;
  22.          return this.top == var2.top && this.left == var2.left && this.bottom == var2.bottom && this.right == var2.right;
  23.       } else {
  24.          return false;
  25.       }
  26.    }
  27.  
  28.    public String toString() {
  29.       return this.getClass().getName() + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]";
  30.    }
  31.  
  32.    public Object clone() {
  33.       try {
  34.          return super.clone();
  35.       } catch (CloneNotSupportedException var1) {
  36.          throw new InternalError();
  37.       }
  38.    }
  39. }
  40.