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 SkinButtongetButton()Gets the Button attribute of the GtkSkin objectjava.lang.String[]getColors()Gets the Colors attribute of the GtkSkin objectstatic java.lang.StringgetDefaultSkinLocation()Get the user's current GTK skin location.
This could be used on a Linux platform.SkinFramegetFrame()Gets the Frame attribute of the GtkSkin objectSkinPersonalitygetPersonality()Gets the Personality attribute of the GtkSkin objectSkinProgressgetProgress()Gets the Progress attribute of the GtkSkin objectSkinScrollbargetScrollbar()Gets the Scrollbar attribute of the GtkSkin objectSkinSlidergetSlider()Gets the Slider attribute of the GtkSkin objectSkinSplitPanegetSplitPane()Gets the SplitPane attribute of the GtkSkin objectSkinTabgetTab()Gets the Tab attribute of the GtkSkin objectvoidinitComponentDefaults(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.ExceptionConstruct 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.ExceptionConstruct 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.ExceptionConstructor 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:
getPersonalityin interfaceSkin- Overrides:
getPersonalityin classAbstractSkin- Returns:
- The Personality value
-
getButton
public SkinButton getButton()
Gets the Button attribute of the GtkSkin object- Specified by:
getButtonin interfaceSkin- Overrides:
getButtonin classAbstractSkin- Returns:
- The Button value
-
getFrame
public SkinFrame getFrame()
Gets the Frame attribute of the GtkSkin object- Specified by:
getFramein interfaceSkin- Overrides:
getFramein classAbstractSkin- Returns:
- The Frame value
-
getTab
public SkinTab getTab()
Gets the Tab attribute of the GtkSkin object- Specified by:
getTabin interfaceSkin- Overrides:
getTabin classAbstractSkin- Returns:
- The Tab value
-
getProgress
public SkinProgress getProgress()
Gets the Progress attribute of the GtkSkin object- Specified by:
getProgressin interfaceSkin- Overrides:
getProgressin classAbstractSkin- Returns:
- The Progress value
-
getColors
public java.lang.String[] getColors()
Gets the Colors attribute of the GtkSkin object- Specified by:
getColorsin interfaceSkin- Overrides:
getColorsin classAbstractSkin- Returns:
- The Colors value
-
getScrollbar
public SkinScrollbar getScrollbar()
Gets the Scrollbar attribute of the GtkSkin object- Specified by:
getScrollbarin interfaceSkin- Overrides:
getScrollbarin classAbstractSkin- Returns:
- The Scrollbar value
-
getSplitPane
public SkinSplitPane getSplitPane()
Gets the SplitPane attribute of the GtkSkin object- Specified by:
getSplitPanein interfaceSkin- Overrides:
getSplitPanein classAbstractSkin- Returns:
- The SplitPane value
-
getSlider
public SkinSlider getSlider()
Gets the Slider attribute of the GtkSkin object- Specified by:
getSliderin interfaceSkin- Overrides:
getSliderin classAbstractSkin- Returns:
- The Slider value
-
initComponentDefaults
public void initComponentDefaults(javax.swing.UIDefaults table)
- Specified by:
initComponentDefaultsin interfaceSkin- Overrides:
initComponentDefaultsin classAbstractSkin
-
getDefaultSkinLocation
public static java.lang.String getDefaultSkinLocation() throws GtkSkinNotFoundExceptionGet 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
-
-