com.l2fprod.gui.plaf.skin.impl.gtk
Class GtkSkin

java.lang.Object
  extended by com.l2fprod.gui.plaf.skin.impl.AbstractSkin
      extended by com.l2fprod.gui.plaf.skin.impl.gtk.GtkSkin
All Implemented Interfaces:
Skin

public final class GtkSkin
extends AbstractSkin

GTK (The Gimp Toolkit) Skin Support.
GtkSkin can be used in conjunction with a gtkrc file.
You can find skins at:

  • gtk.themes.org

    Simply extract the skin file in a directory and use:

    SkinLookAndFeel.setSkin(new GtkSkin("c:\downloads\myskin\gtk\gtkrc"));
    UIManager.setLookAndFeel("com.l2fprod.gui.plaf.skin.SkinLookAndFeel");


    to enable skins in your application !



    Created on 28/01/2000 by Frederic Lavigne, fred@L2FProd.com

    Version:
    $Revision: 1.2 $, $Date: 2003/12/06 21:50:13 $
    Author:
    $Author: l2fprod $

    Field Summary
     
    Fields inherited from class com.l2fprod.gui.plaf.skin.impl.AbstractSkin
    button, frame, personality, progress, resources, scrollbar, separator, slider, splitpane, tab
     
    Constructor Summary
    GtkSkin(GtkParser parser)
              Constructor for the GtkSkin object
    GtkSkin(java.lang.String filename)
              Construct a new GtkSkin using the given filename
    GtkSkin(java.net.URL url)
              Construct a new GtkSkin using the given url
    GtkSkin(java.net.URL url, java.io.InputStream input)
              Constructor for the GtkSkin object
     
    Method Summary
     SkinButton getButton()
              Gets the Button attribute of the GtkSkin object
     java.lang.String[] getColors()
              Gets the Colors attribute of the GtkSkin object
    static java.lang.String getDefaultSkinLocation()
              Get the user's current GTK skin location.
    This could be used on a Linux platform.
     SkinFrame getFrame()
              Gets the Frame attribute of the GtkSkin object
     SkinPersonality getPersonality()
              Gets the Personality attribute of the GtkSkin object
     SkinProgress getProgress()
              Gets the Progress attribute of the GtkSkin object
     SkinScrollbar getScrollbar()
              Gets the Scrollbar attribute of the GtkSkin object
     SkinSlider getSlider()
              Gets the Slider attribute of the GtkSkin object
     SkinSplitPane getSplitPane()
              Gets the SplitPane attribute of the GtkSkin object
     SkinTab getTab()
              Gets the Tab attribute of the GtkSkin object
     void initComponentDefaults(javax.swing.UIDefaults table)
               
     
    Methods inherited from class com.l2fprod.gui.plaf.skin.impl.AbstractSkin
    getResource, getSeparator, unload
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    GtkSkin

    public GtkSkin(java.lang.String filename)
            throws java.lang.Exception
    Construct a new GtkSkin using the given filename

    Parameters:
    filename - path to a gtk skin (gtkrc) file
    Throws:
    java.lang.Exception - Description of Exception

    GtkSkin

    public GtkSkin(java.net.URL url)
            throws java.lang.Exception
    Construct a new GtkSkin using the given url

    Parameters:
    url - path to a gtk skin (gtkrc) file
    Throws:
    java.lang.Exception - Description of Exception

    GtkSkin

    public GtkSkin(java.net.URL url,
                   java.io.InputStream input)
            throws java.lang.Exception
    Constructor for the GtkSkin object

    Parameters:
    url - Description of Parameter
    input - Description of Parameter
    Throws:
    java.lang.Exception - Description of Exception

    GtkSkin

    public GtkSkin(GtkParser parser)
            throws java.lang.Exception
    Constructor for the GtkSkin object

    Parameters:
    parser - Description of Parameter
    Throws:
    java.lang.Exception - Description of Exception
    Method Detail

    getPersonality

    public SkinPersonality getPersonality()
    Gets the Personality attribute of the GtkSkin object

    Specified by:
    getPersonality in interface Skin
    Overrides:
    getPersonality in class AbstractSkin
    Returns:
    The Personality value

    getButton

    public SkinButton getButton()
    Gets the Button attribute of the GtkSkin object

    Specified by:
    getButton in interface Skin
    Overrides:
    getButton in class AbstractSkin
    Returns:
    The Button value

    getFrame

    public SkinFrame getFrame()
    Gets the Frame attribute of the GtkSkin object

    Specified by:
    getFrame in interface Skin
    Overrides:
    getFrame in class AbstractSkin
    Returns:
    The Frame value

    getTab

    public SkinTab getTab()
    Gets the Tab attribute of the GtkSkin object

    Specified by:
    getTab in interface Skin
    Overrides:
    getTab in class AbstractSkin
    Returns:
    The Tab value

    getProgress

    public SkinProgress getProgress()
    Gets the Progress attribute of the GtkSkin object

    Specified by:
    getProgress in interface Skin
    Overrides:
    getProgress in class AbstractSkin
    Returns:
    The Progress value

    getColors

    public java.lang.String[] getColors()
    Gets the Colors attribute of the GtkSkin object

    Specified by:
    getColors in interface Skin
    Overrides:
    getColors in class AbstractSkin
    Returns:
    The Colors value

    getScrollbar

    public SkinScrollbar getScrollbar()
    Gets the Scrollbar attribute of the GtkSkin object

    Specified by:
    getScrollbar in interface Skin
    Overrides:
    getScrollbar in class AbstractSkin
    Returns:
    The Scrollbar value

    getSplitPane

    public SkinSplitPane getSplitPane()
    Gets the SplitPane attribute of the GtkSkin object

    Specified by:
    getSplitPane in interface Skin
    Overrides:
    getSplitPane in class AbstractSkin
    Returns:
    The SplitPane value

    getSlider

    public SkinSlider getSlider()
    Gets the Slider attribute of the GtkSkin object

    Specified by:
    getSlider in interface Skin
    Overrides:
    getSlider in class AbstractSkin
    Returns:
    The Slider value

    initComponentDefaults

    public void initComponentDefaults(javax.swing.UIDefaults table)
    Specified by:
    initComponentDefaults in interface Skin
    Overrides:
    initComponentDefaults in class AbstractSkin

    getDefaultSkinLocation

    public static java.lang.String getDefaultSkinLocation()
                                                   throws GtkSkinNotFoundException
    Get the user's current GTK skin location.
    This could be used on a Linux platform. It looks for the user theme in the ~/.gtkrc user file.

    Returns:
    the skin location or null if the user's current skin can't be found
    Throws:
    GtkSkinNotFoundException - Description of Exception