1 Clazz.declarePackage ("javax.swing");
2 Clazz.load (null, "javax.swing.UIManager", ["java.util.ArrayList", "java.util.Locale", "javax.swing.RepaintManager", "$.SwingPaintEventDispatcher", "$.SwingUtilities", "jssun.awt.PaintEventDispatcher", "swingjs.JSToolkit"], function () {
3 c$ = Clazz.declareType (javax.swing, "UIManager");
4 c$.getLookAndFeelDefaults = Clazz.defineMethod (c$, "getLookAndFeelDefaults",
6 return javax.swing.UIManager.uid;
8 c$.getInstalledLookAndFeels = Clazz.defineMethod (c$, "getInstalledLookAndFeels",
10 return javax.swing.UIManager.installedLAFs;
12 c$.setInstalledLookAndFeels = Clazz.defineMethod (c$, "setInstalledLookAndFeels",
14 swingjs.JSToolkit.notImplemented (null);
16 c$.installLookAndFeel = Clazz.defineMethod (c$, "installLookAndFeel",
18 swingjs.JSToolkit.notImplemented (null);
19 }, "javax.swing.UIManager.LookAndFeelInfo");
20 c$.installLookAndFeel = Clazz.defineMethod (c$, "installLookAndFeel",
21 function (name, className) {
22 swingjs.JSToolkit.notImplemented (null);
24 c$.getLookAndFeel = Clazz.defineMethod (c$, "getLookAndFeel",
26 return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf);
28 c$.setLookAndFeel = Clazz.defineMethod (c$, "setLookAndFeel",
29 function (newLookAndFeel) {
30 }, "javax.swing.LookAndFeel");
31 c$.setLookAndFeel = Clazz.defineMethod (c$, "setLookAndFeel",
32 function (className) {
33 var lnfClass = javax.swing.SwingUtilities.loadSystemClass (className);
34 javax.swing.UIManager.setLookAndFeel ((lnfClass.newInstance ()));
36 c$.getSystemLookAndFeelClassName = Clazz.defineMethod (c$, "getSystemLookAndFeelClassName",
38 return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName ();
40 c$.getCrossPlatformLookAndFeelClassName = Clazz.defineMethod (c$, "getCrossPlatformLookAndFeelClassName",
42 return "swingjs.plaf.HTML5LookAndFeel";
44 c$.getDefaults = Clazz.defineMethod (c$, "getDefaults",
46 javax.swing.UIManager.maybeInitialize ();
47 return javax.swing.UIManager.uid;
49 c$.getFont = Clazz.defineMethod (c$, "getFont",
51 return javax.swing.UIManager.getDefaults ().getFont (key);
53 c$.getFont = Clazz.defineMethod (c$, "getFont",
55 return javax.swing.UIManager.getDefaults ().getFont (key, l);
56 }, "~O,java.util.Locale");
57 c$.getColor = Clazz.defineMethod (c$, "getColor",
59 return javax.swing.UIManager.getDefaults ().getColor (key);
61 c$.getColor = Clazz.defineMethod (c$, "getColor",
63 return javax.swing.UIManager.getDefaults ().getColor (key, l);
64 }, "~O,java.util.Locale");
65 c$.getIcon = Clazz.defineMethod (c$, "getIcon",
67 return javax.swing.UIManager.getDefaults ().getIcon (key);
69 c$.getIcon = Clazz.defineMethod (c$, "getIcon",
71 return javax.swing.UIManager.getDefaults ().getIcon (key, l);
72 }, "~O,java.util.Locale");
73 c$.getBorder = Clazz.defineMethod (c$, "getBorder",
75 return javax.swing.UIManager.getDefaults ().getBorder (key);
77 c$.getBorder = Clazz.defineMethod (c$, "getBorder",
79 return javax.swing.UIManager.getDefaults ().getBorder (key, l);
80 }, "~O,java.util.Locale");
81 c$.getString = Clazz.defineMethod (c$, "getString",
83 return javax.swing.UIManager.getDefaults ().getString (key);
85 c$.getString = Clazz.defineMethod (c$, "getString",
87 return javax.swing.UIManager.getDefaults ().getString (key, l);
88 }, "~O,java.util.Locale");
89 c$.getString = Clazz.defineMethod (c$, "getString",
91 var l = (c == null) ? java.util.Locale.getDefault () : c.getLocale ();
92 return javax.swing.UIManager.getString (key, l);
93 }, "~O,java.awt.Component");
94 c$.getInt = Clazz.defineMethod (c$, "getInt",
96 return javax.swing.UIManager.getDefaults ().getInt (key);
98 c$.getInt = Clazz.defineMethod (c$, "getInt",
100 return javax.swing.UIManager.getDefaults ().getInt (key, l);
101 }, "~O,java.util.Locale");
102 c$.getBoolean = Clazz.defineMethod (c$, "getBoolean",
104 return javax.swing.UIManager.getDefaults ().getBoolean (key);
106 c$.getBoolean = Clazz.defineMethod (c$, "getBoolean",
108 return javax.swing.UIManager.getDefaults ().getBoolean (key, l);
109 }, "~O,java.util.Locale");
110 c$.getInsets = Clazz.defineMethod (c$, "getInsets",
112 return javax.swing.UIManager.getDefaults ().getInsets (key);
114 c$.getInsets = Clazz.defineMethod (c$, "getInsets",
116 return javax.swing.UIManager.getDefaults ().getInsets (key, l);
117 }, "~O,java.util.Locale");
118 c$.getDimension = Clazz.defineMethod (c$, "getDimension",
120 return javax.swing.UIManager.getDefaults ().getDimension (key);
122 c$.getDimension = Clazz.defineMethod (c$, "getDimension",
124 return javax.swing.UIManager.getDefaults ().getDimension (key, l);
125 }, "~O,java.util.Locale");
126 c$.get = Clazz.defineMethod (c$, "get",
128 return javax.swing.UIManager.getDefaults ().get (key);
130 c$.get = Clazz.defineMethod (c$, "get",
132 return javax.swing.UIManager.getDefaults ().get (key, l);
133 }, "~O,java.util.Locale");
134 c$.put = Clazz.defineMethod (c$, "put",
135 function (key, value) {
136 return javax.swing.UIManager.getDefaults ().put (key, value);
138 c$.getUI = Clazz.defineMethod (c$, "getUI",
140 javax.swing.UIManager.maybeInitialize ();
142 ui = javax.swing.UIManager.getDefaults ().getUI (target);
143 if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented");
145 }, "javax.swing.JComponent");
146 c$.addPropertyChangeListener = Clazz.defineMethod (c$, "addPropertyChangeListener",
147 function (listener) {
148 }, "java.beans.PropertyChangeListener");
149 c$.removePropertyChangeListener = Clazz.defineMethod (c$, "removePropertyChangeListener",
150 function (listener) {
151 }, "java.beans.PropertyChangeListener");
152 c$.getPropertyChangeListeners = Clazz.defineMethod (c$, "getPropertyChangeListeners",
154 return new Array (0);
156 c$.maybeInitialize = Clazz.defineMethod (c$, "maybeInitialize",
158 if (javax.swing.UIManager.uid == null) {
159 javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults ();
160 javax.swing.UIManager.initialize ();
162 c$.initialize = Clazz.defineMethod (c$, "initialize",
164 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
165 jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ());
168 c$ = Clazz.decorateAsClass (function () {
170 this.className = null;
171 Clazz.instantialize (this, arguments);
172 }, javax.swing.UIManager, "LookAndFeelInfo");
173 Clazz.makeConstructor (c$,
178 Clazz.defineMethod (c$, "getName",
182 Clazz.defineMethod (c$, "getClassName",
184 return this.className;
186 Clazz.overrideMethod (c$, "toString",
188 return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]";
191 Clazz.defineStatics (c$,
192 "installedLAFs", null);
194 var iLAFs = new java.util.ArrayList (4);
195 iLAFs.add ( new javax.swing.UIManager.LookAndFeelInfo ("HTML5", "swingjs.plaf.HTML5LookAndFeel"));
196 javax.swing.UIManager.installedLAFs = iLAFs.toArray ( new Array (iLAFs.size ()));
197 }Clazz.defineStatics (c$,