public class Radio extends Checkbox
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.Checkbox.State
LabelImageElement.ExtraCtrl
Constructor and Description |
---|
Radio() |
Radio(String label) |
Radio(String label,
String image) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
String |
getName()
Returns the name of this radio button.
|
Radiogroup |
getRadiogroup()
Returns
Radiogroup that this radio button belongs to. |
String |
getZclass()
Returns the Style of radio label
|
boolean |
isSelected()
Returns whether it is selected.
|
void |
onPageAttached(org.zkoss.zk.ui.Page newpage,
org.zkoss.zk.ui.Page oldpage) |
void |
onPageDetached(org.zkoss.zk.ui.Page page) |
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Processes an AU request.
|
void |
setChecked(boolean checked)
Sets the radio is checked and unchecked the others in the same radio
group (
Radiogroup . |
void |
setParent(org.zkoss.zk.ui.Component parent) |
void |
setRadiogroup(Radiogroup radiogroup)
Associates the radiogroup to this radio component.
|
void |
setRadiogroup(String radiogroupId)
Associates the radiogroup to this radio component by giving ID.
|
void |
setSelected(boolean selected)
Sets whether it is selected.
|
getAutodisable, getState, getValue, isChecked, isChildable, isDisabled, isIndeterminate, setAutodisable, setDisabled, setIndeterminate, setMold, setName, setValue, updateByClient
getExtraCtrl, getHoverImage, getHoverImageContent, getIconSclass, getImage, getImageContent, getPropertyAccess, getSrc, isImageAssigned, setHoverImage, setHoverImageContent, setHoverImageContent, setIconSclass, setImage, setImageContent, setImageContent, setSrc
getLabel, renderCrawlable, setLabel
getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setPage, setPageBefore, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
public Radio()
public Radio(String label)
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 void setRadiogroup(Radiogroup radiogroup)
public void setRadiogroup(String radiogroupId)
radiogroupId
- the ID of the radiogroup. To specify UUID,
use the format: uuid(comp_uuid)
.public boolean isSelected()
Default: false.
Don't override this. Override Checkbox.isChecked()
instead.
public 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 class Checkbox
public 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()
).
public String getZclass()
Default: "z-radio"
Since 3.5.1
public void setParent(org.zkoss.zk.ui.Component parent)
setParent
in interface org.zkoss.zk.ui.Component
setParent
in class org.zkoss.zk.ui.AbstractComponent
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException
renderProperties
in class Checkbox
IOException
public void service(org.zkoss.zk.au.AuRequest request, boolean everError)
public void onPageDetached(org.zkoss.zk.ui.Page page)
onPageDetached
in interface org.zkoss.zk.ui.sys.ComponentCtrl
onPageDetached
in class org.zkoss.zk.ui.AbstractComponent
public void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
onPageAttached
in interface org.zkoss.zk.ui.sys.ComponentCtrl
onPageAttached
in class org.zkoss.zk.ui.AbstractComponent
public Object clone()
clone
in interface org.zkoss.zk.ui.Component
clone
in class LabelImageElement
Copyright © 2022. All rights reserved.