org.zkoss.zul.api
Interface Listitem

All Superinterfaces:
java.lang.Cloneable, Component, HtmlBasedComponent, Scope, java.io.Serializable, XulElement
All Known Subinterfaces:
Listgroup, Listgroupfoot
All Known Implementing Classes:
Listgroup, Listgroupfoot, Listitem

public interface Listitem
extends XulElement

A list item.

Default HtmlBasedComponent.getZclass(): z-listitem (since 5.0.0)

Since:
3.5.2
Author:
tomyeh

Field Summary
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Method Summary
 java.lang.String getImage()
          Returns the image of the Listcell it contains.
 java.lang.String getLabel()
          Returns the label of the Listcell it contains, or null if no such cell.
 Listbox getListboxApi()
          Returns the list box that it belongs to.
 Listgroup getListgroupApi()
          Returns the listgroup that this item belongs to, or null.
 int getMaxlength()
          Returns the maximal length of each item's label.
 java.lang.Object getValue()
          Returns the value.
 boolean isCheckable()
          Returns whether it is checkable.
 boolean isLoaded()
          Returns whether the content of this item is loaded.
 boolean isSelected()
          Returns whether it is selected.
 void setCheckable(boolean checkable)
          Sets whether it is checkable.
 void setDisabled(boolean disabled)
          Sets whether it is disabled.
 void setImage(java.lang.String image)
          Sets the image of the Listcell it contains.
 void setLabel(java.lang.String label)
          Sets the label of the Listcell it contains.
 void setSelected(boolean selected)
          Sets whether it is selected.
 void setValue(java.lang.Object value)
          Sets the value.
 
Methods inherited from interface org.zkoss.zul.impl.api.XulElement
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex
 
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getChildren, getDefinition, getDesktop, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, setWidgetListener, setWidgetOverride, unsetVariable
 
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
 

Method Detail

getListboxApi

Listbox getListboxApi()
Returns the list box that it belongs to.

It is the same as Component.getParent().


getListgroupApi

Listgroup getListgroupApi()
Returns the listgroup that this item belongs to, or null.


isCheckable

boolean isCheckable()
Returns whether it is checkable.

Default: true.


setCheckable

void setCheckable(boolean checkable)
Sets whether it is checkable.

Default: true.


getMaxlength

int getMaxlength()
Returns the maximal length of each item's label. It is a shortcut of getParent().getMaxlength(); Thus, it works only if the listbox's mold is "select".


getValue

java.lang.Object getValue()
Returns the value.

Default: null.

Note: the value is application dependent, you can place whatever value you want.

If you are using listitem with HTML Form (and with the name attribute), it is better to specify a String-typed value.


setValue

void setValue(java.lang.Object value)
Sets the value.

Parameters:
value - the value.

Note: the value is application dependent, you can place whatever value you want.

If you are using listitem with HTML Form (and with the name attribute), it is better to specify a String-typed value.


setDisabled

void setDisabled(boolean disabled)
Sets whether it is disabled.


isSelected

boolean isSelected()
Returns whether it is selected.

Default: false.


setSelected

void setSelected(boolean selected)
Sets whether it is selected.


getLabel

java.lang.String getLabel()
Returns the label of the Listcell it contains, or null if no such cell.


setLabel

void setLabel(java.lang.String label)
Sets the label of the Listcell it contains.

If it is not created, we automatically create it.


getImage

java.lang.String getImage()
Returns the image of the Listcell it contains.


setImage

void setImage(java.lang.String image)
Sets the image of the Listcell it contains.

If it is not created, we automatically create it.


isLoaded

boolean isLoaded()
Returns whether the content of this item is loaded. It is meaningful only if getListboxApi() is live data, i.e., Listbox.getModel() is not null.



Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo