1 14 package org.wings.session; 15 16 19 public class BrowserType { 20 public class BrowserID { 21 public static final int UNKNOWN = 0; 22 public static final int GECKO = 1; 23 public static final int MOZILLA = 2; 24 public static final int IE = 3; 25 public static final int OPERA = 4; 26 public static final int KONQUEROR = 5; 27 } 28 31 public static final BrowserType UNKNOWN = new BrowserType(BrowserID.UNKNOWN, "default", "Unknown"); 32 33 36 public static final BrowserType GECKO = new BrowserType(BrowserID.GECKO, "gecko", "Gecko"); 37 38 41 public static final BrowserType MOZILLA = new BrowserType(BrowserID.MOZILLA, "mozilla", "Mozilla (non-Gecko)"); 42 43 46 public static final BrowserType IE = new BrowserType(BrowserID.IE, "msie", "Internet Exploder"); 47 48 51 public static final BrowserType OPERA = new BrowserType(BrowserID.OPERA, "opera", "Opera"); 52 53 56 public static final BrowserType KONQUEROR = new BrowserType(BrowserID.KONQUEROR, "konqueror", "Konqueror"); 57 58 private int id; 59 private String description; 60 private String shortName; 61 62 65 private BrowserType(int id, String shortName, String description) { 66 this.id = id; 67 this.shortName = shortName; 68 this.description = description; 69 } 70 71 74 public int getId() { 75 return id; 76 } 77 78 81 public String getDescription() { 82 return description; 83 } 84 85 88 public String getShortName() { 89 return shortName; 90 } 91 92 public String toString() { 93 return getDescription(); 94 } 95 } 96 | Popular Tags |