1 Clazz.declarePackage ("java.awt");
2 Clazz.load (null, "java.awt.ComponentOrientation", ["java.util.Locale"], function () {
3 c$ = Clazz.decorateAsClass (function () {
5 Clazz.instantialize (this, arguments);
6 }, java.awt, "ComponentOrientation");
7 Clazz.defineMethod (c$, "isHorizontal",
9 return (this.orientation & 2) != 0;
11 Clazz.defineMethod (c$, "isLeftToRight",
13 return (this.orientation & 4) != 0;
15 c$.getOrientation = Clazz.defineMethod (c$, "getOrientation",
17 var lang = locale.getLanguage ();
18 if ("iw".equals (lang) || "ar".equals (lang) || "fa".equals (lang) || "ur".equals (lang)) {
19 return java.awt.ComponentOrientation.RIGHT_TO_LEFT;
21 return java.awt.ComponentOrientation.LEFT_TO_RIGHT;
22 }}, "java.util.Locale");
23 c$.getOrientation = Clazz.defineMethod (c$, "getOrientation",
27 result = bdl.getObject ("Orientation");
29 if (Clazz.exceptionOf (e, Exception)) {
35 result = java.awt.ComponentOrientation.getOrientation (bdl.getLocale ());
36 }if (result == null) {
37 result = java.awt.ComponentOrientation.getOrientation (java.util.Locale.getDefault ());
39 }, "java.util.ResourceBundle");
40 Clazz.makeConstructor (c$,
42 this.orientation = value;
44 Clazz.defineStatics (c$,
48 c$.LEFT_TO_RIGHT = c$.prototype.LEFT_TO_RIGHT = new java.awt.ComponentOrientation (6);
49 c$.RIGHT_TO_LEFT = c$.prototype.RIGHT_TO_LEFT = new java.awt.ComponentOrientation (2);
50 c$.UNKNOWN = c$.prototype.UNKNOWN = new java.awt.ComponentOrientation (7);