javax.swing.Icon, org.pushingpixels.neon.icon.ResizableIconpublic class TransitionAwareResizableIcon
extends java.lang.Object
implements org.pushingpixels.neon.icon.ResizableIcon
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
TransitionAwareResizableIcon.Delegate |
The delegate needs to implement the method in this interface based on the
provided theme.
|
static interface |
TransitionAwareResizableIcon.StateTransitionTrackerDelegate |
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
height |
The height of the rendered image.
|
protected int |
width |
The width of the rendered image.
|
| Constructor | Description |
|---|---|
TransitionAwareResizableIcon(AbstractCommandButton button,
TransitionAwareResizableIcon.StateTransitionTrackerDelegate stateTransitionTrackerDelegate,
TransitionAwareResizableIcon.Delegate delegate,
java.awt.Dimension initialDim) |
Creates a new transition-aware icon.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getIconHeight() |
|
int |
getIconWidth() |
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
|
void |
setDimension(java.awt.Dimension newDimension) |
protected int width
protected int height
public TransitionAwareResizableIcon(AbstractCommandButton button, TransitionAwareResizableIcon.StateTransitionTrackerDelegate stateTransitionTrackerDelegate, TransitionAwareResizableIcon.Delegate delegate, java.awt.Dimension initialDim)
button - Associated command button.buttonModel - Associated model.extraModelKey - Extra model key.delegate - Delegate to compute the actual icons.initialDim - Initial icon dimension.public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.Iconpublic void setDimension(java.awt.Dimension newDimension)
setDimension in interface org.pushingpixels.neon.icon.ResizableIconpublic int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Icon