|
ProgramixGenericLib v4.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.programix.gui.plaf.LookAndFeelChanger
public class LookAndFeelChanger
Used to cycle through a set of look and feels using a keystroke.
The methods (and constructors) of this class can be called by any thread (not just by the event thread).
| Nested Class Summary | |
|---|---|
static class |
LookAndFeelChanger.LookAndFeelView
|
class |
LookAndFeelChanger.MetalView
An implementation of LookAndFeelChanger.View that is useful for times when all
that needs to change is the MetalTheme of the
MetalLookAndFeel. |
static interface |
LookAndFeelChanger.View
Used to define a generic wrapper for a look and feel change. |
| Constructor Summary | |
|---|---|
LookAndFeelChanger()
Creates a changes that is not bound to any component. |
|
LookAndFeelChanger(JComponent bindTo)
Creates a changer bound to the specified component that advanced the view when F12 is pressed. |
|
LookAndFeelChanger(JComponent bindTo,
String keyStroke)
Creates a new changer and binds it to the specified component and listens for the specified keystroke. |
|
| Method Summary | |
|---|---|
void |
addMetalThemeView(String themeClassName,
String themeDisplayName)
Creates a LookAndFeelChanger.MetalView for the specified theme class. |
void |
addStandardMetalViews()
Creates and adds a set of standard Metal themes. |
boolean |
addSystemView()
Adds the view for the default system look and feel to the set of views. |
void |
bind(JComponent bindTo,
String keyStroke)
|
static LookAndFeelChanger |
createStandard(JComponent bindTo,
String keyStroke)
Creates a standard changer, add all the standard metal views, and shows the first view. |
LookAndFeelChanger.View |
getSystemView()
Gets the LookAndFeelChanger.View for the default system look and feel. |
static boolean |
isMetalThemeAvailable(String metalThemeClassName)
Returns true if the specified class is available. |
void |
showFirstLook()
|
void |
showNextLook()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LookAndFeelChanger(JComponent bindTo,
String keyStroke)
bindTo - component to bind to, if null, no keystroke assigned.keyStroke - the keystroke to listen for to show the next view.public LookAndFeelChanger(JComponent bindTo)
public LookAndFeelChanger()
| Method Detail |
|---|
public static LookAndFeelChanger createStandard(JComponent bindTo,
String keyStroke)
public void bind(JComponent bindTo,
String keyStroke)
public void showFirstLook()
public void showNextLook()
public void addStandardMetalViews()
public static boolean isMetalThemeAvailable(String metalThemeClassName)
MetalTheme.
public void addMetalThemeView(String themeClassName,
String themeDisplayName)
LookAndFeelChanger.MetalView for the specified theme class. The view
is added to the list of views. If the view can not be created
(likely because the Metal theme class does not exist on this machine)
null is returned.
themeClassName - classname of a subclass of MetalTheme.themeDisplayName - user appropriate name for display
public LookAndFeelChanger.View getSystemView()
throws UnsupportedLookAndFeelException,
IllegalStateException
LookAndFeelChanger.View for the default system look and feel. If there are
any problems locating and creating the default system look and feel,
an exception is thrown.
NOTE: This method must be called by the event handling thread (or else an exception is thrown).
UnsupportedLookAndFeelException - if the default system look
and feel is unavailable.
IllegalStateException - if not called by the event handling thread.public boolean addSystemView()
NOTE: This method must be called by the event handling thread (or else an exception is thrown).
IllegalStateException - if not called by the event handling thread.
|
ProgramixGenericLib v4.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||