ProgramixGenericLib v5.0.1

com.programix.gui.plaf
Interface LookAndFeelChanger.View

All Known Implementing Classes:
LookAndFeelChanger.LookAndFeelView, LookAndFeelChanger.MetalView
Enclosing class:
LookAndFeelChanger

public static interface LookAndFeelChanger.View

Used to define a generic wrapper for a look and feel change. This is useful when only the theme of a look and feel needs to change.

Author:
Paul Hyde

Method Summary
 void activate()
          Called when this View should become the current View.
 String getDisplayName()
          Returns a name that describes this view in a format suitable for display to the user.
 boolean useWindowDecorations()
          Returns true if this view is backed by a LookAndFeel that wants to decorate the windows entirely.
 

Method Detail

activate

void activate()
              throws Exception
Called when this View should become the current View. If any exception is thrown from this method, the look and feel changer assumes that the change to this View was unsuccessful and the changer automatically moves on to attempt to activate the next view.

The implementation of this method should call:

 UIManager.setLookAndFeel
 
as appropriate. However, after activate returns (without throwing an exception) the LookAndFeelChanger will automatically call SwingUtilities.updateComponentTreeUI for all of the frames and windows. If will also validate each frame and window to have components re-layout with the new look.

NOTE: This method must be called by the event handling thread (or else an IllegalStateException is thrown).

Throws:
Exception - if this View can not be activated. The stack trace will generally be sent to System.err and the look and feel changer will attempt to activate the next view.

getDisplayName

String getDisplayName()
Returns a name that describes this view in a format suitable for display to the user.


useWindowDecorations

boolean useWindowDecorations()
Returns true if this view is backed by a LookAndFeel that wants to decorate the windows entirely.


ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.