1 11 package org.eclipse.swt.widgets; 12 13 import org.eclipse.swt.graphics.*; 14 15 22 public final class Monitor { 23 int handle; 24 int x, y, width, height; 25 int clientX, clientY, clientWidth, clientHeight; 26 27 30 Monitor () { 31 } 32 33 43 public boolean equals (Object object) { 44 if (object == this) return true; 45 if (!(object instanceof Monitor)) return false; 46 Monitor monitor = (Monitor) object; 47 return handle == monitor.handle; 48 } 49 50 56 public Rectangle getBounds () { 57 return new Rectangle (x, y, width, height); 58 } 59 60 66 public Rectangle getClientArea () { 67 return new Rectangle (clientX, clientY, clientWidth, clientHeight); 68 } 69 70 80 public int hashCode () { 81 return handle; 82 } 83 84 } 85 | Popular Tags |