SkinLF
Version 1.1

com.l2fprod.gui.plaf.skin
Class SkinLookAndFeel

java.lang.Object
  |
  +--javax.swing.LookAndFeel
        |
        +--javax.swing.plaf.basic.BasicLookAndFeel
              |
              +--com.l2fprod.gui.plaf.skin.SkinLookAndFeel
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LinuxLookAndFeel

public class SkinLookAndFeel
extends javax.swing.plaf.basic.BasicLookAndFeel

Skin Look And Feel Main Class.
Use this class to set the current skin or to load skins.
See L2FProd.com website for the complete description of a theme pack.

Version:
$Revision: 1.15 $, $Date: 2001/07/29 20:37:02 $
Author:
$Author: l2fprod $
See Also:
Serialized Form

Field Summary
static java.lang.String VERSION
           
 
Constructor Summary
SkinLookAndFeel()
           
 
Method Summary
static void checkRequiredVersion(java.lang.String required)
           
 java.lang.String getDescription()
           
 java.lang.String getID()
           
 java.lang.String getName()
           
static Skin getSkin()
          Return the current skin.
 boolean isNativeLookAndFeel()
           
 boolean isSupportedLookAndFeel()
           
static Skin loadDefaultThemePack()
          Load the default theme pack.
Skin Look And Feel will look for the resource file named skinlf-themepack.xml in the user classpath (using SkinLookAndFeel.class.getResource("/skinlf-themepack.xml")).
static Skin loadSkin(java.lang.String filename)
          Load a skin from the given filename.
SkinLF will use the filename to guess which theme to instanciate
static Skin loadSkin(java.net.URL url)
          Load a skin from the given url.
SkinLF will use the url filename to guess which theme to instanciate
static Skin loadThemePack(java.lang.String filename)
          Load a Theme Pack from the given zip file.
static Skin loadThemePack(java.net.URL url)
          Load a Theme Pack from the given zip url.
static Skin loadThemePackDefinition(java.net.URL url)
          Load a Theme Pack from the given theme pack definition.
static void setSkin(Skin skin)
          Set the skin used by the Skin Look And Feel
 
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
getDefaults
 
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, getSupportsWindowDecorations, initialize, installBorder, installColors, installColorsAndFont, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninitialize, uninstallBorder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

SkinLookAndFeel

public SkinLookAndFeel()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in class javax.swing.LookAndFeel

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class javax.swing.LookAndFeel

getID

public java.lang.String getID()
Specified by:
getID in class javax.swing.LookAndFeel

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
Specified by:
isNativeLookAndFeel in class javax.swing.LookAndFeel

isSupportedLookAndFeel

public boolean isSupportedLookAndFeel()
Specified by:
isSupportedLookAndFeel in class javax.swing.LookAndFeel

setSkin

public static void setSkin(Skin skin)
Set the skin used by the Skin Look And Feel

Parameters:
skin - a skin

getSkin

public static Skin getSkin()
Return the current skin.
If the current skin has not yet been set, Skin Look And Feel will attempt to load a themepack from the property skinlf.themepack (set on the command line using -Dskinlf.themepack=, then the user theme pack located in /.skinlf/themepack.zip. If this theme pack is not found, an error will be thrown.

Returns:
the current skin

loadSkin

public static Skin loadSkin(java.lang.String filename)
                     throws java.lang.Exception
Load a skin from the given filename.
SkinLF will use the filename to guess which theme to instanciate

Parameters:
filename - the given filename
java.lang.Exception

loadSkin

public static Skin loadSkin(java.net.URL url)
                     throws java.lang.Exception
Load a skin from the given url.
SkinLF will use the url filename to guess which theme to instanciate

java.lang.Exception

loadDefaultThemePack

public static Skin loadDefaultThemePack()
                                 throws java.lang.Exception
Load the default theme pack.
Skin Look And Feel will look for the resource file named skinlf-themepack.xml in the user classpath (using SkinLookAndFeel.class.getResource("/skinlf-themepack.xml")).

java.lang.Exception

loadThemePack

public static Skin loadThemePack(java.lang.String filename)
                          throws java.lang.Exception
Load a Theme Pack from the given zip file.
See L2FProd.com website for the complete description of a theme pack.

Parameters:
filename - the theme pack filename
java.lang.Exception

loadThemePack

public static Skin loadThemePack(java.net.URL url)
                          throws java.lang.Exception
Load a Theme Pack from the given zip url.
See L2FProd.com website for the complete description of a theme pack.

Parameters:
url - the theme pack url
java.lang.Exception

loadThemePackDefinition

public static Skin loadThemePackDefinition(java.net.URL url)
                                    throws java.lang.Exception
Load a Theme Pack from the given theme pack definition.
URLs in the definition must be relative

Parameters:
url - the theme pack definition url
java.lang.Exception

checkRequiredVersion

public static void checkRequiredVersion(java.lang.String required)
                                 throws java.lang.Exception
java.lang.Exception

SkinLF
Version 1.1

www.L2FProd.com
© 2000-2001 L2FProd.com