|
Quaqua 7.2 2010-07-28 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.LookAndFeel
javax.swing.plaf.basic.BasicLookAndFeel
ch.randelshofer.quaqua.LookAndFeelProxy
public class LookAndFeelProxy
A proxy for LookAndFeel objects. This class enables us to override the behaviour of LookAndFeel objects whithout subclassing them.
Note this class extends BasicLookAndFeel instead of LookAndFeel. This is because some UI classes derived from the Basic LAF don't work if they can't cast the current LookAndFeel to BasicLookAndFeel.
| Field Summary | |
|---|---|
protected javax.swing.LookAndFeel |
target
The target LookAndFeel. |
| Constructor Summary | |
|---|---|
protected |
LookAndFeelProxy()
Creates a new instance with a null target. |
|
LookAndFeelProxy(javax.swing.LookAndFeel target)
Creates a new instance which proxies the supplied target. |
| Method Summary | |
|---|---|
javax.swing.UIDefaults |
getDefaults()
This method is called once by UIManager.setLookAndFeel to create the look and feel specific defaults table. |
java.lang.String |
getDescription()
Return a one line description of this look and feel implementation, e.g. |
java.lang.String |
getID()
Return a string that identifies this look and feel. |
javax.swing.LayoutStyle |
getLayoutStyle()
|
java.lang.String |
getName()
Return a short string that identifies this look and feel, e.g. |
boolean |
getSupportsWindowDecorations()
Returns true if the LookAndFeel returned
RootPaneUI instances support providing Window decorations
in a JRootPane. |
void |
initialize()
UIManager.setLookAndFeel calls this method before the first call (and typically the only call) to getDefaults(). |
boolean |
isNativeLookAndFeel()
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true. |
boolean |
isSupportedLookAndFeel()
Return true if the underlying platform supports and or permits this look and feel. |
void |
provideErrorFeedback(java.awt.Component component)
Invoked when the user attempts an invalid operation, such as pasting into an uneditable JTextField
that has focus. |
protected void |
setTarget(javax.swing.LookAndFeel target)
Sets the target of this proxy. |
void |
uninitialize()
UIManager.setLookAndFeel calls this method just before we're replaced by a new default look and feel. |
| Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel |
|---|
createAudioAction, getAudioActionMap, initClassDefaults, initComponentDefaults, initSystemColorDefaults, loadSystemColors, playSound |
| Methods inherited from class javax.swing.LookAndFeel |
|---|
getDesktopPropertyValue, getDisabledIcon, getDisabledSelectedIcon, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninstallBorder |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected javax.swing.LookAndFeel target
| Constructor Detail |
|---|
public LookAndFeelProxy(javax.swing.LookAndFeel target)
protected LookAndFeelProxy()
| Method Detail |
|---|
protected void setTarget(javax.swing.LookAndFeel target)
public java.lang.String getDescription()
getDescription in class javax.swing.LookAndFeelpublic java.lang.String getID()
getID in class javax.swing.LookAndFeelpublic java.lang.String getName()
getName in class javax.swing.LookAndFeelpublic boolean isNativeLookAndFeel()
isNativeLookAndFeel in class javax.swing.LookAndFeelpublic boolean isSupportedLookAndFeel()
isSupportedLookAndFeel in class javax.swing.LookAndFeelUIManager.setLookAndFeel(javax.swing.LookAndFeel)public void provideErrorFeedback(java.awt.Component component)
JTextField
that has focus. The default implementation beeps. Subclasses
that wish different behavior should override this and provide
the additional feedback.
provideErrorFeedback in class javax.swing.LookAndFeelcomponent - Component the error occured in, may be null
indicating the error condition is not directly
associated with a Component.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.
getSupportsWindowDecorations in class javax.swing.LookAndFeelJDialog.setDefaultLookAndFeelDecorated(boolean),
JFrame.setDefaultLookAndFeelDecorated(boolean),
JRootPane.setWindowDecorationStyle(int)public void initialize()
initialize in class javax.swing.plaf.basic.BasicLookAndFeeluninitialize(),
UIManager.setLookAndFeel(javax.swing.LookAndFeel)public void uninitialize()
uninitialize in class javax.swing.plaf.basic.BasicLookAndFeelinitialize()public javax.swing.UIDefaults getDefaults()
getDefaults in class javax.swing.plaf.basic.BasicLookAndFeelinitialize(),
uninitialize(),
UIManager.setLookAndFeel(javax.swing.LookAndFeel)public javax.swing.LayoutStyle getLayoutStyle()
getLayoutStyle in class javax.swing.LookAndFeel
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||