016d4deaff686c04a219938a96dc51b175a040b8
[jalviewjs.git] / site / j2s / javax / swing / UIManager.js
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", 
5 function () {
6 return javax.swing.UIManager.uid;
7 });
8 c$.getInstalledLookAndFeels = Clazz.defineMethod (c$, "getInstalledLookAndFeels", 
9 function () {
10 return javax.swing.UIManager.installedLAFs;
11 });
12 c$.setInstalledLookAndFeels = Clazz.defineMethod (c$, "setInstalledLookAndFeels", 
13 function (infos) {
14 swingjs.JSToolkit.notImplemented (null);
15 }, "~A");
16 c$.installLookAndFeel = Clazz.defineMethod (c$, "installLookAndFeel", 
17 function (info) {
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);
23 }, "~S,~S");
24 c$.getLookAndFeel = Clazz.defineMethod (c$, "getLookAndFeel", 
25 function () {
26 return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf);
27 });
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 ()));
35 }, "~S");
36 c$.getSystemLookAndFeelClassName = Clazz.defineMethod (c$, "getSystemLookAndFeelClassName", 
37 function () {
38 return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName ();
39 });
40 c$.getCrossPlatformLookAndFeelClassName = Clazz.defineMethod (c$, "getCrossPlatformLookAndFeelClassName", 
41 function () {
42 return "swingjs.plaf.HTML5LookAndFeel";
43 });
44 c$.getDefaults = Clazz.defineMethod (c$, "getDefaults", 
45 function () {
46 javax.swing.UIManager.maybeInitialize ();
47 return javax.swing.UIManager.uid;
48 });
49 c$.getFont = Clazz.defineMethod (c$, "getFont", 
50 function (key) {
51 return javax.swing.UIManager.getDefaults ().getFont (key);
52 }, "~O");
53 c$.getFont = Clazz.defineMethod (c$, "getFont", 
54 function (key, l) {
55 return javax.swing.UIManager.getDefaults ().getFont (key, l);
56 }, "~O,java.util.Locale");
57 c$.getColor = Clazz.defineMethod (c$, "getColor", 
58 function (key) {
59 return javax.swing.UIManager.getDefaults ().getColor (key);
60 }, "~O");
61 c$.getColor = Clazz.defineMethod (c$, "getColor", 
62 function (key, l) {
63 return javax.swing.UIManager.getDefaults ().getColor (key, l);
64 }, "~O,java.util.Locale");
65 c$.getIcon = Clazz.defineMethod (c$, "getIcon", 
66 function (key) {
67 return javax.swing.UIManager.getDefaults ().getIcon (key);
68 }, "~O");
69 c$.getIcon = Clazz.defineMethod (c$, "getIcon", 
70 function (key, l) {
71 return javax.swing.UIManager.getDefaults ().getIcon (key, l);
72 }, "~O,java.util.Locale");
73 c$.getBorder = Clazz.defineMethod (c$, "getBorder", 
74 function (key) {
75 return javax.swing.UIManager.getDefaults ().getBorder (key);
76 }, "~O");
77 c$.getBorder = Clazz.defineMethod (c$, "getBorder", 
78 function (key, l) {
79 return javax.swing.UIManager.getDefaults ().getBorder (key, l);
80 }, "~O,java.util.Locale");
81 c$.getString = Clazz.defineMethod (c$, "getString", 
82 function (key) {
83 return javax.swing.UIManager.getDefaults ().getString (key);
84 }, "~O");
85 c$.getString = Clazz.defineMethod (c$, "getString", 
86 function (key, l) {
87 return javax.swing.UIManager.getDefaults ().getString (key, l);
88 }, "~O,java.util.Locale");
89 c$.getString = Clazz.defineMethod (c$, "getString", 
90 function (key, c) {
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", 
95 function (key) {
96 return javax.swing.UIManager.getDefaults ().getInt (key);
97 }, "~O");
98 c$.getInt = Clazz.defineMethod (c$, "getInt", 
99 function (key, l) {
100 return javax.swing.UIManager.getDefaults ().getInt (key, l);
101 }, "~O,java.util.Locale");
102 c$.getBoolean = Clazz.defineMethod (c$, "getBoolean", 
103 function (key) {
104 return javax.swing.UIManager.getDefaults ().getBoolean (key);
105 }, "~O");
106 c$.getBoolean = Clazz.defineMethod (c$, "getBoolean", 
107 function (key, l) {
108 return javax.swing.UIManager.getDefaults ().getBoolean (key, l);
109 }, "~O,java.util.Locale");
110 c$.getInsets = Clazz.defineMethod (c$, "getInsets", 
111 function (key) {
112 return javax.swing.UIManager.getDefaults ().getInsets (key);
113 }, "~O");
114 c$.getInsets = Clazz.defineMethod (c$, "getInsets", 
115 function (key, l) {
116 return javax.swing.UIManager.getDefaults ().getInsets (key, l);
117 }, "~O,java.util.Locale");
118 c$.getDimension = Clazz.defineMethod (c$, "getDimension", 
119 function (key) {
120 return javax.swing.UIManager.getDefaults ().getDimension (key);
121 }, "~O");
122 c$.getDimension = Clazz.defineMethod (c$, "getDimension", 
123 function (key, l) {
124 return javax.swing.UIManager.getDefaults ().getDimension (key, l);
125 }, "~O,java.util.Locale");
126 c$.get = Clazz.defineMethod (c$, "get", 
127 function (key) {
128 return javax.swing.UIManager.getDefaults ().get (key);
129 }, "~O");
130 c$.get = Clazz.defineMethod (c$, "get", 
131 function (key, l) {
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);
137 }, "~O,~O");
138 c$.getUI = Clazz.defineMethod (c$, "getUI", 
139 function (target) {
140 javax.swing.UIManager.maybeInitialize ();
141 var ui = null;
142 ui = javax.swing.UIManager.getDefaults ().getUI (target);
143 if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented");
144 return ui;
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", 
153 function () {
154 return  new Array (0);
155 });
156 c$.maybeInitialize = Clazz.defineMethod (c$, "maybeInitialize", 
157  function () {
158 if (javax.swing.UIManager.uid == null) {
159 javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults ();
160 javax.swing.UIManager.initialize ();
161 }});
162 c$.initialize = Clazz.defineMethod (c$, "initialize", 
163  function () {
164 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
165 jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ());
166 }});
167 Clazz.pu$h(self.c$);
168 c$ = Clazz.decorateAsClass (function () {
169 this.name = null;
170 this.className = null;
171 Clazz.instantialize (this, arguments);
172 }, javax.swing.UIManager, "LookAndFeelInfo");
173 Clazz.makeConstructor (c$, 
174 function (a, b) {
175 this.name = a;
176 this.className = b;
177 }, "~S,~S");
178 Clazz.defineMethod (c$, "getName", 
179 function () {
180 return this.name;
181 });
182 Clazz.defineMethod (c$, "getClassName", 
183 function () {
184 return this.className;
185 });
186 Clazz.overrideMethod (c$, "toString", 
187 function () {
188 return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]";
189 });
190 c$ = Clazz.p0p ();
191 Clazz.defineStatics (c$,
192 "installedLAFs", null);
193 {
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$,
198 "laf", null,
199 "uid", null);
200 });