Package org.pushingpixels.substance.internal.contrib.randelshofer.quaqua

# Class ButtonStateIcon

java.lang.Object
org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.MultiIcon
org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.ButtonStateIcon

All Implemented Interfaces:
  `Icon`

public class ButtonStateIcon extends MultiIcon
An Icon with different visuals reflecting the state of the AbstractButton on which it draws on.

## Field Summary

### Fields inherited from class org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.MultiIcon

`icons`

## Constructor Summary

Constructors
Constructor
Description
`ButtonStateIcon(Image[] images)`
Creates a new instance.
`ButtonStateIcon(Image tiledImage, int tileCount, boolean isTiledHorizontally)`
Creates a new instance.
`ButtonStateIcon(Icon[] icons)`
Creates a new instance.
`ButtonStateIcon(Icon e, Icon ep, Icon es, Icon eps, Icon d, Icon ds)`
Creates a new instance.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`generateMissingIcons()`
`protected Icon`
`getIcon(Component c)`

### Methods inherited from class org.pushingpixels.substance.internal.contrib.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 Details

### ButtonStateIcon

public ButtonStateIcon(Icon e, Icon ep, Icon es, Icon eps, Icon d, 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(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(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(Image tiledImage, int tileCount, boolean isTiledHorizontally)
Creates a new instance. The icon representations are created lazily from the image.

## Method Details

### getIcon

protected Icon getIcon(Component c)

Specified by:
  `getIcon` in class `MultiIcon`

### generateMissingIcons

protected void generateMissingIcons()

Specified by:
  `generateMissingIcons` in class `MultiIcon`