public interface StaticMenuItemControl extends MenuItemControl
Vertical Menu
or a Horizontal Menu
.
Each menu item can contain a text and/or a single image; if an image is displayed as part of the item, its location can be to the right or left of the text.
An override on click event can be set for each individual menu item; if this property is not set, the on click event for the parent Menu Control is executed.
Each menu item can either be enabled or disabled. When disabled, the menu item is still displayed but cannot be clicked by the user.
Modifier and Type | Method and Description |
---|---|
MenuStateProperties |
getAllState()
Styling properties that apply to all states - selected, unselected, hover.
|
MenuStateProperties |
getHoverState()
Styling properties applied to the menu item when the mouse is hovered over the menu item.
|
Text |
getImageAltText()
Returns the
Text object for the menu item image alternate text. |
java.lang.String |
getImageClass()
Returns the list of CSS classes applied to the menu item image.
|
Text |
getImageMouseOverText()
Returns the
Text object for the menu item image mouse over text. |
java.lang.String |
getImagePosition()
The position of the optional image relative to the menu item text.
|
ImageStyleProperties |
getImageProperties()
Styling properties applied to optional menu item image.
|
java.lang.String |
getImageStyle()
Returns the inline CSS style applied to the menu item image.
|
java.lang.String |
getImageURL()
Returns the URL of the optional image to be displayed on the menu item.
|
MenuStateProperties |
getSelectedState()
Styling properties applied to the menu item when it is selected.
|
Text |
getText()
Returns the
Text object for the menu item text. |
java.lang.String |
getTextImageGap()
The gap between the menu item text and any configured image.
|
MenuStateProperties |
getUnselectedState()
Styling properties applied to the menu item when it is unselected.
|
boolean |
isEnabled()
When enabled, the menu item can be clicked; when disabled the menu item is still displayed but cannot be clicked.
|
void |
setEnabled(boolean enabled)
Sets whether or not the menu item can be clicked by the user.
|
void |
setImageClass(java.lang.String imageClass)
Sets one or more CSS classes to be applied to the menu item image.
|
void |
setImagePosition(java.lang.String imagePosition)
Sets the position of the optional image relative to the menu item text.
|
void |
setImageStyle(java.lang.String imageStyle)
Sets the inline CSS style to be applied to the menu item image.
|
void |
setImageURL(java.lang.String imageURL)
Sets the URL of the optional image to be displayed on the menu item.
|
void |
setTextImageGap(java.lang.String textImageGap)
Sets the gap between the menu item text and any configured image.
|
getAriaLabelText, getItemName, getName
addCssClass, getAll, getCssClass, getErrorMsgClass, getErrorMsgStyle, getInfoMsgClass, getInfoMsgStyle, getLayoutCell, getNextSiblingControl, getPage, getParentControl, getPreviousSiblingControl, getStyle, getWarningMsgClass, getWarningMsgStyle, hasModifier, hide, isContainer, isDisplayOnly, isDisplayOnlyIncludingParents, isEventField, isHidden, isInheritMsg, isLocalMsg, isNewLine, isShowing, refresh, removeCssClass, requestFocus, setCssClass, setDisplayOnly, setErrorMsgClass, setErrorMsgStyle, setHidden, setInfoMsgClass, setInfoMsgStyle, setNewLine, setStyle, setWarningMsgClass, setWarningMsgStyle, show
getElementName, getElementType
addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessageText, addErrorMessageText, addErrorMessageText, addInfoMessage, addInfoMessage, addInfoMessageText, addInfoMessageText, addInfoMessageText, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessageText, addWarningMessageText, addWarningMessageText, existErrorMessages, existInfoMessages, existMessages, existWarningMessages
getErrorMessageStyle, getInfoMessageStyle, getWarningMessageStyle
java.lang.String getImageURL()
void setImageURL(java.lang.String imageURL)
http://www.google.com
.
Text getImageMouseOverText()
Text
object for the menu item image mouse over text.Text getImageAltText()
Text
object for the menu item image alternate text.java.lang.String getImageStyle()
This inline style is configured in the designer using the Advanced Properties button within the control's Styling Assistant.
setImageStyle(String)
void setImageStyle(java.lang.String imageStyle)
This inline style is configured in the designer using the Advanced Properties button within the control's Styling Assistant.
java.lang.String getImageClass()
These classes are configured in the designer using the Advanced Properties button within the control's Styling Assistant.
setImageClass(String)
void setImageClass(java.lang.String imageClass)
These classes are configured in the designer using the Advanced Properties button within the control's Styling Assistant.
boolean isEnabled()
void setEnabled(boolean enabled)
java.lang.String getTextImageGap()
setTextImageGap(String)
void setTextImageGap(java.lang.String textImageGap)
Examples:
controls.STATICMENUITEM1.textImageGap = "30px";
java.lang.String getImagePosition()
setImagePosition(String)
for details of supported values when setting this property.
void setImagePosition(java.lang.String imagePosition)
Supported values:
Value | Description |
---|---|
Left | Image is positioned to the left of the text |
Right | Image is positioned to the right of the text |
None | No image will be displayed |
Examples:
controls.STATICMENUITEM1.imagePosition = "Left";
MenuStateProperties getAllState()
getUnselectedState()
,
getSelectedState()
,
getHoverState()
MenuStateProperties getUnselectedState()
allState
property,
and also override any corresponding properties configured for the parent menu control.MenuStateProperties getSelectedState()
allState
property,
and also override any corresponding properties configured for the parent menu control.MenuStateProperties getHoverState()
allState
property,
and also override any corresponding properties configured for the parent menu control.ImageStyleProperties getImageProperties()