com.alee.laf.checkbox
Class SimpleCheckIcon

java.lang.Object
  extended by com.alee.laf.checkbox.CheckIcon
      extended by com.alee.laf.checkbox.SimpleCheckIcon
Direct Known Subclasses:
TristateCheckIcon

public class SimpleCheckIcon
extends CheckIcon

Check icon for simple checkbox.

Author:
Mikle Garin

Field Summary
static java.util.List<javax.swing.ImageIcon> CHECK_STATES
          Check icons for all states.
static java.util.List<javax.swing.ImageIcon> DISABLED_CHECK_STATES
           
protected  int step
          Current step.
 
Fields inherited from class com.alee.laf.checkbox.CheckIcon
enabled, nextState, state
 
Constructor Summary
SimpleCheckIcon()
           
 
Method Summary
 void doStep()
          Displays next step toward the next active state.
 void finishTransition()
          Finishes transition.
 int getIconHeight()
          Returns check icon height.
 int getIconWidth()
          Returns check icon width.
 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.
 
Methods inherited from class com.alee.laf.checkbox.CheckIcon
getNextState, getState, isEnabled, setEnabled, setNextState, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHECK_STATES

public static java.util.List<javax.swing.ImageIcon> CHECK_STATES
Check icons for all states.


DISABLED_CHECK_STATES

public static java.util.List<javax.swing.ImageIcon> DISABLED_CHECK_STATES

step

protected int step
Current step.

Constructor Detail

SimpleCheckIcon

public SimpleCheckIcon()
Method Detail

doStep

public void doStep()
Displays next step toward the next active state.

Specified by:
doStep in class CheckIcon

resetStep

public void resetStep()
Resets steps according to currently set state and next state.

Specified by:
resetStep in class CheckIcon

isTransitionCompleted

public boolean isTransitionCompleted()
Returns whether current transition has reached its end or not.

Specified by:
isTransitionCompleted in class CheckIcon
Returns:
true if current transition has reached its end, false otherwise

finishTransition

public void finishTransition()
Finishes transition.

Specified by:
finishTransition in class CheckIcon

getIconWidth

public int getIconWidth()
Returns check icon width.

Specified by:
getIconWidth in class CheckIcon
Returns:
check icon width

getIconHeight

public int getIconHeight()
Returns check icon height.

Specified by:
getIconHeight in class CheckIcon
Returns:
check icon height

paintIcon

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

Specified by:
paintIcon in class CheckIcon
Parameters:
c - component to paint check icon onto
g2d - graphics context
x - icon X coordinate
y - icon Y coordinate
w - icon width
h - icon height