| com.xoetrope.swing.XCheckList
XCheckList | public class XCheckList extends XList (Code) | | A list box that contains a list of check boxes
Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
the GNU Public License (GPL), please see license.txt for more details. If
you make commercial use of this software you must purchase a commercial
license from Xoetrope.
$Revision: 1.8 $
|
XCheckList | public XCheckList()(Code) | | Create a new checked list
|
XCheckList | public XCheckList(Object[] items)(Code) | | Create a new checked list
Parameters: items - an array of items to add to the list |
addItem | public void addItem(String s)(Code) | | Add an item to the listmodel
Parameters: s - the item to be added |
enableItem | public void enableItem(int idx, boolean selected)(Code) | | Enable the selection of an item in the list
Parameters: idx - the index of the item Parameters: selected - true to force selection of the item |
getSelectedItems | public String[] getSelectedItems()(Code) | | Get a list of the checked items in the list
the checked items |
getSelectedObjects | public Object[] getSelectedObjects()(Code) | | the selected objects in the list |
getSelectionMode | public int getSelectionMode()(Code) | | Get the list selection mode. This component returns 2. The selection
corresponds to the items that are checked and not the items that are
highlighted.
- 0=ListSelectionModel.SINGLE_SELECTION,
- 1=ListSelectionModel.SINGLE_INTERVAL_SELECTION,
- 2=ListSelectionModel.MULTIPLE_INTERVAL_SELECTION
|
isItemChecked | public boolean isItemChecked(int idx)(Code) | | Get the checked state of the indexed item
Parameters: idx - the index of the item true if the item is checked |
selectItem | public void selectItem(int idx, boolean selected)(Code) | | Force the selection of an item in the list
Parameters: idx - the index of the item Parameters: selected - true to force selection of the item |
setAltUnselectedColors | public void setAltUnselectedColors(Color frgd, Color bkgd)(Code) | | Set the colors for alternate ( odd ) row colors
Parameters: frgd - the foreground color Parameters: bkgd - the background color |
setCellRenderer | public void setCellRenderer(ListCellRenderer cellRenderer)(Code) | | Sets the delegate that is used to paint each cell in the list.
The job of a cell renderer is discussed in detail in the
class level documentation.
If the
prototypeCellValue property is
non-null ,
setting the cell renderer also causes the
fixedCellWidth and
fixedCellHeight properties to be re-calculated. Only one
PropertyChangeEvent is generated however -
for the cellRenderer property.
The default value of this property is provided by the
ListUI delegate, i.e. by the look and feel implementation.
This is a JavaBeans bound property.
Parameters: cellRenderer - the ListCellRenderer that paints list cells See Also: XCheckList.getCellRenderer |
setDefaultSelection | public void setDefaultSelection()(Code) | | Set the list to its default selection state
|
toggleAll | public void toggleAll(boolean select)(Code) | | Select/unselect all the items in the list
Parameters: select - true to select the items, false to unselect |
|
|