Package org.adempiere.webui.component
Class Listbox
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zul.impl.MeshElement
-
- org.zkoss.zul.Listbox
-
- org.adempiere.webui.component.Listbox
-
- All Implemented Interfaces:
Serializable
,Cloneable
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
,org.zkoss.zk.ui.ext.Scope
,org.zkoss.zk.ui.sys.ComponentCtrl
,org.zkoss.zul.ext.Paginated
- Direct Known Subclasses:
WListbox
public class Listbox extends org.zkoss.zul.Listbox implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Version:
- $Revision: 0.10 $
- Author:
- Ashley G Ramdass
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Listbox()
Listbox(KeyNamePair[] pairs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActionListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
alias for addEventListener(Events.ON_SELECT, listener), to ease porting of swing formvoid
addDoubleClickListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
void
addItem(KeyNamePair pp)
shortcut for appendItem(pp.getName(), pp.getKey()), to ease porting of swing formvoid
addItem(ValueNamePair pp)
shortcut for appendItem(pp.getName(), pp.getValue()), to ease porting of swing formvoid
addOnDropListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
protected void
afterInsert(org.zkoss.zk.ui.Component comp)
ListItem
appendItem(String label, Object value)
ListItem
appendItem(String label, String value)
ListItem
getItemAtIndex(int index)
ListHead
getListHead()
String
getOddRowSclass()
int[]
getSelectedIndices()
ListItem
getSelectedItem()
Object
getValue()
Get selected item for the list box based on the value of list itemboolean
insertBefore(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)
boolean
isEnabled()
boolean
isItemDraggable()
void
onEvent(org.zkoss.zk.ui.event.Event event)
void
removeActionListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
alias for removeEventListener(Events.ON_SELECT, listener), to ease porting of swing formvoid
removeAllItems()
remove all items, to ease porting of swing formboolean
removeChild(org.zkoss.zk.ui.Component child)
void
setEnabled(boolean enabled)
void
setItemDraggable(boolean b)
void
setOddRowSclass(String scls)
void
setSelectedIndices(int[] selected)
void
setSelectedKeyNamePair(KeyNamePair kp)
select selected item base on kp.getKey, to ease porting of swing formvoid
setSelectedValueNamePair(ValueNamePair vp)
select selected item base on vp.getValue, to ease porting of swing formvoid
setValue(Object value)
Set selected item for the list box based on the value of list item set selected to none if no item found matching the value given or value is nullString
toString()
-
Methods inherited from class org.zkoss.zul.Listbox
addItemToSelection, beforeChildAdded, beforeRemove, clearSelection, clone, getChildren, getEmptyMessage, getExtraCtrl, getFrozen, getGroupCount, getGroups, getGroupsModel, getHeads, getIndexOfItem, getInnerWidth, getItemCount, getItemRenderer, getItems, getListfoot, getListhead, getListModel, getMaxlength, getModel, getName, getNonselectableTags, getPaginal, getPagingChild, getPreloadSize, getRows, getSelectedCount, getSelectedIndex, getSelectedItems, getSeltype, getVisibleItemCount, getZclass, hasGroup, isAutohidePaging, isCheckmark, isDisabled, isFixedLayout, isMultiple, isSelectOnHighlightDisabled, isVflex, onAfterRender, onInitRender, onPageAttached, onPageDetached, onPagingInitRender, pgi, removeItemAt, removeItemFromSelection, renderAll, renderItem, renderItems, renderProperties, scrollToIndex, selectAll, selectItem, service, sessionDidActivate, sessionWillPassivate, setActivePage, setActivePage, setCheckmark, setDisabled, setEmptyMessage, setFixedLayout, setHeight, setInnerWidth, setItemRenderer, setItemRenderer, setMaxlength, setModel, setModel, setMold, setMultiple, setName, setNonselectableTags, setPageSize, setPaginal, setPreloadSize, setRows, setSelectedIndex, setSelectedItem, setSelectedItems, setSeltype, setVflex, setVflex, shallUpdateScrollPos, toggleItemSelection
-
Methods inherited from class org.zkoss.zul.impl.MeshElement
checkBeforeSetRows, evalCSSFlex, getActivePage, getPageCount, getPageSize, getPagingPosition, getSpan, isAutopaging, isPagingDisabled, isSizedByContent, isSpan, setAutopaging, setPagingDisabled, setPagingPosition, setSizedByContent, setSpan, setSpan
-
Methods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
Constructor Detail
-
Listbox
public Listbox()
-
Listbox
public Listbox(KeyNamePair[] pairs)
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
-
isEnabled
public boolean isEnabled()
-
appendItem
public ListItem appendItem(String label, String value)
- Overrides:
appendItem
in classorg.zkoss.zul.Listbox
-
getItemAtIndex
public ListItem getItemAtIndex(int index)
- Overrides:
getItemAtIndex
in classorg.zkoss.zul.Listbox
-
getSelectedItem
public ListItem getSelectedItem()
- Overrides:
getSelectedItem
in classorg.zkoss.zul.Listbox
-
setValue
public void setValue(Object value)
Set selected item for the list box based on the value of list item set selected to none if no item found matching the value given or value is null- Parameters:
value
- Value of ListItem to set as selected
-
getListHead
public ListHead getListHead()
-
getSelectedIndices
public int[] getSelectedIndices()
-
setSelectedIndices
public void setSelectedIndices(int[] selected)
-
addOnDropListener
public void addOnDropListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
-
addDoubleClickListener
public void addDoubleClickListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
-
insertBefore
public boolean insertBefore(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)
- Specified by:
insertBefore
in interfaceorg.zkoss.zk.ui.Component
- Overrides:
insertBefore
in classorg.zkoss.zul.Listbox
-
isItemDraggable
public boolean isItemDraggable()
-
setItemDraggable
public void setItemDraggable(boolean b)
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception
- Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Throws:
Exception
-
addItem
public void addItem(KeyNamePair pp)
shortcut for appendItem(pp.getName(), pp.getKey()), to ease porting of swing form- Parameters:
pp
-
-
removeAllItems
public void removeAllItems()
remove all items, to ease porting of swing form
-
removeActionListener
public void removeActionListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
alias for removeEventListener(Events.ON_SELECT, listener), to ease porting of swing form- Parameters:
listener
-
-
addActionListener
public void addActionListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
alias for addEventListener(Events.ON_SELECT, listener), to ease porting of swing form- Parameters:
listener
-
-
addItem
public void addItem(ValueNamePair pp)
shortcut for appendItem(pp.getName(), pp.getValue()), to ease porting of swing form- Parameters:
pp
-
-
setSelectedValueNamePair
public void setSelectedValueNamePair(ValueNamePair vp)
select selected item base on vp.getValue, to ease porting of swing form- Parameters:
vp
-
-
setSelectedKeyNamePair
public void setSelectedKeyNamePair(KeyNamePair kp)
select selected item base on kp.getKey, to ease porting of swing form- Parameters:
kp
-
-
afterInsert
protected void afterInsert(org.zkoss.zk.ui.Component comp)
- Overrides:
afterInsert
in classorg.zkoss.zul.Listbox
-
removeChild
public boolean removeChild(org.zkoss.zk.ui.Component child)
- Specified by:
removeChild
in interfaceorg.zkoss.zk.ui.Component
- Overrides:
removeChild
in classorg.zkoss.zul.Listbox
-
getOddRowSclass
public String getOddRowSclass()
- Overrides:
getOddRowSclass
in classorg.zkoss.zul.Listbox
-
setOddRowSclass
public void setOddRowSclass(String scls)
- Overrides:
setOddRowSclass
in classorg.zkoss.zul.Listbox
-
toString
public String toString()
- Overrides:
toString
in classorg.zkoss.zk.ui.AbstractComponent
-
getValue
public Object getValue()
Get selected item for the list box based on the value of list item- Returns:
- Value of selected ListItem
-
-