org.zkoss.zul
Class Comboitem

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.impl.LabelElement
                  extended by org.zkoss.zul.impl.LabelImageElement
                      extended by org.zkoss.zul.Comboitem
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Comboitem
extends LabelImageElement

An item of a combo box.

Non-XUL extension. Refer to Combobox.

Default HtmlBasedComponent.getSclass(): item.

Author:
tomyeh
See Also:
Combobox, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zul.impl.LabelImageElement
LabelImageElement.ExtraCtrl
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Comboitem()
           
Comboitem(java.lang.String label)
           
Comboitem(java.lang.String label, java.lang.String image)
           
 
Method Summary
 java.lang.String getDescription()
          Returns the description (never null).
 java.lang.Object getValue()
          Returns the value associated with this combo item.
 boolean isChildable()
          No child is allowed.
 void setDescription(java.lang.String desc)
          Sets the description.
 void setParent(org.zkoss.zk.ui.Component parent)
           
 void setValue(java.lang.Object value)
          Associate the value with this combo item.
 
Methods inherited from class org.zkoss.zul.impl.LabelImageElement
getImage, getImageContent, getImgTag, getSrc, isImageAssigned, newExtraCtrl, setImage, setImageContent, setSrc
 
Methods inherited from class org.zkoss.zul.impl.LabelElement
getLabel, setLabel
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getAllOnClickAttrs, getContext, getInnerAttrs, getOuterAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addEventListener, appendAsapAttr, focus, getDraggable, getDroppable, getHeight, getLeft, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, isAsapRequired, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Comboitem

public Comboitem()

Comboitem

public Comboitem(java.lang.String label)

Comboitem

public Comboitem(java.lang.String label,
                 java.lang.String image)
Method Detail

getDescription

public java.lang.String getDescription()
Returns the description (never null). The description is used to provide extra information such that users is easy to make a selection.

Default: "".


setDescription

public void setDescription(java.lang.String desc)
Sets the description.


getValue

public java.lang.Object getValue()
Returns the value associated with this combo item. The value is application dependent. It can be anything.

It is usually used with Combobox.getSelectedItem(). For example, combobox.getSelectedItem().getValue()

Since:
2.4.0
See Also:
Combobox.getSelectedItem(), setValue(java.lang.Object)

setValue

public void setValue(java.lang.Object value)
Associate the value with this combo item. The value is application dependent. It can be anything.

Since:
2.4.0
See Also:
Combobox.getSelectedItem(), getValue()

setParent

public void setParent(org.zkoss.zk.ui.Component parent)
Specified by:
setParent in interface org.zkoss.zk.ui.Component
Overrides:
setParent in class org.zkoss.zk.ui.AbstractComponent

isChildable

public boolean isChildable()
No child is allowed.

Specified by:
isChildable in interface org.zkoss.zk.ui.Component
Overrides:
isChildable in class org.zkoss.zk.ui.AbstractComponent


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.