|
||||||||||
| 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.Menuitem
public class Menuitem
sA single choice in a Menupopup element.
It acts much like a button but it is rendered on a menu.
| Nested Class Summary | |
|---|---|
protected class |
Menuitem.ExtraCtrl
A utility class to implement AbstractComponent.getExtraCtrl(). |
| 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 | |
|---|---|
Menuitem()
|
|
Menuitem(java.lang.String label)
|
|
Menuitem(java.lang.String label,
java.lang.String src)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getHref()
Returns the href. |
java.lang.String |
getOuterAttrs()
|
protected java.lang.String |
getRealStyle()
|
java.lang.String |
getTarget()
Returns the target frame or window. |
java.lang.String |
getValue()
Returns the value. |
boolean |
isAutocheck()
Returns whether the menuitem check mark will update each time the menu item is selected Default: false. |
boolean |
isChecked()
Returns whether it is checked. |
boolean |
isChildable()
Not childable. |
boolean |
isTopmost()
Returns whether this is an top-level menu, i.e., not owning by another Menupopup. |
protected java.lang.Object |
newExtraCtrl()
|
void |
setAutocheck(boolean autocheck)
Sets whether the menuitem check mark will update each time the menu item is selected |
void |
setChecked(boolean checked)
Sets whether it is checked. |
void |
setHref(java.lang.String href)
Sets the href. |
void |
setParent(org.zkoss.zk.ui.Component parent)
|
void |
setTarget(java.lang.String target)
Sets the target frame or window. |
void |
setValue(java.lang.String value)
Sets the value. |
| Methods inherited from class org.zkoss.zul.impl.LabelImageElement |
|---|
getImage, getImageContent, getImgTag, getSrc, isImageAssigned, 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, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, isAsapRequired, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, 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, invalidate, 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 |
|---|
public Menuitem()
public Menuitem(java.lang.String label)
public Menuitem(java.lang.String label,
java.lang.String src)
| Method Detail |
|---|
public java.lang.String getValue()
Default: "".
public void setValue(java.lang.String value)
public boolean isChecked()
Default: false.
public void setChecked(boolean checked)
public boolean isAutocheck()
Default: false.
public void setAutocheck(boolean autocheck)
public java.lang.String getHref()
Default: null. If null, the button has no function unless you specify the onClick handler.
public void setHref(java.lang.String href)
throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueExceptionpublic java.lang.String getTarget()
Note: it is useful only if href (setHref(java.lang.String)) is specified
(i.e., use the onClick listener).
Default: null.
public void setTarget(java.lang.String target)
target - the name of the frame or window to hyperlink.public boolean isTopmost()
Menupopup.
public java.lang.String getOuterAttrs()
getOuterAttrs in class XulElementprotected java.lang.String getRealStyle()
getRealStyle in class org.zkoss.zk.ui.HtmlBasedComponentpublic void setParent(org.zkoss.zk.ui.Component parent)
setParent in interface org.zkoss.zk.ui.ComponentsetParent in class org.zkoss.zk.ui.AbstractComponentpublic boolean isChildable()
isChildable in interface org.zkoss.zk.ui.ComponentisChildable in class org.zkoss.zk.ui.AbstractComponentprotected java.lang.Object newExtraCtrl()
newExtraCtrl in class LabelImageElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||