org.jvnet.substance.utils.icon
public class TransitionAwareIcon extends java.lang.Object implements javax.swing.Icon
Modifier and Type | Class and Description |
---|---|
static interface |
TransitionAwareIcon.ColorSchemeAssociationKindDelegate |
static interface |
TransitionAwareIcon.Delegate
The delegate needs to implement the method in this interface based on the
provided color scheme.
|
Modifier and Type | Field and Description |
---|---|
protected TransitionAwareIcon.ColorSchemeAssociationKindDelegate |
colorSchemeAssociationKindDelegate |
protected TransitionAwareIcon.Delegate |
delegate
Delegate to compute the actual icons.
|
protected java.lang.String |
uniqueIconTypeId |
Constructor and Description |
---|
TransitionAwareIcon(javax.swing.AbstractButton button,
TransitionAwareIcon.Delegate delegate,
java.lang.String uniqueIconTypeId)
Creates a new transition-aware icon.
|
TransitionAwareIcon(javax.swing.JComponent comp,
javax.swing.ButtonModel model,
TransitionAwareIcon.Delegate delegate,
java.lang.String uniqueIconTypeId)
Creates a new transition-aware icon.
|
TransitionAwareIcon(javax.swing.JComponent comp,
javax.swing.ButtonModel model,
TransitionAwareIcon.Delegate delegate,
TransitionAwareIcon.ColorSchemeAssociationKindDelegate colorSchemeAssociationKindDelegate,
java.lang.String uniqueIconTypeId)
Creates a new transition-aware icon.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
protected TransitionAwareIcon.Delegate delegate
protected TransitionAwareIcon.ColorSchemeAssociationKindDelegate colorSchemeAssociationKindDelegate
protected java.lang.String uniqueIconTypeId
public TransitionAwareIcon(javax.swing.AbstractButton button, TransitionAwareIcon.Delegate delegate, java.lang.String uniqueIconTypeId)
button
- Associated button.delegate
- Delegate to compute the actual icons.public TransitionAwareIcon(javax.swing.JComponent comp, javax.swing.ButtonModel model, TransitionAwareIcon.Delegate delegate, java.lang.String uniqueIconTypeId)
comp
- Associated component.model
- Associated model.delegate
- Delegate to compute the actual icons.public TransitionAwareIcon(javax.swing.JComponent comp, javax.swing.ButtonModel model, TransitionAwareIcon.Delegate delegate, TransitionAwareIcon.ColorSchemeAssociationKindDelegate colorSchemeAssociationKindDelegate, java.lang.String uniqueIconTypeId)
comp
- Associated component.model
- Associated model.delegate
- Delegate to compute the actual icons.public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon