org.zkoss.zul
Class Listbox.ExtraCtrl

java.lang.Object
  extended by org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
      extended by org.zkoss.zul.Listbox.ExtraCtrl
All Implemented Interfaces:
InnerWidth, Movable, RenderOnDemand, Selectable, Sizable, ZIndexed, ChildChangedAware, Cropper, PrologAllowed
Enclosing class:
Listbox

protected class Listbox.ExtraCtrl
extends HtmlBasedComponent.ExtraCtrl
implements InnerWidth, Selectable, Cropper, RenderOnDemand, ChildChangedAware

A utility class to implement AbstractComponent.getExtraCtrl(). It is used only by component developers.


Constructor Summary
protected Listbox.ExtraCtrl()
           
 
Method Summary
 void clearSelectionByClient()
          Clears the selection.
 java.util.Set getAvailableAtClient()
          Returns a set of child components that are available at the client, or null if ALL available.
 boolean isChildChangedAware()
          Returns whether to send the z.chchg command to the client.
 boolean isCropper()
          Returns whether it is a cropper, i.e., cropping is applied.
 void renderItems(java.util.Set items)
          Renders a set of specified items, if they are not rendered before.
 void selectItemsByClient(java.util.Set selItems)
          Set the selection to a set of specified items.
 void setInnerWidthByClient(java.lang.String width)
          Sets the inner width of the component, caused by user's activity at the client.
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
setHeightByClient, setLeftByClient, setPrologContent, setTopByClient, setWidthByClient, setZIndexByClient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Listbox.ExtraCtrl

protected Listbox.ExtraCtrl()
Method Detail

isChildChangedAware

public boolean isChildChangedAware()
Description copied from interface: ChildChangedAware
Returns whether to send the z.chchg command to the client.

Specified by:
isChildChangedAware in interface ChildChangedAware

setInnerWidthByClient

public void setInnerWidthByClient(java.lang.String width)
Description copied from interface: InnerWidth
Sets the inner width of the component, caused by user's activity at the client.

This method is designed to be used by ZK update engine. Don't invoke it directly. Otherwise, the client and server might mismatch.

Specified by:
setInnerWidthByClient in interface InnerWidth

renderItems

public void renderItems(java.util.Set items)
Description copied from interface: RenderOnDemand
Renders a set of specified items, if they are not rendered before. If an item was rendered before, nothing is changed.

Specified by:
renderItems in interface RenderOnDemand

isCropper

public boolean isCropper()
Description copied from interface: Cropper
Returns whether it is a cropper, i.e., cropping is applied.

Note: this method is called when an child is detached, so you have to count one more for the total number of children. Example <= must be used, not <:
getChildCount() <= getPageSize()

The result of returning false is the same as not declaring with Cropper.

Specified by:
isCropper in interface Cropper

getAvailableAtClient

public java.util.Set getAvailableAtClient()
Description copied from interface: Cropper
Returns a set of child components that are available at the client, or null if ALL available. The child components in the returned set must be in the same order of Component.getChildren(). In order words, you must use LinkedHashSet or similar to ensure the order in the returned set.

Note: for better performance, it is better to return null if all children are available at the client.

Specified by:
getAvailableAtClient in interface Cropper

selectItemsByClient

public void selectItemsByClient(java.util.Set selItems)
Description copied from interface: Selectable
Set the selection to a set of specified items.

This method is designed to be used by engine. Don't invoke it directly. Otherwise, the client and server might mismatch.

Specified by:
selectItemsByClient in interface Selectable

clearSelectionByClient

public void clearSelectionByClient()
Description copied from interface: Selectable
Clears the selection.

This method is designed to be used by engine. Don't invoke it directly. Otherwise, the client and server might mismatch.

Specified by:
clearSelectionByClient in interface Selectable


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