0b9a27ca132aa7b9dffeedc6bff22e1df6d87113
[jalviewjs.git] / site / swingjs / j2s / javax / swing / LookAndFeel.js
1 Clazz.declarePackage ("javax.swing");
2 Clazz.load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () {
3 c$ = Clazz.declareType (javax.swing, "LookAndFeel");
4 c$.installColors = Clazz.defineMethod (c$, "installColors", 
5 function (c, defaultBgName, defaultFgName) {
6 var bg = c.getBackground ();
7 if (bg == null || Clazz.instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName));
8 var fg = c.getForeground ();
9 if (fg == null || Clazz.instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName));
10 }, "javax.swing.JComponent,~S,~S");
11 c$.installColorsAndFont = Clazz.defineMethod (c$, "installColorsAndFont", 
12 function (c, defaultBgName, defaultFgName, defaultFontName) {
13 var f = c.getFont ();
14 if (f == null || Clazz.instanceOf (f, javax.swing.plaf.UIResource)) {
15 c.setFont (javax.swing.UIManager.getFont (defaultFontName));
16 }javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName);
17 }, "javax.swing.JComponent,~S,~S,~S");
18 c$.installBorder = Clazz.defineMethod (c$, "installBorder", 
19 function (c, defaultBorderName) {
20 swingjs.JSToolkit.notImplemented (null);
21 }, "javax.swing.JComponent,~S");
22 c$.uninstallBorder = Clazz.defineMethod (c$, "uninstallBorder", 
23 function (c) {
24 swingjs.JSToolkit.notImplemented (null);
25 }, "javax.swing.JComponent");
26 c$.installProperty = Clazz.defineMethod (c$, "installProperty", 
27 function (c, propertyName, propertyValue) {
28 if (Clazz.instanceOf (c, javax.swing.JPasswordField)) {
29 if (!(c).customSetUIProperty (propertyName, propertyValue)) {
30 c.setUIProperty (propertyName, propertyValue);
31 }} else {
32 c.setUIProperty (propertyName, propertyValue);
33 }}, "javax.swing.JComponent,~S,~O");
34 c$.makeKeyBindings = Clazz.defineMethod (c$, "makeKeyBindings", 
35 function (keyBindingList) {
36 swingjs.JSToolkit.notImplemented (null);
37 return null;
38 }, "~A");
39 c$.makeInputMap = Clazz.defineMethod (c$, "makeInputMap", 
40 function (keys) {
41 swingjs.JSToolkit.notImplemented (null);
42 return null;
43 }, "~A");
44 c$.makeComponentInputMap = Clazz.defineMethod (c$, "makeComponentInputMap", 
45 function (c, keys) {
46 swingjs.JSToolkit.notImplemented (null);
47 return null;
48 }, "javax.swing.JComponent,~A");
49 c$.loadKeyBindings = Clazz.defineMethod (c$, "loadKeyBindings", 
50 function (retMap, keys) {
51 swingjs.JSToolkit.notImplemented (null);
52 }, "javax.swing.InputMap,~A");
53 c$.makeIcon = Clazz.defineMethod (c$, "makeIcon", 
54 function (baseClass, gifFile) {
55 swingjs.JSToolkit.notImplemented (null);
56 return null;
57 }, "Class,~S");
58 Clazz.defineMethod (c$, "getLayoutStyle", 
59 function () {
60 return jssun.swing.DefaultLayoutStyle.getInstance ();
61 });
62 Clazz.defineMethod (c$, "provideErrorFeedback", 
63 function (component) {
64 swingjs.JSToolkit.notImplemented (null);
65 }, "java.awt.Component");
66 c$.getDesktopPropertyValue = Clazz.defineMethod (c$, "getDesktopPropertyValue", 
67 function (systemPropertyName, fallbackValue) {
68 swingjs.JSToolkit.notImplemented (null);
69 return fallbackValue;
70 }, "~S,~O");
71 Clazz.defineMethod (c$, "getDisabledIcon", 
72 function (component, icon) {
73 swingjs.JSToolkit.notImplemented (null);
74 return null;
75 }, "javax.swing.JComponent,javax.swing.Icon");
76 Clazz.defineMethod (c$, "getDisabledSelectedIcon", 
77 function (component, icon) {
78 return this.getDisabledIcon (component, icon);
79 }, "javax.swing.JComponent,javax.swing.Icon");
80 Clazz.defineMethod (c$, "getSupportsWindowDecorations", 
81 function () {
82 return false;
83 });
84 Clazz.defineMethod (c$, "initialize", 
85 function () {
86 });
87 Clazz.defineMethod (c$, "uninitialize", 
88 function () {
89 });
90 Clazz.defineMethod (c$, "getDefaults", 
91 function () {
92 return null;
93 });
94 Clazz.overrideMethod (c$, "toString", 
95 function () {
96 return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]";
97 });
98 });