Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* ComboitemCollectionItem.java
 
 	Purpose:
 		
 	Description:
 		
 	History:
 		Jan 3, 2008 10:51:34 AM , Created by jumperchen
 
Copyright (C) 2007 Potix Corporation. All Rights Reserved.
{{IS_RIGHT
	This program is distributed under LGPL Version 2.1 in the hope that
	it will be useful, but WITHOUT ANY WARRANTY.
}}IS_RIGHT
*/
package org.zkoss.zkplus.databind;

Deprecated:
As of release 7.0.0, replace with new ZK binding.
Author(s):
jumperchen
Since:
3.0.2
/* package */ class ComboitemCollectionItem implements CollectionItemExtjava.io.Serializable {
	private static final long serialVersionUID = 200808191454L;
		if (comp instanceof Comboitem) {
			final Comboitem item = (Comboitemcomp;
			return item.getParent();
else {
			throw new UiException(
					"Unsupported type for ComboitemCollectionItem: " + comp);
		}
	}
		if (comp instanceof Combobox) {
			final Combobox cbbox = (Comboboxcomp;
			return cbbox.getModel();
else {
			throw new UiException(
					"Unsupported type for ComboitemCollectionItem: " + comp);
		}
	}
	public Component getComponentAtIndexByOwner(Component compint index) {
		if (comp instanceof Combobox) {
			return ((Combobox)comp).getItemAtIndex(index);
else {
			throw new UiException(
					"Unsupported type for ComboitemCollectionItem: " + comp);
		}
	}
	public void setupBindingRenderer(Component compDataBinder binder) {
		if (comp instanceof Comboitem) {
			final Comboitem li = (Comboitemcomp;
			final Combobox cbbox = (Comboboxli.getParent();
			if (cbbox.getItemRenderer() == null) {
				cbbox.setItemRenderer(new BindingComboitemRenderer(libinder));
			}
		}
	}
	public List getItems(Component comp) {
		if (comp instanceof Combobox) {
			final Combobox cbbox = (Comboboxcomp;
			return cbbox.getItems();
else {
			throw new UiException(
					"Unsupported type for ComboitemCollectionItem: " + comp);
		}
	}
New to GrepCode? Check out our FAQ X