Quaqua 5.4.1 2009-07-14

ch.randelshofer.quaqua.icon
Class FrameButtonStateIcon

java.lang.Object
  extended by ch.randelshofer.quaqua.icon.MultiIcon
      extended by ch.randelshofer.quaqua.icon.FrameButtonStateIcon
All Implemented Interfaces:
javax.swing.Icon

public class FrameButtonStateIcon
extends MultiIcon

An Icon with different visuals reflecting the state of the AbstractButton on which it draws on.

Version:
1.0 2006-02-13 Created.
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from class ch.randelshofer.quaqua.icon.MultiIcon
icons
 
Constructor Summary
FrameButtonStateIcon(javax.swing.Icon[] icons)
          Creates a new instance.
FrameButtonStateIcon(java.awt.Image[] images)
          Creates a new instance.
FrameButtonStateIcon(java.awt.Image tiledImage, int tileCount, boolean isTiledHorizontally)
          Creates a new instance.
 
Method Summary
protected  void generateMissingIcons()
           
protected  javax.swing.Icon getIcon(java.awt.Component c)
           
 
Methods inherited from class ch.randelshofer.quaqua.icon.MultiIcon
getIconHeight, getIconWidth, paintIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrameButtonStateIcon

public FrameButtonStateIcon(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] Armed [2] Pressed [3] Disabled [4] Enabled Selected [5] Armed Selected [6] Pressend Selected [7] Disabled Selected If an array element is null, an icon is derived for the state from the other icons.


FrameButtonStateIcon

public FrameButtonStateIcon(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.


FrameButtonStateIcon

public FrameButtonStateIcon(java.awt.Image tiledImage,
                            int tileCount,
                            boolean isTiledHorizontally)
Creates a new instance. The icon representations are created lazily from the image.

Method Detail

getIcon

protected javax.swing.Icon getIcon(java.awt.Component c)
Specified by:
getIcon in class MultiIcon

generateMissingIcons

protected void generateMissingIcons()
Specified by:
generateMissingIcons in class MultiIcon

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.