Package org.jets3t.gui.skins
Class SkinsFactory
java.lang.Object
org.jets3t.gui.skins.SkinsFactory
Manages the creation of skinned GUI elements.
Skinned elements are created using the following process:
- Instantiate a skin-specific class in the skin's package
org.jets3t.gui.skins.<skinName>
- If a skin-specific class is not available or cannot be created, instantiate a generic GUI class instead
Skinned classes are specially-named extensions to standard Swing classes, which must have a
constructor of the form public SkinnedJButton(Properties skinProperties, String itemName)
.
This constructor allows skinned GUI elements to change their look or behaviour based on any
skin-specific properties that are provided, or based on the name of a specific GUI element.
The skinned class names supported by this factory include:
Class name | Extends |
---|---|
SkinnedJButton | javax.swing.JButton |
SkinnedJHtmlLabel | org.jets3t.gui.JHtmlLabel |
SkinnedJPanel | javax.swing.JPanel |
SkinnedLookAndFeel | javax.swing.plaf.metal.MetalLookAndFeel |
- Author:
- James Murty
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateSkinnedJButton
(String itemName) createSkinnedJCheckBox
(String itemName) createSkinnedJComboBox
(String itemName) createSkinnedJHtmlLabel
(String itemName) createSkinnedJHtmlLabel
(String itemName, HyperlinkActivatedListener hyperlinkListener) createSkinnedJMenuItem
(String itemName) createSkinnedJPanel
(String itemName) createSkinnedJPasswordField
(String itemName) createSkinnedJPopupMenu
(String itemName) createSkinnedJProgressBar
(String itemName, int min, int max) createSkinnedJRadioButton
(String itemName) createSkinnedJScrollPane
(String itemName) createSkinnedJScrollPane
(String itemName, Object view) createSkinnedJTable
(String itemName) createSkinnedJTextArea
(String itemName) createSkinnedJTextField
(String itemName) createSkinnedMetalTheme
(String itemName) static SkinsFactory
getInstance
(Properties properties) Provides a skin factory initialised with skin-specific properties from the provided properties set.
-
Field Details
-
NO_SKIN
- See Also:
-
-
Method Details
-
getInstance
Provides a skin factory initialised with skin-specific properties from the provided properties set. Skin-specific properties are identified as those properties with the prefixskin.<skinName>.
- Parameters:
properties
- a set of properties that may contain skin-specific properties.- Returns:
- the skins factory initialised with skin settings.
-
createSkinnedMetalTheme
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedLookAndFeel
class implementation for the current skin, or the default system LookAndFeel if no skin-specific implementation is available.
-
createSkinnedJButton
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJButton
class implementation for the current skin, or a default JButton if no skin-specific implementation is available.
-
createSkinnedJRadioButton
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJRadioButton
class implementation for the current skin, or a default JRadioButton if no skin-specific implementation is available.
-
createSkinnedJComboBox
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJComboBox
class implementation for the current skin, or a default JComboBox if no skin-specific implementation is available.
-
createSkinnedJCheckBox
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJComboBox
class implementation for the current skin, or a default JComboBox if no skin-specific implementation is available.
-
createSkinnedJPanel
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJPanel
class implementation for the current skin, or a default JPanel if no skin-specific implementation is available.
-
createSkinnedJTable
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJTable
class implementation for the current skin, or a default JPanel if no skin-specific implementation is available.
-
createSkinnedJScrollPane
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.view
- the client's viewport view to be used.- Returns:
- a
SkinnedJScrollPane
class implementation for the current skin, or a default JScrollPane if no skin-specific implementation is available.
-
createSkinnedJScrollPane
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJScrollPane
class implementation for the current skin, or a default JScrollPane if no skin-specific implementation is available.
-
createSkinnedJHtmlLabel
public JHtmlLabel createSkinnedJHtmlLabel(String itemName, HyperlinkActivatedListener hyperlinkListener) - Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJLabel
class implementation for the current skin, or a default JHtmlLabel if no skin-specific implementation is available.
-
createSkinnedJHtmlLabel
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJLabel
class implementation for the current skin, or a default JHtmlLabel if no skin-specific implementation is available.
-
createSkinnedJPasswordField
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJPasswordField
class implementation for the current skin, or a default JPasswordField if no skin-specific implementation is available.
-
createSkinnedJTextField
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJTextField
class implementation for the current skin, or a default JTextField if no skin-specific implementation is available.
-
createSkinnedJTextArea
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJTextArea
class implementation for the current skin, or a default JTextArea if no skin-specific implementation is available.
-
createSkinnedJPopupMenu
-
createSkinnedJMenuItem
-
createSkinnedJProgressBar
- Parameters:
itemName
- the name of this specific item in the GUI, which may be used to determine how the skinned item should look or behave.- Returns:
- a
SkinnedJProgressBar
class implementation for the current skin, or a default JProgressBar if no skin-specific implementation is available.
-