ch.randelshofer.gui.icon
Class SliderThumbIcon
java.lang.Object
ch.randelshofer.gui.icon.MultiIcon
ch.randelshofer.gui.icon.SliderThumbIcon
- All Implemented Interfaces:
- javax.swing.Icon
public class SliderThumbIcon
- extends MultiIcon
An Icon with different visuals reflecting the state of the slider
on which it draws on.
- Version:
- 4.0 2007-12-02 Added support for focus ring.
3.0 2005-10-17 Changed superclass to MultIcon.
2.0 2005-03-19 Reworked.
1.0 October 5, 2003 Create..
- Author:
- Werner Randelshofer
|
Constructor Summary |
SliderThumbIcon(javax.swing.Icon[] icons)
Creates a new instance. |
SliderThumbIcon(javax.swing.Icon e,
javax.swing.Icon ep,
javax.swing.Icon d,
javax.swing.Icon i,
javax.swing.Icon di)
Creates a new instance. |
SliderThumbIcon(java.awt.Image[] images)
Creates a new instance. |
SliderThumbIcon(java.awt.Image tiledImage,
int tileCount,
boolean isTiledHorizontaly)
Creates a new instance. |
|
Method Summary |
protected void |
generateMissingIcons()
|
protected javax.swing.Icon |
getIcon(java.awt.Component c)
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SliderThumbIcon
public SliderThumbIcon(javax.swing.Icon e,
javax.swing.Icon ep,
javax.swing.Icon d,
javax.swing.Icon i,
javax.swing.Icon di)
- Creates a new instance.
All icons must have the same dimensions.
If an icon is null, an icon is derived for the state from the
other icons.
SliderThumbIcon
public SliderThumbIcon(java.awt.Image[] images)
- Creates a new instance.
All icons must have the same dimensions.
The array indices are used to represente the following states:
[0] Enabled
[1] Enabled Pressed
[2] Disabled
[3] Enabled Inactive
[4] Disabled Inactive
[5] Focus Ring
If an array element is null, an icon is derived for the state from the
other icons.
SliderThumbIcon
public SliderThumbIcon(javax.swing.Icon[] icons)
- Creates a new instance.
All icons must have the same dimensions.
If an icon is null, nothing is drawn for this state.
SliderThumbIcon
public SliderThumbIcon(java.awt.Image tiledImage,
int tileCount,
boolean isTiledHorizontaly)
- Creates a new instance.
The icon representations are created lazily from the image.
generateMissingIcons
protected void generateMissingIcons()
- Specified by:
generateMissingIcons in class MultiIcon
getIcon
protected javax.swing.Icon getIcon(java.awt.Component c)
- Specified by:
getIcon in class MultiIcon
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Specified by:
paintIcon in interface javax.swing.Icon- Overrides:
paintIcon in class MultiIcon