|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.impl.LabelElement
org.zkoss.zul.impl.LabelImageElement
org.zkoss.zul.Checkbox
org.zkoss.zul.Radio
public class Radio
A radio button.
Radio buttons without a ancestor Radiogroup is considered
as the same group.
The nearest ancestor Radiogroup is the group that the radio
belongs to. See also getRadiogroup().
Event:
CheckEvent is sent when a checkbox
is checked or unchecked by user.
| Nested Class Summary | |
|---|---|
protected class |
Radio.ExtraCtrl
A utility class to implement AbstractComponent.getExtraCtrl(). |
| Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
AbstractComponent.Children |
| Field Summary |
|---|
| Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
_zclass, RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH |
| Fields inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
_visible |
| 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 | |
|---|---|
Radio()
|
|
Radio(java.lang.String label)
|
|
Radio(java.lang.String label,
java.lang.String image)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getInnerAttrs()
Returns the inner attributes for generating the HTML radio tag (the name and value attribute). |
java.lang.String |
getName()
Returns the name of this radio button. |
Radiogroup |
getRadiogroup()
Returns Radiogroup that this radio button belongs to. |
Radiogroup |
getRadiogroupApi()
Returns Radiogroup that this radio button belongs to. |
java.lang.String |
getValue()
Returns the value. |
java.lang.String |
getZclass()
Returns the Style of radio label Default: "z-radio" Since 3.5.1 |
boolean |
isSelected()
Returns whether it is selected. |
protected java.lang.Object |
newExtraCtrl()
Used by AbstractComponent.getExtraCtrl() to create a client control. |
void |
onCheck(Event event)
Process the onCheck event sent when the radio is checked. |
void |
setChecked(boolean checked)
Sets the radio is checked and unchecked the others in the same radio group ( Radiogroup. |
void |
setParent(Component parent)
Sets the parent component. |
void |
setSelected(boolean selected)
Sets whether it is selected. |
void |
setValue(java.lang.String value)
Sets the value. |
| Methods inherited from class org.zkoss.zul.Checkbox |
|---|
getLabelAttrs, getOuterAttrs, getTabindex, isChecked, isDisabled, setDisabled, setName, setTabindex |
| Methods inherited from class org.zkoss.zul.impl.LabelImageElement |
|---|
getEncodedImageURL, getHoverImage, getImage, getImageContent, getImgTag, getImgTag, getSrc, isImageAssigned, setHoverImage, setHoverImageContent, setHoverImageContent, setImage, setImageContent, setImageContent, setSrc |
| Methods inherited from class org.zkoss.zul.impl.LabelElement |
|---|
getLabel, setLabel |
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getMoldSclass, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZindex, getZIndex, redraw, setClass, setDraggable, setDroppable, setFocus, setHeight, setLeft, setMoldSclass, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.zkoss.zul.api.Checkbox |
|---|
getTabindex, isChecked, isDisabled, setDisabled, setName, setTabindex |
| Methods inherited from interface org.zkoss.zul.impl.api.LabelImageElement |
|---|
getHoverImage, getImage, getImageContent, setHoverImage, setHoverImageContent, setHoverImageContent, setImage, setImageContent, setImageContent |
| Methods inherited from interface org.zkoss.zul.impl.api.LabelElement |
|---|
getLabel, setLabel |
| 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, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Constructor Detail |
|---|
public Radio()
public Radio(java.lang.String label)
public Radio(java.lang.String label,
java.lang.String image)
| Method Detail |
|---|
public Radiogroup getRadiogroup()
Radiogroup that this radio button belongs to.
It is the nearest ancestor Radiogroup.
In other words, it searches up the parent, parent's parent
and so on for any Radiogroup instance.
If found this radio belongs the found radiogroup.
If not, this radio itself is a group.
public Radiogroup getRadiogroupApi()
Radiogroup that this radio button belongs to.
It is the nearest ancestor Radiogroup.
In other words, it searches up the parent, parent's parent
and so on for any Radiogroup instance.
If found this radio belongs the found radiogroup.
If not, this radio itself is a group.
getRadiogroupApi in interface Radiopublic final boolean isSelected()
Default: false.
Don't override this. Override Checkbox.isChecked() instead.
public final void setSelected(boolean selected)
Don't override this. Override setChecked(boolean) instead.
The same as setChecked(boolean).
public void setChecked(boolean checked)
Radiogroup.
setChecked in interface CheckboxsetChecked in class Checkboxpublic java.lang.String getValue()
Default: "".
getValue in interface Radiopublic void setValue(java.lang.String value)
setValue in interface Radiovalue - the value; If null, it is considered as empty.public final java.lang.String getName()
Don't use this method if your application is purely based on ZK's event-driven model.
It is readonly, and it is generated automatically
to be the same as its parent's name (Radiogroup.getName()).
getName in interface CheckboxgetName in class Checkboxpublic java.lang.String getInnerAttrs()
Used only by component developers.
getInnerAttrs in class Checkboxpublic java.lang.String getZclass()
Default: "z-radio"
Since 3.5.1
getZclass in interface HtmlBasedComponentgetZclass in class CheckboxHtmlBasedComponent.getSclass(),
HtmlBasedComponent.getRealSclass()public void onCheck(Event event)
public void setParent(Component parent)
ComponentNote: Component.setParent(org.zkoss.zk.ui.Component) always calls back Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)
and/or Component.removeChild(org.zkoss.zk.ui.Component),
while Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and Component.removeChild(org.zkoss.zk.ui.Component)
always calls back Component.setParent(org.zkoss.zk.ui.Component),
if the parent is changed. Thus, you don't need to override
both Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and Component.setParent(org.zkoss.zk.ui.Component), if you want
to customize the behavior.
setParent in interface ComponentsetParent in class AbstractComponentprotected java.lang.Object newExtraCtrl()
HtmlBasedComponentAbstractComponent.getExtraCtrl() to create a client control.
It is used only by component developers.
Defaut: creates an instance of HtmlBasedComponent.ExtraCtrl.
newExtraCtrl in class Checkbox
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||