Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## contrib.ch.randelshofer.quaqua
Class ButtonStateIcon

    java.lang.Object
      contrib.ch.randelshofer.quaqua.MultiIcon
          contrib.ch.randelshofer.quaqua.ButtonStateIcon

All Implemented Interfaces:
  javax.swing.Icon

    public class ButtonStateIcon

extends MultiIcon

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

Version:
  3.1 2005-12-08 Draw pressed state if model is armed, instead of drawing pressed state if model is armed and pressed.
  3.0 2005-10-17 Changed superclass to MultiIcon.
  2.0.1 2005-10-02 Used Enabled image for Pressed-Unarmed state.
  2.0.1 2005-09-11 generateMissing icons can now deal with only one provided icon image.
  2.0 2005-03-19 Reworked.
  1.0 October 5, 2003 Create..
Author:
  Werner Randelshofer

Field Summary

Fields inherited from class contrib.ch.randelshofer.quaqua.MultiIcon
`icons`

Constructor Summary
`ButtonStateIcon(javax.swing.Icon[] icons)` Creates a new instance.
`ButtonStateIcon(javax.swing.Icon e, javax.swing.Icon ep, javax.swing.Icon es, javax.swing.Icon eps, javax.swing.Icon d, javax.swing.Icon ds)` Creates a new instance.
`ButtonStateIcon(java.awt.Image[] images)` Creates a new instance.
`ButtonStateIcon(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 contrib.ch.randelshofer.quaqua.MultiIcon
`getIconHeight, getIconWidth, paintIcon`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ButtonStateIcon

    public ButtonStateIcon(javax.swing.Icon e,
                           javax.swing.Icon ep,
                           javax.swing.Icon es,
                           javax.swing.Icon eps,
                           javax.swing.Icon d,
                           javax.swing.Icon ds)

  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.

### ButtonStateIcon

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

### ButtonStateIcon

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

### ButtonStateIcon

    public ButtonStateIcon(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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD