java.lang.Object
org.jext.gui.Skin
org.jext.gui.GenericSkin
- public class GenericSkin
- extends Skin
This is a generic skin class which will be able to wrap most possible skin,
actually the normal LookAndFeel's. If you need special processing, write
your own Skin interface implementation or extend this one.
|
Constructor Summary |
GenericSkin(java.lang.String name,
java.lang.String intName,
javax.swing.LookAndFeel laf)
Constructor; use it to provide the caption, the internal name and the built
LookAndFeel instance (the same you would pass to UIManager.setLookAndFeel). |
GenericSkin(java.lang.String name,
java.lang.String intName,
javax.swing.LookAndFeel laf,
java.lang.ClassLoader cl)
Constructor; use it to provide the caption, the internal name and the built
LookAndFeel instance (the same you would pass to UIManager.setLookAndFeel). |
GenericSkin(java.lang.String name,
java.lang.String intName,
java.lang.String lafClassName)
Constructor; use it to provide the caption, the internal name and the name of
the class to use as LookAndFeel(the same you would pass to UIManager.setLookAndFeel). |
GenericSkin(java.lang.String name,
java.lang.String intName,
java.lang.String lafClassName,
java.lang.ClassLoader cl)
Constructor; use it to provide the caption, the internal name, the name of
the class to use as LookAndFeel(the same you would pass to UIManager.setLookAndFeel)
and the ClassLoader that will be used to load the LookAndFeel and related classes;
useful especially if you write a plugin. |
|
Method Summary |
void |
apply()
This method applies the skin; if you have not called one of the constructors, it will fail silently. |
java.lang.String |
getSkinInternName()
The internal name of the skin, used to identify it; it mustn't be translated. |
java.lang.String |
getSkinName()
The name to show inside the option dialog; this should be get using a Jext property
with Jext.getProperty. |
boolean |
isAvailable()
If your skin is not available in certain cases, override this; it could even call
the LookAndFeel.isAvailable method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
private java.lang.String name
intName
private java.lang.String intName
lafClassName
protected java.lang.String lafClassName
laf
protected javax.swing.LookAndFeel laf
skLoader
protected java.lang.ClassLoader skLoader
GenericSkin
public GenericSkin(java.lang.String name,
java.lang.String intName,
java.lang.String lafClassName)
- Constructor; use it to provide the caption, the internal name and the name of
the class to use as LookAndFeel(the same you would pass to UIManager.setLookAndFeel).
GenericSkin
public GenericSkin(java.lang.String name,
java.lang.String intName,
java.lang.String lafClassName,
java.lang.ClassLoader cl)
- Constructor; use it to provide the caption, the internal name, the name of
the class to use as LookAndFeel(the same you would pass to UIManager.setLookAndFeel)
and the ClassLoader that will be used to load the LookAndFeel and related classes;
useful especially if you write a plugin.
In this case pass as classLoader .class.getClassLoader(), as KLNF does.
GenericSkin
public GenericSkin(java.lang.String name,
java.lang.String intName,
javax.swing.LookAndFeel laf)
- Constructor; use it to provide the caption, the internal name and the built
LookAndFeel instance (the same you would pass to UIManager.setLookAndFeel).
GenericSkin
public GenericSkin(java.lang.String name,
java.lang.String intName,
javax.swing.LookAndFeel laf,
java.lang.ClassLoader cl)
- Constructor; use it to provide the caption, the internal name and the built
LookAndFeel instance (the same you would pass to UIManager.setLookAndFeel).
This constructor allows you to specify a ClassLoader that will be used to load
the LookAndFeel and related classes; useful especially if you write a plugin.
In this case pass as classLoader .class.getClassLoader(), as KLNF does.
isAvailable
public boolean isAvailable()
- Description copied from class:
Skin
- If your skin is not available in certain cases, override this; it could even call
the LookAndFeel.isAvailable method. (But you shouldn't since LookAndFeel creation
is expensive).
- Overrides:
isAvailable in class Skin
getSkinName
public java.lang.String getSkinName()
- Description copied from class:
Skin
- The name to show inside the option dialog; this should be get using a Jext property
with Jext.getProperty.
- Specified by:
getSkinName in class Skin
getSkinInternName
public java.lang.String getSkinInternName()
- Description copied from class:
Skin
- The internal name of the skin, used to identify it; it mustn't be translated.
- Specified by:
getSkinInternName in class Skin
apply
public void apply()
throws java.lang.Throwable
- This method applies the skin; if you have not called one of the constructors, it will fail silently.
- Specified by:
apply in class Skin