1 29 30 package nextapp.echo2.webrender; 31 32 import java.io.Serializable ; 33 import java.util.HashMap ; 34 import java.util.Map ; 35 36 39 public class ClientProperties 40 implements Serializable { 41 42 44 53 public static final String QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY = "quirkCssPositioningOneSideOnly"; 54 55 63 public static final String QUIRK_CSS_BORDER_COLLAPSE_FOR_0_PADDING = "quirkCssBorderCollapseFor0Padding"; 64 65 76 public static final String QUIRK_CSS_BORDER_COLLAPSE_INSIDE = "quirkCssBorderCollapseInside"; 77 78 87 public static final String QUIRK_CSS_BACKGROUND_ATTACHMENT_USE_FIXED = "quirkCssBackgroundAttachmentUseFixed"; 88 89 91 102 public static final String QUIRK_MOZILLA_PERFORMANCE_LARGE_DOM_REMOVE = "quirkMozillaPerformanceLargeDomRemove"; 103 104 116 public static final String QUIRK_MOZILLA_TEXT_INPUT_REPAINT = "quirkMozillaTextInputRepaint"; 117 118 127 public static final String QUIRK_OPERA_NO_CSS_TEXT = "quirkOperaNoCssText"; 128 129 131 141 public static final String QUIRK_IE_SELECT_Z_INDEX = "quirkIESelectZIndex"; 142 143 154 public static final String QUIRK_SELECT_REQUIRES_NULL_OPTION = "quirkSelectRequiresNullOption"; 155 156 167 public static final String QUIRK_TEXTAREA_CONTENT = "quirkTextareaContent"; 168 169 181 public static final String QUIRK_IE_TEXTAREA_NEWLINE_OBLITERATION = "quirkIETextareaNewlineObliteration"; 182 183 197 public static final String QUIRK_IE_REPAINT = "quirkIERepaint"; 198 199 208 public static final String QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR = "quirkIETablePercentWidthScrollbarError"; 209 210 218 public static final String QUIRK_IE_SELECT_LIST_DOM_UPDATE = "quirkIESelectListDomUpdate"; 219 220 228 public static final String QUIRK_IE_SELECT_PERCENT_WIDTH = "quirkIESelectPercentWidth"; 229 230 233 241 public static final String PROPRIETARY_IE_CSS_EXPRESSIONS_SUPPORTED = "proprietaryIECssExpressionsSupported"; 242 243 252 public static final String PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED = "proprietaryIEPngAlphaFilterRequired"; 253 254 263 public static final String PROPRIETARY_IE_OPACITY_FILTER_REQUIRED = "proprietaryIEOpacityFilterRequired"; 264 265 274 public static final String PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED = "proprietaryEventMouseEnterLeaveSupported"; 275 276 285 public static final String NOT_SUPPORTED_CSS_OPACITY = "notSupportedCssOpacity"; 286 287 297 public static final String NOT_SUPPORTED_CSS_MANIPULATION = "notSupportedCssManipulation"; 298 299 301 304 public static final String SCREEN_WIDTH = "screenWidth"; 305 306 309 public static final String SCREEN_HEIGHT = "screenHeight"; 310 311 314 public static final String SCREEN_COLOR_DEPTH = "screenColorDepth"; 315 316 320 public static final String BROWSER_MOZILLA = "browserMozilla"; 321 322 326 public static final String BROWSER_MOZILLA_FIREFOX = "browserMozillaFirefox"; 327 328 332 public static final String BROWSER_INTERNET_EXPLORER = "browserInternetExplorer"; 333 334 338 public static final String BROWSER_KONQUEROR = "browserKonqueror"; 339 340 344 public static final String BROWSER_SAFARI = "browserSafari"; 345 346 350 public static final String BROWSER_OPERA = "browserOpera"; 351 352 355 public static final String BROWSER_VERSION_MAJOR = "browserVersionMajor"; 356 357 360 public static final String BROWSER_VERSION_MINOR = "browserVersionMinor"; 361 362 365 public static final String LOCALES = "locales"; 366 367 370 public static final String NAVIGATOR_APP_NAME = "navigatorAppName"; 371 372 375 public static final String NAVIGATOR_APP_VERSION = "navigatorAppVersion"; 376 377 380 public static final String NAVIGATOR_APP_CODE_NAME = "navigatorAppCodeName"; 381 382 385 public static final String NAVIGATOR_COOKIE_ENABLED = "navigatorCookieEnabled"; 386 387 390 public static final String NAVIGATOR_JAVA_ENABLED = "navigatorJavaEnabled"; 391 392 395 public static final String NAVIGATOR_LANGUAGE = "navigatorLanguage"; 396 397 400 public static final String NAVIGATOR_PLATFORM = "navigatorPlatform"; 401 402 405 public static final String NAVIGATOR_USER_AGENT = "navigatorUserAgent"; 406 407 412 public static final String REMOTE_HOST = "remoteHost"; 413 414 417 public static final String UTC_OFFSET = "utcOffset"; 418 419 private Map data = new HashMap (); 420 421 424 public ClientProperties() { 425 super(); 426 } 427 428 434 public Object get(String propertyName) { 435 return data.get(propertyName); 436 } 437 438 445 public boolean getBoolean(String propertyName) { 446 Boolean value = (Boolean ) data.get(propertyName); 447 return value == null ? false : value.booleanValue(); 448 } 449 450 458 public int getInt(String propertyName, int nullValue) { 459 Integer value = (Integer ) data.get(propertyName); 460 return value == null ? nullValue : value.intValue(); 461 } 462 463 470 public String getString(String propertyName) { 471 Object value = data.get(propertyName); 472 return value == null ? "" : value.toString(); 473 } 474 475 480 public String [] getPropertyNames() { 481 return (String []) data.keySet().toArray(new String [data.size()]); 482 } 483 484 490 public void setProperty(String propertyName, Object propertyValue) { 491 data.put(propertyName, propertyValue); 492 } 493 494 497 public String toString() { 498 return "ClientProperties: " + data.toString(); 499 } 500 } 501 | Popular Tags |