|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.quadrique.jbuildingblocks.gui.LookAndFeelHandler
public class LookAndFeelHandler
LookAndFeel manipulation goodies
| Field Summary | |
|---|---|
static String |
KUNSTSTOFF_CLASS_NAME
|
static String |
METAL_CLASS_NAME
|
static String |
MOTIF_CLASS_NAME
|
static String |
SKIN_CLASS_NAME
constants |
static String |
WINDOWS_CLASS_NAME
|
| Constructor Summary | |
|---|---|
LookAndFeelHandler()
Constructor |
|
| Method Summary | |
|---|---|
void |
addInstalledLookAndFeel()
add the installed look and feels (Metal, Motif, Microsoft on a Microsoft platform, Macintosh on a Macintosh platform) |
void |
addKunststoff()
use this method to add the kunststoff look and feel to the list of LAF. |
void |
addSkin(String zName,
String zTheme)
use this method to add a Skin LAF theme Please note that the skinlf.jar file has to be available in the application class path as well as the theme file |
boolean |
canCurrentLAFBeReplacedOnTheFly()
|
int |
getCurrent()
|
LookAndFeelInfo |
getInfo(int zPosition)
|
LookAndFeelInfo |
getInfo(String zClassName,
String zExtensionName)
|
static LookAndFeelHandler |
getInstance()
This method returns an instance of the LookAndFeelHandler class. |
int |
getNbOfLookAndFeel()
|
int |
getPosition(String zClassName,
String zExtensionName)
|
void |
setLookAndFeel(String zLAFClassName,
String zLAFExtensionName)
try to set the look and feel to the given look and feel class and extension name if not found, the default java look and feel is used |
void |
setLookAndFeelToKunststoff()
try to set the look and feel to the Kunststoff look and feel if not found, the default java look and feel is used |
void |
setLookAndFeelToMetal()
try to set the look and feel to the Metal look and feel if not found, the default java look and feel is used |
void |
setLookAndFeelToMotif()
try to set the look and feel to the motif look and feel if not found, the default java look and feel is used |
void |
setLookAndFeelToWindows()
try to set the look and feel to the windows look and feel if not found, the default java look and feel is used Please note that due to licensing reasons, the windows look and feel is not available on non-microsoft platforms |
void |
updateGui(Component zComponent)
update the component(s) with the current look and feel You would typically call this method after calling setLookAndFeel(). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SKIN_CLASS_NAME
public static final String KUNSTSTOFF_CLASS_NAME
public static final String METAL_CLASS_NAME
public static final String MOTIF_CLASS_NAME
public static final String WINDOWS_CLASS_NAME
| Constructor Detail |
|---|
public LookAndFeelHandler()
| Method Detail |
|---|
public static final LookAndFeelHandler getInstance()
public void addInstalledLookAndFeel()
throws Exception
Exception - if an error occurs
public void addKunststoff()
throws Exception
Exception - if an error occurs
public void addSkin(String zName,
String zTheme)
throws Exception
zName - the skin name ( e.g. "Theme Skin")zTheme - the theme name (e.g. "themepack.zip")
Exception - if an error occurs
public void setLookAndFeel(String zLAFClassName,
String zLAFExtensionName)
zLAFClassName - the look and feel class namezLAFExtensionName - the look and feel extension name (if any)public void setLookAndFeelToKunststoff()
public void setLookAndFeelToWindows()
public void setLookAndFeelToMetal()
public void setLookAndFeelToMotif()
public boolean canCurrentLAFBeReplacedOnTheFly()
throws Exception
Exception - if an error occurspublic void updateGui(Component zComponent)
zComponent - the top component (all the child components will be updated as well)public int getCurrent()
public int getNbOfLookAndFeel()
public LookAndFeelInfo getInfo(int zPosition)
throws Exception
zPosition - from 0 to getNbOfLookAndFeel()-1
Exception - if an error occurs
public LookAndFeelInfo getInfo(String zClassName,
String zExtensionName)
throws Exception
zClassName - the corresponding class namezExtensionName - the extension name (if any, mainly used for skin look and feel)
Exception - if an error occurs
public int getPosition(String zClassName,
String zExtensionName)
throws Exception
zClassName - the corresponding class namezExtensionName - the extension name (if any, mainly used for skin look and feel)
Exception - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||