1 18 package org.apache.beehive.netui.tags.javascript; 19 20 23 public class ScriptPlacement 24 { 25 protected static final int INT_PLACE_BEFORE = 0; 26 protected static final int INT_PLACE_AFTER = 1; 27 protected static final int INT_PLACE_INLINE = 2; 28 protected static final int INT_PLACE_INFRAMEWORK = 3; 29 30 public static final ScriptPlacement PLACE_BEFORE = new ScriptPlacement(INT_PLACE_BEFORE); 31 public static final ScriptPlacement PLACE_AFTER = new ScriptPlacement(INT_PLACE_AFTER); 32 public static final ScriptPlacement PLACE_INLINE = new ScriptPlacement(INT_PLACE_INLINE); 33 public static final ScriptPlacement PLACE_INFRAMEWORK = new ScriptPlacement(INT_PLACE_INFRAMEWORK); 34 35 private int _val; 36 37 private ScriptPlacement(int val) 38 { 39 _val = val; 40 } 41 42 public String toString() 43 { 44 switch (_val) 45 { 46 case INT_PLACE_BEFORE : return "PLACE_BEFORE"; 47 case INT_PLACE_AFTER: return "PLACE_AFTER"; 48 case INT_PLACE_INLINE: return "PLACE_INLINE"; 49 case INT_PLACE_INFRAMEWORK: return "PLACE_INFRAMEWORK"; 50 } 51 52 assert false : _val; 53 return "<unknown ScriptPlacement>"; 54 } 55 56 public boolean equals( Object o ) 57 { 58 if (o == null) return false; 59 if (o == this) return true; 60 if (!(o instanceof ScriptPlacement)) return false; 61 return ((ScriptPlacement )o)._val == _val; 62 } 63 64 public int hashCode() 65 { 66 return _val; 67 } 68 } 69 | Popular Tags |