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 abstractGuiElement
implementation serves as base for rendering information about the different types ofShortcutElement
a 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 void
addAttributesToTag(Tag tag, WebAttributeList attributes)
Convenience method for adding properties to theTag
instance, based on the attribute information sent as parameter.protected java.lang.String
get1ptrans()
Convenience method for obtaining a transparent image file path location.protected WebComponent
getFeaturesRoot()
Get theWebComponent
instance that will be used as base for testing features.protected Tag
getImgTag(boolean useExtendedAttributes, boolean useId, boolean createIfNotDefined)
If necessary, this method builds up an image tag for the currentShortcutElement
protected Tag
getLinkTag()
Generate aTag
instance for the currentShortcutElement
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.Shortcut
getShortcut()
Get theShortcut
instance to be rendered by this elementboolean
isIncludeSubItems()
This flag indicates whether the HTML should include the subitems content when this element is rendered.MarkupOutput
renderElement()
Render the instance according to the information provided on its configuration.void
setIncludeSubItems(boolean value)
This flag indicates whether the HTML should include the subitems content when this element is rendered.void
setShortcut(Shortcut config)
Set theShortcut
instance 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:
renderElement
in interfaceGuiElement
- Specified by:
renderElement
in classAbstractGuiElement
- Returns:
MarkupOutput
instance initialized with the HTML information to display to the user.
-
getLinkTag
protected Tag getLinkTag()
Generate aTag
instance for the currentShortcutElement
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.
-
getImgTag
protected Tag getImgTag(boolean useExtendedAttributes, boolean useId, boolean createIfNotDefined)
If necessary, this method builds up an image tag for the currentShortcutElement
- Parameters:
useExtendedAttributes
-boolean
value indicating if the attributes defined for the shortcut should be added to the image tag to be createduseId
-boolean
value indicating if the resulting tag should have its id attribute defined as specified on the shortcutcreateIfNotDefined
-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 theWebComponent
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 theTag
instance, based on the attribute information sent as parameter.- Parameters:
tag
-Tag
instance where the attribute information shall be addedattributes
-WebAttributeList
instance 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 theShortcut
instance to be rendered by this element- Specified by:
setShortcut
in interfaceShortcutElement
- Parameters:
config
-Shortcut
instance to be rendered by this shortcut element.
-
getShortcut
public Shortcut getShortcut()
Get theShortcut
instance to be rendered by this element- Specified by:
getShortcut
in interfaceShortcutElement
- Returns:
- the current
Shortcut
instance 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:
setIncludeSubItems
in 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:
isIncludeSubItems
in interfaceShortcutElement
- Returns:
- boolean true if subitems content will be included when the element is rendered.
-
-