com.sas.swing.visuals
Class TriStateCheckBoxListCellRenderer
com.sas.swing.visuals.TriStateCheckBoxListCellRenderer
All Implemented Interfaces: java.awt.image.ImageObserver , java.awt.MenuContainer , java.io.Serializable , javax.swing.ListCellRenderer
public class TriStateCheckBoxListCellRenderer
Renders an item in a TriStateCheckBoxList.
Instead of the cells being labels as in regular lists, TriStateCheckBoxList cells
have a triStateCheckBox to change the state of the cell.
See Also: TriStateCheckBoxList
,
Serialized Form
TriStateCheckBoxListCellRenderer
public TriStateCheckBoxListCellRenderer ()
create the default components of the cell
createCheckBox
protected void createCheckBox ()
create the triStateCheckBox and add it to the cell
Overrides: createCheckBox
in class CheckBoxListCellRenderer
getListCellRendererComponent
public java.awt.Component getListCellRendererComponent (javax.swing.JList list,
java.lang.Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
Return a component that has been configured to display the specified value.
Specified by: getListCellRendererComponent
in interface javax.swing.ListCellRenderer
Overrides: getListCellRendererComponent
in class CheckBoxListCellRenderer
Parameters: list
- The JList to paintvalue
- The value returned by list.getModel().getElementAt(index)index
- The cell's indexisSelected
- True if the specified cell was selectedcellHasFocus
- True if the specified cell has the focus
Returns: A component whose paint() method will render the specified value
Copyright © 2009 SAS Institute Inc. All Rights Reserved.