this.selectedFlags = selectedArray;
if (selectedArray.length < this.itemsList.size()) { throw new IllegalArgumentException("length of selectedArray is too small"); } if (this.isMultiple) { ChoiceItem[] myItems = (ChoiceItem[]) this.itemsList.toArray( new ChoiceItem[ this.itemsList.size() ] ); for (int i = 0; i < myItems.length; i++) { ChoiceItem item = myItems[i]; item.select( selectedArray[i]); } } else { int index = 0; for (int i = 0; i < selectedArray.length; i++) { if (selectedArray[i]) { index = i; break; } } if (index > this.itemsList.size()) { index = 0; } setSelectedIndex( index, true ); } repaint();
	public void setSelectedFlags(boolean[] selectedArray)	{		this.selectedFlags = selectedArray;	}