Package org.zkoss.stateless.sul
Interface IMenu
-
- All Superinterfaces:
IChildrenOfInputgroup<IMenu>
,IChildrenOfMenupopup<IMenu>
,IComponent<IMenu>
,IDisable<IMenu>
,IHtmlBasedComponent<IMenu>
,ILabelElement<IMenu>
,ILabelImageElement<IMenu>
,ISingleChildable<IMenu,IMenupopup>
,IXulElement<IMenu>
public interface IMenu extends ILabelImageElement<IMenu>, IDisable<IMenu>, ISingleChildable<IMenu,IMenupopup>, IChildrenOfMenupopup<IMenu>
ImmutableMenu
componentSupport @Action
Name Action Type onClick ActionData: MouseData
Represents an action triggered by the user clicks on the left hand side of the menu.- Author:
- katherine
- See Also:
Menu
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IMenu.Builder
Builds instances of typeIMenu
.static class
IMenu.Updater
Builds an updater of typeIMenu
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.String
getContent()
Returns the embedded content (i.e., HTML tags) that is shown as part of the description.default java.lang.String
getWidgetClass()
Returns the client widget class.static IMenu
of(java.lang.String label, java.lang.String image)
Returns the instance with the given label and image.static IMenu
of(java.lang.String label, IMenupopup child)
Returns the instance with the given label and a popup child.static IMenu
of(IMenupopup child)
Returns the instance with the givenIMenupopup
child.static IMenu
ofId(java.lang.String id)
Returns the instance with the given id.static IMenu
ofImage(java.lang.String image)
Returns the instance with the given image.IMenu
withContent(java.lang.String content)
Returns a copy ofthis
immutable component with the specifiedlabel
.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IDisable
isDisabled, withDisabled
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.ILabelElement
getLabel, withLabel
-
Methods inherited from interface org.zkoss.stateless.sul.ILabelImageElement
getHoverImage, getIconSclass, getIconSclasses, getIconTooltip, getIconTooltips, getImage, isPreloadImage, withHoverImage, withIconSclass, withIconSclasses, withIconTooltip, withIconTooltips, withImage, withPreloadImage
-
Methods inherited from interface org.zkoss.stateless.sul.ISingleChildable
getChild, withChild
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final IMenu DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.menu.Menu"
- Specified by:
getWidgetClass
in interfaceIComponent<IMenu>
-
getContent
default java.lang.String getContent()
Returns the embedded content (i.e., HTML tags) that is shown as part of the description.It is useful to show the description in more versatile way.
Default:
""
(empty).
-
withContent
IMenu withContent(java.lang.String content)
Returns a copy ofthis
immutable component with the specifiedlabel
.Sets the embedded content (i.e., HTML tags) that is shown as part of the description.
It is useful to show the description in more versatile way.
There is a way to create Colorbox automatically by using #color=#RRGGBB, usage example
withContent("#color=#FFFFFF")
Note: the content is sanitized by default to avoid XSS attack, and please don't use JavaScript in the content.
- Parameters:
content
- The embedded contentDefault:
""
.- Returns:
- A modified copy of the
this
object
-
of
static IMenu of(IMenupopup child)
Returns the instance with the givenIMenupopup
child.- Parameters:
child
- TheIMenupopup
child
-
of
static IMenu of(java.lang.String label, IMenupopup child)
Returns the instance with the given label and a popup child.- Parameters:
label
- The label of the menu.child
- The menupopup child.
-
ofId
static IMenu ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id
- The id to identify this component
-
of
static IMenu of(java.lang.String label, java.lang.String image)
Returns the instance with the given label and image.- Parameters:
label
- The label that the menu holds.image
- The image that the menu holds.
-
ofImage
static IMenu ofImage(java.lang.String image)
Returns the instance with the given image.- Parameters:
image
- The image that the menu holds.
-
-