1 Clazz.declarePackage ("javax.swing");
\r
2 Clazz.load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JSeparator", ["java.lang.IllegalArgumentException", "javax.swing.UIManager"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
4 this.orientation = 0;
\r
5 Clazz.instantialize (this, arguments);
\r
6 }, javax.swing, "JSeparator", javax.swing.JComponent, javax.swing.SwingConstants);
\r
7 Clazz.makeConstructor (c$,
\r
11 Clazz.makeConstructor (c$,
\r
12 function (orientation) {
\r
13 Clazz.superConstructor (this, javax.swing.JSeparator, []);
\r
14 this.checkOrientation (orientation);
\r
15 this.orientation = orientation;
\r
16 this.setFocusable (false);
\r
19 Clazz.overrideMethod (c$, "getUI",
\r
23 Clazz.overrideMethod (c$, "updateUI",
\r
25 this.setUI (javax.swing.UIManager.getUI (this));
\r
27 Clazz.overrideMethod (c$, "getUIClassID",
\r
29 return "SeparatorUI";
\r
31 Clazz.defineMethod (c$, "getOrientation",
\r
33 return this.orientation;
\r
35 Clazz.defineMethod (c$, "setOrientation",
\r
36 function (orientation) {
\r
37 if (this.orientation == orientation) {
\r
39 }var oldValue = this.orientation;
\r
40 this.checkOrientation (orientation);
\r
41 this.orientation = orientation;
\r
42 this.firePropertyChangeInt ("orientation", oldValue, orientation);
\r
46 Clazz.defineMethod (c$, "checkOrientation",
\r
47 function (orientation) {
\r
48 switch (orientation) {
\r
53 throw new IllegalArgumentException ("orientation must be one of: VERTICAL, HORIZONTAL");
\r
56 Clazz.defineMethod (c$, "paramString",
\r
58 var orientationString = (this.orientation == 0 ? "HORIZONTAL" : "VERTICAL");
\r
59 return Clazz.superCall (this, javax.swing.JSeparator, "paramString", []) + ",orientation=" + orientationString;
\r
61 Clazz.defineStatics (c$,
\r
62 "$uiClassID", "SeparatorUI");
\r