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 SkinsFactorygetInstance(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
SkinnedLookAndFeelclass 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
SkinnedJButtonclass 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
SkinnedJRadioButtonclass 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
SkinnedJComboBoxclass 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
SkinnedJComboBoxclass 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
SkinnedJPanelclass 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
SkinnedJTableclass 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
SkinnedJScrollPaneclass 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
SkinnedJScrollPaneclass 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
SkinnedJLabelclass 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
SkinnedJLabelclass 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
SkinnedJPasswordFieldclass 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
SkinnedJTextFieldclass 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
SkinnedJTextAreaclass 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
SkinnedJProgressBarclass implementation for the current skin, or a default JProgressBar if no skin-specific implementation is available.
-