org.zkoss.zul
Class Listcell

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.Listcell
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Listcell
extends LabelImageElement

A list cell.

Author:
tomyeh
See Also:
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
Listcell()
           
Listcell(java.lang.String label)
           
Listcell(java.lang.String label, java.lang.String src)
           
 
Method Summary
 java.lang.String getColumnHtmlPostfix()
          Returns the postfix of the first column (in HTML tags), null if this is not first column.
 java.lang.String getColumnHtmlPrefix()
          Returns the prefix of the first column (in HTML tags), null if this is not first column.
 int getColumnIndex()
          Returns the column index of this cell, starting from 0.
 Listbox getListbox()
          Returns the list box that it belongs to.
 Listheader getListheader()
          Returns the list header that is in the same column as this cell, or null if not available.
 Listitem getListitem()
          Deprecated.  
 int getMaxlength()
          Returns the maximal length for this cell.
 java.lang.String getOuterAttrs()
           
 int getSpan()
          Returns number of columns to span this cell.
 java.lang.Object getValue()
          Returns the value.
 java.lang.String getWidth()
          Returns the width which the same as getListheader()'s width.
 void invalidate()
           
 void setParent(org.zkoss.zk.ui.Component parent)
           
 void setSpan(int span)
          Sets the number of columns to span this cell.
 void setValue(java.lang.Object value)
          Sets the value.
 void setWidth(java.lang.String width)
           
 
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, 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, getZIndex, isAsapRequired, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, 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, isChildable, 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

Listcell

public Listcell()

Listcell

public Listcell(java.lang.String label)

Listcell

public Listcell(java.lang.String label,
                java.lang.String src)
Method Detail

getListbox

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


getListitem

public Listitem getListitem()
Deprecated. 

Returns the list item that it belongs to.

Deprecated since 2.4.1, due to too confusing


getListheader

public Listheader getListheader()
Returns the list header that is in the same column as this cell, or null if not available.


getColumnIndex

public int getColumnIndex()
Returns the column index of this cell, starting from 0.


getMaxlength

public int getMaxlength()
Returns the maximal length for this cell. If listbox's mold is "select", it is the same as Listbox.getMaxlength() If not, it is the same as the correponding getListheader()'s Listheader.getMaxlength().

Note: Listitem.getMaxlength() is the same as Listbox.getMaxlength().


getValue

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

Default: null.

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


setValue

public 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.


getSpan

public int getSpan()
Returns number of columns to span this cell. Default: 1.


setSpan

public void setSpan(int span)
Sets the number of columns to span this cell.

It is the same as the colspan attribute of HTML TD tag.


getWidth

public java.lang.String getWidth()
Returns the width which the same as getListheader()'s width.

Overrides:
getWidth in class org.zkoss.zk.ui.HtmlBasedComponent

setWidth

public void setWidth(java.lang.String width)
Overrides:
setWidth in class org.zkoss.zk.ui.HtmlBasedComponent

getColumnHtmlPrefix

public java.lang.String getColumnHtmlPrefix()
Returns the prefix of the first column (in HTML tags), null if this is not first column. Called only by listcell.jsp.


getColumnHtmlPostfix

public java.lang.String getColumnHtmlPostfix()
Returns the postfix of the first column (in HTML tags), null if this is not first column. Called only by listcell.jsp.


getOuterAttrs

public java.lang.String getOuterAttrs()
Overrides:
getOuterAttrs in class XulElement

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

invalidate

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


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