1 6 7 package javax.portlet; 8 9 10 20 21 public class WindowState 22 { 23 24 33 public final static WindowState NORMAL = new WindowState ("normal"); 34 35 44 public final static WindowState MAXIMIZED = new WindowState ("maximized"); 45 46 52 public final static WindowState MINIMIZED = new WindowState ("minimized"); 53 54 55 56 private String _name; 57 58 59 67 public WindowState(String name) { 68 if (name==null) { 69 throw new IllegalArgumentException ("WindowState name can not be NULL"); 70 } 71 _name = name.toLowerCase(); 72 } 73 74 80 81 public String toString() { 82 return _name; 83 } 84 85 86 93 94 public int hashCode() { 95 return _name.hashCode(); 96 } 97 98 99 109 110 public boolean equals(Object object) { 111 if ( object instanceof WindowState ) 112 return _name.equals(((WindowState) object)._name); 113 else 114 return false; 115 } 116 } 117 118 | Popular Tags |