borland Packages Class Hierarchy jbcl.view Package Index
CheckboxStateItemPainter component
java.lang.Object
+----borland.jbcl.view.CheckboxItemPainter
+----borland.jbcl.view.CheckboxStateItemPainter
About the CheckboxStateItemPainter component
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.
CheckboxStateItemPainter variables
Variables implemented in this class
CheckboxStateItemPainter constructors
CheckboxStateItemPainter properties
*Read-only properties **Write-only properties
Properties implemented in this class
CheckboxStateItemPainter methods
Methods implemented in this class
- drawBox(java.awt.Graphics, int, int, int, int, int)
- drawCheck(java.awt.Graphics, int, int, int, int, int)
- getPreferredSize(java.lang.Object, java.awt.Graphics, int, borland.jbcl.model.ItemPaintSite)
- paint(java.lang.Object, java.awt.Graphics, java.awt.Rectangle, int, borland.jbcl.model.ItemPaintSite)
CheckboxStateItemPainter variables
checkedStates
protected int checkedStates
The ItemPainter state settings that are interpreted as checked.
CheckboxStateItemPainter constructors
CheckboxStateItemPainter()
public CheckboxStateItemPainter()
Constructs a CheckboxStateItemPainter.
CheckboxStateItemPainter(int)
public CheckboxStateItemPainter(int checkedStates)
Constructs a CheckboxStateItemPainter with the specified checked states.
Parameters:
- checkedStates
- The states the painter interprets as the check box being checked. Specify one or more of the ItemPainter variables.
CheckboxStateItemPainter(java.awt.Dimension)
public CheckboxStateItemPainter(java.awt.Dimension boxSize)
Constructs a CheckboxStateItemPainter with a specified check box size.
Parameters:
- boxSize
- The Dimension object that specifies the size of the check box around the check.
CheckboxStateItemPainter(java.awt.Dimension, int)
public CheckboxStateItemPainter(java.awt.Dimension boxSize, int style)
Constructs a CheckboxStateItemPainter with a specified check box size and a specified check mark style.
Parameters:
- boxSize
- The Dimension object that specifies the size of the check box around the check.
- style
- Specify CHECKMARK (a check) or XMARK (an X).
CheckboxStateItemPainter(java.awt.Dimension, int, boolean)
public CheckboxStateItemPainter(java.awt.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
- The Dimension object that specifies the size of the check box around the check.
- style
- Specify CHECKMARK (a check) or XMARK (an X).
- flat
- If true, the checkbox appears flat.
CheckboxStateItemPainter(java.awt.Dimension, int, boolean, int)
public CheckboxStateItemPainter(java.awt.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
- The Dimension object that specifies the size of the check box around the check.
- style
- Specify CHECKMARK (a check) or XMARK (an X).
- flat
- If true, the check box is drawn flat; if false, the check box has a slightly raised appearance.
- checkedStates
- The states the painter interprets as the check box being checked. Specify one or more of the ItemPainter variables.
CheckboxStateItemPainter(java.awt.Dimension, int, int)
public CheckboxStateItemPainter(java.awt.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
- The Dimension object that specifies the size of the check box around the check.
- style
- Specify CHECKMARK (a check) or XMARK (an X).
- checkedStates
- The states the painter interprets as the check box being checked. Specify one or more of the ItemPainter variables.
CheckboxStateItemPainter properties
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
- Specify one or more of the ItemPainter variables.
CheckboxStateItemPainter methods
isChecked(java.lang.Object, int, borland.jbcl.model.ItemPaintSite)
protected boolean isChecked(java.lang.Object data, int state, borland.jbcl.model.ItemPaintSite site)
Determines whether the check box is checked. If (state & checkStates != 0), then isChecked() returns true.
Parameters:
- data
- The data object. (isChecked() doesn't use this value.)
- state
- Any value you want the painter to evaulate to determine if the check box is checked.
- site
- The ItemPaintSite where the painting occurs.
Overrides:
borland.jbcl.view.CheckboxItemPainter.isChecked(java.lang.Object, int, borland.jbcl.model.ItemPaintSite)