JHotDraw 7.4.1

org.jhotdraw.gui.plaf.palette
Class SliderThumbIcon

java.lang.Object
  extended by org.jhotdraw.gui.plaf.palette.MultiIcon
      extended by org.jhotdraw.gui.plaf.palette.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:
$Id: SliderThumbIcon.java 527 2009-06-07 14:28:19Z rawcoder $
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from class org.jhotdraw.gui.plaf.palette.MultiIcon
icons
 
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 org.jhotdraw.gui.plaf.palette.MultiIcon
getIconHeight, getIconWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Method Detail

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

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.