Class AbstractShortcut
- java.lang.Object
-
- com.microstrategy.web.app.gui.AbstractGuiElement
-
- com.microstrategy.web.app.gui.shortcuts.AbstractShortcut
-
- All Implemented Interfaces:
GuiElement,ShortcutElement
- Direct Known Subclasses:
ShortcutAnchor,ShortcutBean,ShortcutButton,ShortcutCaption,ShortcutColorPickerPane,ShortcutCombo,ShortcutDefault,ShortcutGridInfo,ShortcutGridLevels,ShortcutInput,ShortcutLabel,ShortcutPulldown
public abstract class AbstractShortcut extends AbstractGuiElement implements ShortcutElement
This abstractGuiElementimplementation serves as base for rendering information about the different types ofShortcutElementa toolbar might use for displaying its different options to the user.- Since:
- MicroStrategy Web 8.0.0
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.gui.AbstractGuiElement
_appContext, _name, _webComponent
-
-
Constructor Summary
Constructors Constructor Description AbstractShortcut()Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAttributesToTag(Tag tag, WebAttributeList attributes)Convenience method for adding properties to theTaginstance, based on the attribute information sent as parameter.protected java.lang.Stringget1ptrans()Convenience method for obtaining a transparent image file path location.protected WebComponentgetFeaturesRoot()Get theWebComponentinstance that will be used as base for testing features.protected TaggetImgTag(boolean useExtendedAttributes, boolean useId, boolean createIfNotDefined)If necessary, this method builds up an image tag for the currentShortcutElementprotected TaggetLinkTag()Generate aTaginstance for the currentShortcutElementaccording 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.ShortcutgetShortcut()Get theShortcutinstance to be rendered by this elementbooleanisIncludeSubItems()This flag indicates whether the HTML should include the subitems content when this element is rendered.MarkupOutputrenderElement()Render the instance according to the information provided on its configuration.voidsetIncludeSubItems(boolean value)This flag indicates whether the HTML should include the subitems content when this element is rendered.voidsetShortcut(Shortcut config)Set theShortcutinstance to be rendered by this element-
Methods inherited from class com.microstrategy.web.app.gui.AbstractGuiElement
getAppContext, getDescriptor, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getFeatures, getMessages, getName, getTagsFactory, getUseIFrame, getWebComponent, isDhtml, isIFrameEnabled, newHiddenInputBuilder, newNamespaceEncoder, newURIBuilder, renderElement, setAppContext, setExtraInput, setExtraUrl, setName, setUseIFrame, setWebComponent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.app.gui.GuiElement
getAppContext, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getFeatures, getMessages, getName, getUseIFrame, getWebComponent, renderElement, setAppContext, setExtraInput, setExtraUrl, setName, setUseIFrame, setWebComponent
-
-
-
-
Method Detail
-
renderElement
public MarkupOutput renderElement()
Render the instance according to the information provided on its configuration.- Specified by:
renderElementin interfaceGuiElement- Specified by:
renderElementin classAbstractGuiElement- Returns:
MarkupOutputinstance initialized with the HTML information to display to the user.
-
getLinkTag
protected Tag getLinkTag()
Generate aTaginstance for the currentShortcutElementaccording 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.
-
getImgTag
protected Tag getImgTag(boolean useExtendedAttributes, boolean useId, boolean createIfNotDefined)
If necessary, this method builds up an image tag for the currentShortcutElement- Parameters:
useExtendedAttributes-booleanvalue indicating if the attributes defined for the shortcut should be added to the image tag to be createduseId-booleanvalue indicating if the resulting tag should have its id attribute defined as specified on the shortcutcreateIfNotDefined-booleanvalue indicating if a transparent image should be assigned to the image in case it was not defined as part of the shortcut.- Returns:
Taginstance for an image, initialized with the information available on the shortcut definition.
-
getFeaturesRoot
protected WebComponent getFeaturesRoot()
Get theWebComponentinstance that will be used as base for testing features.- Returns:
- the
WebComponentto 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 theTaginstance, based on the attribute information sent as parameter.- Parameters:
tag-Taginstance where the attribute information shall be addedattributes-WebAttributeListinstance with the attribute information to add to theTag, 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 theShortcutinstance to be rendered by this element- Specified by:
setShortcutin interfaceShortcutElement- Parameters:
config-Shortcutinstance to be rendered by this shortcut element.
-
getShortcut
public Shortcut getShortcut()
Get theShortcutinstance to be rendered by this element- Specified by:
getShortcutin interfaceShortcutElement- Returns:
- the current
Shortcutinstance associated with this 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:
setIncludeSubItemsin interfaceShortcutElement- 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:
isIncludeSubItemsin interfaceShortcutElement- Returns:
- boolean true if subitems content will be included when the element is rendered.
-
-