Class GtkSkin
- java.lang.Object
-
- com.l2fprod.gui.plaf.skin.impl.AbstractSkin
-
- 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 $
-
-
Constructor Summary
Constructors Constructor Description GtkSkin(GtkParser parser)
Constructor for the GtkSkin objectGtkSkin(java.lang.String filename)
Construct a new GtkSkin using the given filenameGtkSkin(java.net.URL url)
Construct a new GtkSkin using the given urlGtkSkin(java.net.URL url, java.io.InputStream input)
Constructor for the GtkSkin object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SkinButton
getButton()
Gets the Button attribute of the GtkSkin objectjava.lang.String[]
getColors()
Gets the Colors attribute of the GtkSkin objectstatic 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 objectSkinPersonality
getPersonality()
Gets the Personality attribute of the GtkSkin objectSkinProgress
getProgress()
Gets the Progress attribute of the GtkSkin objectSkinScrollbar
getScrollbar()
Gets the Scrollbar attribute of the GtkSkin objectSkinSlider
getSlider()
Gets the Slider attribute of the GtkSkin objectSkinSplitPane
getSplitPane()
Gets the SplitPane attribute of the GtkSkin objectSkinTab
getTab()
Gets the Tab attribute of the GtkSkin objectvoid
initComponentDefaults(javax.swing.UIDefaults table)
-
Methods inherited from class com.l2fprod.gui.plaf.skin.impl.AbstractSkin
getResource, getSeparator, unload
-
-
-
-
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 Parameterinput
- 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 interfaceSkin
- Overrides:
getPersonality
in classAbstractSkin
- Returns:
- The Personality value
-
getButton
public SkinButton getButton()
Gets the Button attribute of the GtkSkin object- Specified by:
getButton
in interfaceSkin
- Overrides:
getButton
in classAbstractSkin
- Returns:
- The Button value
-
getFrame
public SkinFrame getFrame()
Gets the Frame attribute of the GtkSkin object- Specified by:
getFrame
in interfaceSkin
- Overrides:
getFrame
in classAbstractSkin
- Returns:
- The Frame value
-
getTab
public SkinTab getTab()
Gets the Tab attribute of the GtkSkin object- Specified by:
getTab
in interfaceSkin
- Overrides:
getTab
in classAbstractSkin
- Returns:
- The Tab value
-
getProgress
public SkinProgress getProgress()
Gets the Progress attribute of the GtkSkin object- Specified by:
getProgress
in interfaceSkin
- Overrides:
getProgress
in classAbstractSkin
- Returns:
- The Progress value
-
getColors
public java.lang.String[] getColors()
Gets the Colors attribute of the GtkSkin object- Specified by:
getColors
in interfaceSkin
- Overrides:
getColors
in classAbstractSkin
- Returns:
- The Colors value
-
getScrollbar
public SkinScrollbar getScrollbar()
Gets the Scrollbar attribute of the GtkSkin object- Specified by:
getScrollbar
in interfaceSkin
- Overrides:
getScrollbar
in classAbstractSkin
- Returns:
- The Scrollbar value
-
getSplitPane
public SkinSplitPane getSplitPane()
Gets the SplitPane attribute of the GtkSkin object- Specified by:
getSplitPane
in interfaceSkin
- Overrides:
getSplitPane
in classAbstractSkin
- Returns:
- The SplitPane value
-
getSlider
public SkinSlider getSlider()
Gets the Slider attribute of the GtkSkin object- Specified by:
getSlider
in interfaceSkin
- Overrides:
getSlider
in classAbstractSkin
- Returns:
- The Slider value
-
initComponentDefaults
public void initComponentDefaults(javax.swing.UIDefaults table)
- Specified by:
initComponentDefaults
in interfaceSkin
- Overrides:
initComponentDefaults
in classAbstractSkin
-
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
-
-