ProgramixGenericLib v5.0.1

com.programix.gui.plaf
Class LookAndFeelChanger.LookAndFeelView

java.lang.Object
  extended by com.programix.gui.plaf.LookAndFeelChanger.LookAndFeelView
All Implemented Interfaces:
LookAndFeelChanger.View
Enclosing class:
LookAndFeelChanger

public static class LookAndFeelChanger.LookAndFeelView
extends Object
implements LookAndFeelChanger.View


Constructor Summary
LookAndFeelChanger.LookAndFeelView(LookAndFeel lookAndFeel)
           
LookAndFeelChanger.LookAndFeelView(String lookAndFeelClassName)
           
 
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.
 LookAndFeel getLookAndFeel()
           
 boolean useWindowDecorations()
          Returns true if this view is backed by a LookAndFeel that wants to decorate the windows entirely.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookAndFeelChanger.LookAndFeelView

public LookAndFeelChanger.LookAndFeelView(LookAndFeel lookAndFeel)

LookAndFeelChanger.LookAndFeelView

public LookAndFeelChanger.LookAndFeelView(String lookAndFeelClassName)
                                   throws UnsupportedLookAndFeelException
Throws:
UnsupportedLookAndFeelException
Method Detail

activate

public void activate()
              throws Exception
Description copied from interface: LookAndFeelChanger.View
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).

Specified by:
activate in interface LookAndFeelChanger.View
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

public String getDisplayName()
Description copied from interface: LookAndFeelChanger.View
Returns a name that describes this view in a format suitable for display to the user.

Specified by:
getDisplayName in interface LookAndFeelChanger.View

useWindowDecorations

public boolean useWindowDecorations()
Description copied from interface: LookAndFeelChanger.View
Returns true if this view is backed by a LookAndFeel that wants to decorate the windows entirely.

Specified by:
useWindowDecorations in interface LookAndFeelChanger.View

getLookAndFeel

public LookAndFeel getLookAndFeel()

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.