X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fswingjs%2Fj2s%2Fjavax%2Fswing%2FLookAndFeel.js;fp=site%2Fswingjs%2Fj2s%2Fjavax%2Fswing%2FLookAndFeel.js;h=0b9a27ca132aa7b9dffeedc6bff22e1df6d87113;hp=2207b3bcc35dd8d52cef03311d64d3f8879dfd2e;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/swingjs/j2s/javax/swing/LookAndFeel.js b/site/swingjs/j2s/javax/swing/LookAndFeel.js index 2207b3b..0b9a27c 100644 --- a/site/swingjs/j2s/javax/swing/LookAndFeel.js +++ b/site/swingjs/j2s/javax/swing/LookAndFeel.js @@ -1,98 +1,98 @@ -Clazz.declarePackage ("javax.swing"); -Clazz.load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () { -c$ = Clazz.declareType (javax.swing, "LookAndFeel"); -c$.installColors = Clazz.defineMethod (c$, "installColors", -function (c, defaultBgName, defaultFgName) { -var bg = c.getBackground (); -if (bg == null || Clazz.instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName)); -var fg = c.getForeground (); -if (fg == null || Clazz.instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName)); -}, "javax.swing.JComponent,~S,~S"); -c$.installColorsAndFont = Clazz.defineMethod (c$, "installColorsAndFont", -function (c, defaultBgName, defaultFgName, defaultFontName) { -var f = c.getFont (); -if (f == null || Clazz.instanceOf (f, javax.swing.plaf.UIResource)) { -c.setFont (javax.swing.UIManager.getFont (defaultFontName)); -}javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName); -}, "javax.swing.JComponent,~S,~S,~S"); -c$.installBorder = Clazz.defineMethod (c$, "installBorder", -function (c, defaultBorderName) { -swingjs.JSToolkit.notImplemented (null); -}, "javax.swing.JComponent,~S"); -c$.uninstallBorder = Clazz.defineMethod (c$, "uninstallBorder", -function (c) { -swingjs.JSToolkit.notImplemented (null); -}, "javax.swing.JComponent"); -c$.installProperty = Clazz.defineMethod (c$, "installProperty", -function (c, propertyName, propertyValue) { -if (Clazz.instanceOf (c, javax.swing.JPasswordField)) { -if (!(c).customSetUIProperty (propertyName, propertyValue)) { -c.setUIProperty (propertyName, propertyValue); -}} else { -c.setUIProperty (propertyName, propertyValue); -}}, "javax.swing.JComponent,~S,~O"); -c$.makeKeyBindings = Clazz.defineMethod (c$, "makeKeyBindings", -function (keyBindingList) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "~A"); -c$.makeInputMap = Clazz.defineMethod (c$, "makeInputMap", -function (keys) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "~A"); -c$.makeComponentInputMap = Clazz.defineMethod (c$, "makeComponentInputMap", -function (c, keys) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "javax.swing.JComponent,~A"); -c$.loadKeyBindings = Clazz.defineMethod (c$, "loadKeyBindings", -function (retMap, keys) { -swingjs.JSToolkit.notImplemented (null); -}, "javax.swing.InputMap,~A"); -c$.makeIcon = Clazz.defineMethod (c$, "makeIcon", -function (baseClass, gifFile) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "Class,~S"); -Clazz.defineMethod (c$, "getLayoutStyle", -function () { -return jssun.swing.DefaultLayoutStyle.getInstance (); -}); -Clazz.defineMethod (c$, "provideErrorFeedback", -function (component) { -swingjs.JSToolkit.notImplemented (null); -}, "java.awt.Component"); -c$.getDesktopPropertyValue = Clazz.defineMethod (c$, "getDesktopPropertyValue", -function (systemPropertyName, fallbackValue) { -swingjs.JSToolkit.notImplemented (null); -return fallbackValue; -}, "~S,~O"); -Clazz.defineMethod (c$, "getDisabledIcon", -function (component, icon) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "javax.swing.JComponent,javax.swing.Icon"); -Clazz.defineMethod (c$, "getDisabledSelectedIcon", -function (component, icon) { -return this.getDisabledIcon (component, icon); -}, "javax.swing.JComponent,javax.swing.Icon"); -Clazz.defineMethod (c$, "getSupportsWindowDecorations", -function () { -return false; -}); -Clazz.defineMethod (c$, "initialize", -function () { -}); -Clazz.defineMethod (c$, "uninitialize", -function () { -}); -Clazz.defineMethod (c$, "getDefaults", -function () { -return null; -}); -Clazz.overrideMethod (c$, "toString", -function () { -return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]"; -}); -}); +Clazz.declarePackage ("javax.swing"); +Clazz.load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () { +c$ = Clazz.declareType (javax.swing, "LookAndFeel"); +c$.installColors = Clazz.defineMethod (c$, "installColors", +function (c, defaultBgName, defaultFgName) { +var bg = c.getBackground (); +if (bg == null || Clazz.instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName)); +var fg = c.getForeground (); +if (fg == null || Clazz.instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName)); +}, "javax.swing.JComponent,~S,~S"); +c$.installColorsAndFont = Clazz.defineMethod (c$, "installColorsAndFont", +function (c, defaultBgName, defaultFgName, defaultFontName) { +var f = c.getFont (); +if (f == null || Clazz.instanceOf (f, javax.swing.plaf.UIResource)) { +c.setFont (javax.swing.UIManager.getFont (defaultFontName)); +}javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName); +}, "javax.swing.JComponent,~S,~S,~S"); +c$.installBorder = Clazz.defineMethod (c$, "installBorder", +function (c, defaultBorderName) { +swingjs.JSToolkit.notImplemented (null); +}, "javax.swing.JComponent,~S"); +c$.uninstallBorder = Clazz.defineMethod (c$, "uninstallBorder", +function (c) { +swingjs.JSToolkit.notImplemented (null); +}, "javax.swing.JComponent"); +c$.installProperty = Clazz.defineMethod (c$, "installProperty", +function (c, propertyName, propertyValue) { +if (Clazz.instanceOf (c, javax.swing.JPasswordField)) { +if (!(c).customSetUIProperty (propertyName, propertyValue)) { +c.setUIProperty (propertyName, propertyValue); +}} else { +c.setUIProperty (propertyName, propertyValue); +}}, "javax.swing.JComponent,~S,~O"); +c$.makeKeyBindings = Clazz.defineMethod (c$, "makeKeyBindings", +function (keyBindingList) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "~A"); +c$.makeInputMap = Clazz.defineMethod (c$, "makeInputMap", +function (keys) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "~A"); +c$.makeComponentInputMap = Clazz.defineMethod (c$, "makeComponentInputMap", +function (c, keys) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "javax.swing.JComponent,~A"); +c$.loadKeyBindings = Clazz.defineMethod (c$, "loadKeyBindings", +function (retMap, keys) { +swingjs.JSToolkit.notImplemented (null); +}, "javax.swing.InputMap,~A"); +c$.makeIcon = Clazz.defineMethod (c$, "makeIcon", +function (baseClass, gifFile) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "Class,~S"); +Clazz.defineMethod (c$, "getLayoutStyle", +function () { +return jssun.swing.DefaultLayoutStyle.getInstance (); +}); +Clazz.defineMethod (c$, "provideErrorFeedback", +function (component) { +swingjs.JSToolkit.notImplemented (null); +}, "java.awt.Component"); +c$.getDesktopPropertyValue = Clazz.defineMethod (c$, "getDesktopPropertyValue", +function (systemPropertyName, fallbackValue) { +swingjs.JSToolkit.notImplemented (null); +return fallbackValue; +}, "~S,~O"); +Clazz.defineMethod (c$, "getDisabledIcon", +function (component, icon) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "javax.swing.JComponent,javax.swing.Icon"); +Clazz.defineMethod (c$, "getDisabledSelectedIcon", +function (component, icon) { +return this.getDisabledIcon (component, icon); +}, "javax.swing.JComponent,javax.swing.Icon"); +Clazz.defineMethod (c$, "getSupportsWindowDecorations", +function () { +return false; +}); +Clazz.defineMethod (c$, "initialize", +function () { +}); +Clazz.defineMethod (c$, "uninitialize", +function () { +}); +Clazz.defineMethod (c$, "getDefaults", +function () { +return null; +}); +Clazz.overrideMethod (c$, "toString", +function () { +return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]"; +}); +});