org.zkoss.zul.api
Interface Radiogroup

All Superinterfaces:
java.lang.Cloneable, Component, HtmlBasedComponent, Scope, java.io.Serializable, XulElement
All Known Implementing Classes:
Radiogroup

public interface Radiogroup
extends XulElement

A radio group.

Note: To support the versatile layout, a radio group accepts any kind of children, including Radio. On the other hand, the parent of a radio, if any, must be a radio group.

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
 Radio appendItemApi(java.lang.String label, java.lang.String value)
          Appends a radio button.
 Radio getItemAtIndexApi(int index)
          Returns the radio button at the specified index.
 int getItemCount()
          Returns the number of radio buttons in this group.
 java.lang.String getName()
          Returns the name of this group of radio buttons.
 java.lang.String getOrient()
          Returns the orient.
 int getSelectedIndex()
          Returns the index of the selected radio button (-1 if no one is selected).
 Radio getSelectedItemApi()
          Returns the selected radio button.
 Radio removeItemAtApi(int index)
          Removes the child radio button in the list box at the given index.
 void setName(java.lang.String name)
          Sets the name of this group of radio buttons.
 void setOrient(java.lang.String orient)
          Sets the orient.
 void setSelectedIndex(int jsel)
          Deselects all of the currently selected radio button and selects the radio button with the given index.
 void setSelectedItemApi(Radio item)
          Deselects all of the currently selected radio buttons and selects the given radio button.
 
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

getOrient

java.lang.String getOrient()
Returns the orient.

Default: "horizontal".


setOrient

void setOrient(java.lang.String orient)
               throws WrongValueException
Sets the orient.

Parameters:
orient - either "horizontal" or "vertical".
Throws:
WrongValueException

getItemAtIndexApi

Radio getItemAtIndexApi(int index)
Returns the radio button at the specified index.


getItemCount

int getItemCount()
Returns the number of radio buttons in this group.


getSelectedIndex

int getSelectedIndex()
Returns the index of the selected radio button (-1 if no one is selected).


setSelectedIndex

void setSelectedIndex(int jsel)
Deselects all of the currently selected radio button and selects the radio button with the given index.


getSelectedItemApi

Radio getSelectedItemApi()
Returns the selected radio button.


setSelectedItemApi

void setSelectedItemApi(Radio item)
Deselects all of the currently selected radio buttons and selects the given radio button.


appendItemApi

Radio appendItemApi(java.lang.String label,
                    java.lang.String value)
Appends a radio button.


removeItemAtApi

Radio removeItemAtApi(int index)
Removes the child radio button in the list box at the given index.

Returns:
the removed radio button.

getName

java.lang.String getName()
Returns the name of this group of radio buttons. All child radio buttons shared the same name (Checkbox.getName()).

Default: automatically generated an unique name

Don't use this method if your application is purely based on ZK's event-driven model.


setName

void setName(java.lang.String name)
Sets the name of this group of radio buttons. All child radio buttons shared the same name (Checkbox.getName()).

Don't use this method if your application is purely based on ZK's event-driven model.



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