jbcl.view Package
java.lang.Object +----com.borland.jbcl.view.CheckboxItemPainter +----com.borland.jbcl.view.CheckboxStateItemPainter
Variables Constructors Properties Methods
Implements ItemPainter, Serializable
CheckboxStateItemPainter
extends the CheckboxItemPainter
. Unlike CheckboxItemPainter
, CheckboxStateItemPainter
ignores the data and determines whether a check box is checked based on the value of the checkStates
property. You can use the checkStates
property to specify the states you want the painter to interpret as checked.
The isChecked()
method determines whether the check box is checked.
protected int checkedStatesThe
ItemPainter
state settings that are interpreted as checked.
public CheckboxStateItemPainter()Constructs a
CheckboxStateItemPainter
.
public CheckboxStateItemPainter(int checkedStates)Constructs a
CheckboxStateItemPainter
with the specified checked states.
Parameters:
checkedStates
public CheckboxStateItemPainter(Dimension boxSize)Constructs a
CheckboxStateItemPainter
with a specified check box size.
Parameters:
boxSize
Dimension
object that specifies the size of the check box around the check.
public CheckboxStateItemPainter(Dimension boxSize, int style)Constructs a
CheckboxStateItemPainter
with a specified check box size and a specified check mark style.
Parameters:
boxSize
Dimension
object that specifies the size of the check box around the check.
style
public CheckboxStateItemPainter(Dimension boxSize, int style, boolean flat)Constructs a
CheckboxStateItemPainter
with a specified check box size, a specified check mark style, and a specified appearance.
Parameters:
boxSize
Dimension
object that specifies the size of the check box around the check.
style
flat
public CheckboxStateItemPainter(Dimension boxSize, int style, boolean flat, int checkedStates)Constructs a
CheckboxStateItemPainter
with a specified check box size, a specified check mark style, a specified appearance, and the specified checked states.
Parameters:
boxSize
Dimension
object that specifies the size of the check box around the check.
style
flat
checkedStates
public CheckboxStateItemPainter(Dimension boxSize, int style, int checkedStates)Constructs a
CheckboxStateItemPainter
with a specified check box size, a specified check mark style, and the specified states the painter interprets as the check box is checked.
Parameters:
boxSize
Dimension
object that specifies the size of the check box around the check.
style
checkedStates
public int getCheckedStates() public void setCheckedStates(int checkedStates)Determines the states the painter interprets as checked. By default, the value of
checkStates
is ItemPainter.SELECTED
.
Parameters:
checkStates
protected boolean isChecked(Object data, int state, ItemPaintSite site)Determines whether the check box is checked. If (state & checkStates != 0), then
isChecked()
returns true.
Parameters:
data
isChecked()
doesn't use this value.)
state
site
ItemPaintSite
where the painting occurs.