|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.LookAndFeel
Unsafe:
Constructor Summary | |
LookAndFeel()
Suppressed: |
Method Summary | |
UIDefaults |
getDefaults()
Suppressed: This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. |
abstract String |
getDescription()
Suppressed: Return a one line description of this look and feel implementation, e.g. |
static Object |
getDesktopPropertyValue(String systemPropertyName,
Object fallbackValue)
Suppressed: Returns the value of the specified system desktop property by invoking Toolkit.getDefaultToolkit().getDesktopProperty() . |
abstract String |
getID()
Suppressed: Return a string that identifies this look and feel. |
abstract String |
getName()
Suppressed: Return a short string that identifies this look and feel, e.g. |
boolean |
getSupportsWindowDecorations()
Suppressed: Returns true if the LookAndFeel returned
RootPaneUI instances support providing Window decorations
in a JRootPane . |
void |
initialize()
Suppressed: UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults(). |
static void |
installBorder(JComponent c,
String defaultBorderName)
Suppressed: 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. |
static void |
installColors(JComponent c,
String defaultBgName,
String defaultFgName)
Suppressed: Convenience method for initializing a component's foreground and background color properties with values from the current defaults table. |
static void |
installColorsAndFont(JComponent c,
String defaultBgName,
String defaultFgName,
String defaultFontName)
Suppressed: Convenience method for initializing a components foreground background and font properties with values from the current defaults table. |
abstract boolean |
isNativeLookAndFeel()
Suppressed: If the underlying platform has a "native" look and feel, and this is an implementation of it, return true. |
abstract boolean |
isSupportedLookAndFeel()
Suppressed: Return true if the underlying platform supports and or permits this look and feel. |
static void |
loadKeyBindings(InputMap retMap,
Object[] keys)
Suppressed: Loads the bindings in keys into retMap . |
static ComponentInputMap |
makeComponentInputMap(JComponent c,
Object[] keys)
Suppressed: Creates a ComponentInputMap from keys . |
static Object |
makeIcon(Class baseClass,
String gifFile)
Suppressed: Utility method that creates a UIDefaults.LazyValue that creates an ImageIcon UIResource for the specified gifFile
filename. |
static InputMap |
makeInputMap(Object[] keys)
Suppressed: Creates a InputMap from keys . |
static javax.swing.text.JTextComponent.KeyBinding[] |
makeKeyBindings(Object[] keyBindingList)
Suppressed: Convenience method for building lists of KeyBindings. |
void |
provideErrorFeedback(Component component)
Suppressed: Invoked when the user attempts an invalid operation, such as pasting into an uneditable JTextField
that has focus. |
String |
toString()
Suppressed: Returns a string that displays and identifies this object's properties. |
void |
uninitialize()
Suppressed: UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel. |
static void |
uninstallBorder(JComponent c)
Suppressed: Convenience method for un-installing a component's default border on the specified component if the border is currently an instance of UIResource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LookAndFeel()
Method Detail |
public static void installColors(JComponent c, String defaultBgName, String defaultFgName)
c
- the target component for installing default color/font propertiesdefaultBgName
- the key for the default backgrounddefaultFgName
- the key for the default foregroundinstallColorsAndFont(javax.swing.JComponent, java.lang.String, java.lang.String, java.lang.String)
,
UIManager.getColor(java.lang.Object)
public static void installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName)
c
- the target component for installing default color/font propertiesdefaultBgName
- the key for the default backgrounddefaultFgName
- the key for the default foregrounddefaultFontName
- the key for the default fontinstallColors(javax.swing.JComponent, java.lang.String, java.lang.String)
,
UIManager.getColor(java.lang.Object)
,
UIManager.getFont(java.lang.Object)
public static void installBorder(JComponent c, String defaultBorderName)
c
- the target component for installing default borderdefaultBorderName
- the key specifying the default borderpublic static void uninstallBorder(JComponent c)
c
- the target component for uninstalling default borderpublic static javax.swing.text.JTextComponent.KeyBinding[] makeKeyBindings(Object[] keyBindingList)
Return an array of KeyBindings, one for each KeyStroke,Action pair
in keyBindingList. A KeyStroke can either be a string in
the format specified by the KeyStroke.getKeyStroke
method or a KeyStroke object.
Actions are strings. Here's an example:
JTextComponent.KeyBinding[] multilineBindings = makeKeyBindings( new Object[] { "UP", DefaultEditorKit.upAction, "DOWN", DefaultEditorKit.downAction, "PAGE_UP", DefaultEditorKit.pageUpAction, "PAGE_DOWN", DefaultEditorKit.pageDownAction, "ENTER", DefaultEditorKit.insertBreakAction, "TAB", DefaultEditorKit.insertTabAction });
keyBindingList
- an array of KeyStroke,Action pairs
public static InputMap makeInputMap(Object[] keys)
keys
. keys
describes the InputMap, with every even number item being a String
giving the KeyStroke as speced in
KeyStroke.getKeyStroke(String)
(or a KeyStroke), and every odd number item the Object
used to determine the associated Action in an ActionMap.
public static ComponentInputMap makeComponentInputMap(JComponent c, Object[] keys)
keys
. keys
describes the InputMap, with every even number item being a String
giving
the KeyStroke as speced in KeyStroke.getKeyStroke(String)
(or a KeyStroke), and every odd number item the Object
used to determine the associated Action in an ActionMap.
public static void loadKeyBindings(InputMap retMap, Object[] keys)
keys
into retMap
.
This does not remove any existing bindings in retMap
.
keys
describes the InputMap, with every even number item being a String
giving
the KeyStroke as speced in KeyStroke.getKeyStroke(String)
(or a KeyStroke), and every odd number item the Object
used to determine the associated Action in an ActionMap.
public static Object makeIcon(Class baseClass, String gifFile)
gifFile
filename.
public void provideErrorFeedback(Component component)
JTextField
that has focus. The default implementation beeps. Subclasses
that wish different behavior should override this and provide
the additional feedback.
component
- Component the error occured in, may be null
indicating the error condition is not directly
associated with a Component
.public static Object getDesktopPropertyValue(String systemPropertyName, Object fallbackValue)
Toolkit.getDefaultToolkit().getDesktopProperty()
.
If the current value of the specified property is null, the
fallbackValue is returned.
systemPropertyName
- the name of the system desktop property being queriedfallbackValue
- the object to be returned as the value if the system value is null
java.awt.Toolkit#getDesktopProperty
public abstract String getName()
public abstract String getID()
public abstract String getDescription()
public boolean getSupportsWindowDecorations()
LookAndFeel
returned
RootPaneUI
instances support providing Window decorations
in a JRootPane
.
The default implementation returns false, subclasses that support Window decorations should override this and return true.
JDialog.setDefaultLookAndFeelDecorated(boolean)
,
JFrame.setDefaultLookAndFeelDecorated(boolean)
,
JRootPane.setWindowDecorationStyle(int)
public abstract boolean isNativeLookAndFeel()
public abstract boolean isSupportedLookAndFeel()
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
public void initialize()
uninitialize()
,
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
public void uninitialize()
initialize()
public UIDefaults getDefaults()
initialize()
,
uninitialize()
,
UIManager.setLookAndFeel(javax.swing.LookAndFeel)
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |