public class TristateCheckIcon extends SimpleCheckIcon
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.ref.WeakReference<WebTristateCheckBox> |
checkBox
Tristate checkbox which uses this icon.
|
protected int |
checkStep
Current check step.
|
protected static java.awt.Color[] |
colors |
protected static java.awt.Color[] |
disabledColors |
protected static float[] |
fractions
Painting constants.
|
protected int |
mixedStep
Current mixed step.
|
CHECK_STATES, DISABLED_CHECK_STATES, step| Constructor and Description |
|---|
TristateCheckIcon(WebTristateCheckBox checkBox)
Constructs new tristate check icon.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doStep()
Displays next step toward the next active state.
|
boolean |
isTransitionCompleted()
Returns whether current transition has reached its end or not.
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics2D g2d,
int x,
int y,
int w,
int h)
Paints check icon in the specified bounds.
|
void |
resetStep()
Resets steps according to currently set state and next state.
|
void |
setNextState(CheckState nextState)
Sets next active state.
|
finishTransition, getIconHeight, getIconWidthgetNextState, getState, isEnabled, setEnabled, setStateprotected static final float[] fractions
protected static final java.awt.Color[] colors
protected static final java.awt.Color[] disabledColors
protected java.lang.ref.WeakReference<WebTristateCheckBox> checkBox
protected int checkStep
protected int mixedStep
public TristateCheckIcon(WebTristateCheckBox checkBox)
checkBox - tristate checkbox which uses this iconpublic void setNextState(CheckState nextState)
setNextState in class CheckIconnextState - next active statepublic void doStep()
doStep in class SimpleCheckIconpublic void resetStep()
resetStep in class SimpleCheckIconpublic boolean isTransitionCompleted()
isTransitionCompleted in class SimpleCheckIconpublic void paintIcon(java.awt.Component c,
java.awt.Graphics2D g2d,
int x,
int y,
int w,
int h)
paintIcon in class SimpleCheckIconc - component to paint check icon ontog2d - graphics contextx - icon X coordinatey - icon Y coordinatew - icon widthh - icon height