Class AbstractShortcut

    • Constructor Detail

      • AbstractShortcut

        public AbstractShortcut()
        Class constructor
    • Method Detail

      • getLinkTag

        protected Tag getLinkTag()
        Generate a Tag instance for the current ShortcutElement according to the information available for it, considering if it's an active shortcut, if it's enabled and what type of action should be triggered when the user selects it.
        Returns:
        Tag instance with the anchor information associated with the current Shortcut.
      • getImgTag

        protected Tag getImgTag​(boolean useExtendedAttributes,
                                boolean useId,
                                boolean createIfNotDefined)
        If necessary, this method builds up an image tag for the current ShortcutElement
        Parameters:
        useExtendedAttributes - boolean value indicating if the attributes defined for the shortcut should be added to the image tag to be created
        useId - boolean value indicating if the resulting tag should have its id attribute defined as specified on the shortcut
        createIfNotDefined - boolean value indicating if a transparent image should be assigned to the image in case it was not defined as part of the shortcut.
        Returns:
        Tag instance for an image, initialized with the information available on the shortcut definition.
      • getFeaturesRoot

        protected WebComponent getFeaturesRoot()
        Get the WebComponent instance that will be used as base for testing features.
        Returns:
        the WebComponent to use as the root to check features (i.e. check-feature, active-feature, etc.)
      • addAttributesToTag

        protected void addAttributesToTag​(Tag tag,
                                          WebAttributeList attributes)
        Convenience method for adding properties to the Tag instance, based on the attribute information sent as parameter.
        Parameters:
        tag - Tag instance where the attribute information shall be added
        attributes - WebAttributeList instance with the attribute information to add to the Tag, as name and value pairs.
      • get1ptrans

        protected java.lang.String get1ptrans()
        Convenience method for obtaining a transparent image file path location.
        Returns:
        String value with the path and file name of a transparent image that could be used for output formatting.
      • setShortcut

        public void setShortcut​(Shortcut config)
        Set the Shortcut instance to be rendered by this element
        Specified by:
        setShortcut in interface ShortcutElement
        Parameters:
        config - Shortcut instance to be rendered by this shortcut element.
      • setIncludeSubItems

        public void setIncludeSubItems​(boolean value)
        This flag indicates whether the HTML should include the subitems content when this element is rendered.
        Specified by:
        setIncludeSubItems in interface ShortcutElement
        Parameters:
        value - boolean value of true if shortcut should include it automatically.
      • isIncludeSubItems

        public boolean isIncludeSubItems()
        This flag indicates whether the HTML should include the subitems content when this element is rendered.
        Specified by:
        isIncludeSubItems in interface ShortcutElement
        Returns:
        boolean true if subitems content will be included when the element is rendered.