JAPI 0.9.0
Yet another Java API
API Documentation

net.sf.japi.swing
Class LookAndFeelManager

java.lang.Object
  extended by net.sf.japi.swing.LookAndFeelManager

public final class LookAndFeelManager
extends Object

A class that manages look and feel and provides a corresponding menu. If you want your frames and dialogs to be default look and feel decorated, you currently must invoke the corresponding method setDefaultLookAndFeelDecorated(boolean) before creating any instances of JFrame or JDialog.

Author:
Christian Hujer
Todo:
find a method to update the isDefaultLookAndFeelDecorated state of Frames., perhaps this class should be more a component manager than just a LookAndFeelManager?

Constructor Summary
LookAndFeelManager()
          Create a LookAndFeelManager.
 
Method Summary
 void add(Component comp)
          Add a Component to the roots.
 JMenu createMenu()
          Provide a menu which allows the user to choose from installed look and feels.
 JMenu fillMenu(JMenu menu)
          Fill a menu with look and feel selection items.
 void remove(Component comp)
          Remove a Component to the roots.
 void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
          Set whether JFrames and JDialogs should use the default look and feel decoration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookAndFeelManager

public LookAndFeelManager()
Create a LookAndFeelManager.

Method Detail

add

public void add(Component comp)
Add a Component to the roots.

Parameters:
comp - Component to add to the roots

createMenu

public JMenu createMenu()
Provide a menu which allows the user to choose from installed look and feels.

Returns:
menu with selectable look and feels

fillMenu

public JMenu fillMenu(JMenu menu)
Fill a menu with look and feel selection items.

Parameters:
menu - Menu to fill
Returns:
menu for convenience

remove

public void remove(Component comp)
Remove a Component to the roots.

Parameters:
comp - Component to remove from the roots

setDefaultLookAndFeelDecorated

public void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
Set whether JFrames and JDialogs should use the default look and feel decoration. Also updates all JFrames and JDialogs managed.

Parameters:
defaultLookAndFeelDecorated - true for decoration from default look and feel, false for decoration from os
See Also:
JFrame.setDefaultLookAndFeelDecorated(boolean), JDialog.setDefaultLookAndFeelDecorated(boolean)

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright