Class ModelMenu

  • All Implemented Interfaces:
    java.io.Serializable

    public class ModelMenu
    extends ModelWidget
    Models the <menu> element.
    See Also:
    widget-menu.xsd, Serialized Form
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • ModelMenu

        public ModelMenu​(org.w3c.dom.Element menuElement,
                         java.lang.String menuLocation,
                         VisualTheme visualTheme)
        XML Constructor
    • Method Detail

      • getActions

        public java.util.List<ModelAction> getActions()
      • getBoundaryCommentName

        public java.lang.String getBoundaryCommentName()
        Description copied from class: ModelWidget
        Returns the widget's name to be used in boundary comments. The default action is to return the widget's name. Derived classes can override this method to return a customized name.
        Overrides:
        getBoundaryCommentName in class ModelWidget
        Returns:
        Name to be used in boundary comments
      • getCurrentMenuName

        public java.lang.String getCurrentMenuName​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getDefaultAlign

        public java.lang.String getDefaultAlign()
      • getDefaultAlignStyle

        public java.lang.String getDefaultAlignStyle()
      • getDefaultAssociatedContentId

        public java.lang.String getDefaultAssociatedContentId​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getDefaultCellWidth

        public java.lang.String getDefaultCellWidth()
      • getDefaultDisabledTitleStyle

        public java.lang.String getDefaultDisabledTitleStyle()
      • getDefaultEntityName

        public java.lang.String getDefaultEntityName()
      • getDefaultHideIfSelected

        public java.lang.Boolean getDefaultHideIfSelected()
      • getDefaultMenuItemName

        public java.lang.String getDefaultMenuItemName()
      • getDefaultPermissionEntityAction

        public java.lang.String getDefaultPermissionEntityAction()
      • getDefaultPermissionOperation

        public java.lang.String getDefaultPermissionOperation()
      • getDefaultSelectedStyle

        public java.lang.String getDefaultSelectedStyle()
      • getDefaultTitleStyle

        public java.lang.String getDefaultTitleStyle()
      • getDefaultTooltipStyle

        public java.lang.String getDefaultTooltipStyle()
      • getDefaultWidgetStyle

        public java.lang.String getDefaultWidgetStyle()
      • getExtraIndex

        public java.lang.String getExtraIndex​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getFillStyle

        public java.lang.String getFillStyle()
      • getId

        public java.lang.String getId()
      • getMenuContainerStyle

        public java.lang.String getMenuContainerStyle​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getMenuItemList

        public java.util.List<ModelMenuItem> getMenuItemList()
      • getMenuItemMap

        public java.util.Map<java.lang.String,​ModelMenuItem> getMenuItemMap()
      • getMenuLocation

        public java.lang.String getMenuLocation()
      • getMenuWidth

        public java.lang.String getMenuWidth()
      • getModelMenuItemByName

        public ModelMenuItem getModelMenuItemByName​(java.lang.String name)
      • getOrientation

        public java.lang.String getOrientation()
      • getParentMenu

        public ModelMenu getParentMenu()
      • getSelectedMenuItemContextFieldName

        public FlexibleMapAccessor<java.lang.String> getSelectedMenuItemContextFieldName()
      • getSelectedMenuItemContextFieldName

        public java.lang.String getSelectedMenuItemContextFieldName​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getTarget

        public java.lang.String getTarget()
      • getTitle

        public java.lang.String getTitle​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getTooltip

        public java.lang.String getTooltip()
      • getType

        public java.lang.String getType()
      • renderedMenuItemCount

        public int renderedMenuItemCount​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • renderMenuString

        public void renderMenuString​(java.lang.Appendable writer,
                                     java.util.Map<java.lang.String,​java.lang.Object> context,
                                     MenuStringRenderer menuStringRenderer)
                              throws java.io.IOException
        Renders this menu to a String, i.e. in a text format, as defined with the MenuStringRenderer implementation.
        Parameters:
        writer - The Writer that the menu text will be written to
        context - Map containing the menu context; the following are reserved words in this context: parameters (Map), isError (Boolean), itemIndex (Integer, for lists only, otherwise null), menuName (String, optional alternate name for menu, defaults to the value of the name attribute)
        menuStringRenderer - An implementation of the MenuStringRenderer interface that is responsible for the actual text generation for different menu elements; implementing you own makes it possible to use the same menu definitions for many types of menu UIs
        Throws:
        java.io.IOException
      • renderSimpleMenuString

        public void renderSimpleMenuString​(java.lang.Appendable writer,
                                           java.util.Map<java.lang.String,​java.lang.Object> context,
                                           MenuStringRenderer menuStringRenderer)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • runActions

        public void runActions​(java.util.Map<java.lang.String,​java.lang.Object> context)