diff options
Diffstat (limited to 'libjava/javax/swing/LookAndFeel.java')
-rw-r--r-- | libjava/javax/swing/LookAndFeel.java | 208 |
1 files changed, 125 insertions, 83 deletions
diff --git a/libjava/javax/swing/LookAndFeel.java b/libjava/javax/swing/LookAndFeel.java index 173d2fa..aa6b8a2 100644 --- a/libjava/javax/swing/LookAndFeel.java +++ b/libjava/javax/swing/LookAndFeel.java @@ -1,4 +1,4 @@ -/* LookAndFeel.java -- +/* LookAndFeel.java -- Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,92 +35,134 @@ this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; import javax.swing.text.JTextComponent; + public abstract class LookAndFeel { - public UIDefaults getDefaults() - { - //This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. - return null; - } - - public abstract String getDescription(); - public abstract String getID(); - public abstract String getName(); - - public void initialize() - { - //UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults(). - } - - static void installBorder(JComponent c, String defaultBorderName) - { - //Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource. - } - - public static void installColors(JComponent c, String defaultBgName, String defaultFgName) - { - //Convenience method for initializing a component's foreground and background color properties with values from the current defaults table. - } - - public static void installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName) - { - //Convenience method for initializing a components foreground background and font properties with values from the current defaults table. - } - - public abstract boolean isNativeLookAndFeel(); - public abstract boolean isSupportedLookAndFeel(); - - public static void loadKeyBindings(InputMap retMap, Object[] keys) - { - //Loads the bindings in keys into retMap. - } - - public static ComponentInputMap makeComponentInputMap(JComponent c, Object[] keys) - { - // Creates a ComponentInputMap from keys. - return null; - } - - public static Object makeIcon(Class baseClass, String gifFile) - { - //Utility method that creates a UIDefaults.LazyValue that creates an ImageIcon UIResource for the specified gifFile filename. - return null; - } - - public static InputMap makeInputMap(Object[] keys) - { - //Creates a InputMap from keys. - return null; - } - - public static JTextComponent.KeyBinding[] makeKeyBindings(Object[] keyBindingList) - { - // Convenience method for building lists of KeyBindings. - return null; - } - - - public String toString() - { - //Returns a string that displays and identifies this object's properties. - return "LookAndFeel"; - } - - public void uninitialize() - { - //UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel. - } - - - public static void uninstallBorder(JComponent c) - { - //Convenience method for un-installing a component's default border on the specified component if the border is currently an instance of UIResource. - } - + /** + * This method is called once by UIManager.setLookAndFeel to create + * the look and feel specific defaults table. + * + * @return the UI defaults + */ + public UIDefaults getDefaults() + { + return null; + } + + public abstract String getDescription(); + + public abstract String getID(); + + public abstract String getName(); + + /** + * UIManager.setLookAndFeel calls this method before the first call + * (and typically the only call) to getDefaults(). + */ + public void initialize() + { + } + + /** + * Convenience method for installing a component's default Border object + * on the specified component if either the border is currently null + * or already an instance of UIResource. + */ + public static void installBorder(JComponent c, String defaultBorderName) + { + } + + /** + * Convenience method for initializing a component's foreground and + * background color properties with values from the current defaults table. + */ + public static void installColors(JComponent c, String defaultBgName, String defaultFgName) + { + } + + /** + * Convenience method for initializing a components foreground background + * and font properties with values from the current defaults table. + */ + public static void installColorsAndFont(JComponent component, + String defaultBgName, + String defaultFgName, + String defaultFontName) + { + } + + public abstract boolean isNativeLookAndFeel(); + + public abstract boolean isSupportedLookAndFeel(); + + /** + * Loads the bindings in keys into retMap. + */ + public static void loadKeyBindings(InputMap retMap, Object[] keys) + { + } + + /** + * Creates a ComponentInputMap from keys. + */ + public static ComponentInputMap makeComponentInputMap(JComponent c, + Object[] keys) + { + return null; + } + + /** + * Utility method that creates a UIDefaults.LazyValue that creates an + * ImageIcon UIResource for the specified gifFile filename. + */ + public static Object makeIcon(Class baseClass, String gifFile) + { + return null; + } + + /** + * Creates a InputMap from keys. + */ + public static InputMap makeInputMap(Object[] keys) + { + return null; + } + + /** + * Convenience method for building lists of KeyBindings. + */ + public static JTextComponent.KeyBinding[] makeKeyBindings(Object[] keyBindingList) + { + return null; + } + + /** + * Returns a string that displays and identifies this object's properties. + * + * @return the string "LookAndFeel" + */ + public String toString() + { + return "LookAndFeel"; + } + + /** + * UIManager.setLookAndFeel calls this method just before we're replaced by + * a new default look and feel. + */ + public void uninitialize() + { + } + + /** + * Convenience method for un-installing a component's default border on the + * specified component if the border is currently an instance of UIResource. + */ + public static void uninstallBorder(JComponent c) + { + } } - |