Class AbstractShortcutList
- java.lang.Object
-
- com.microstrategy.web.app.gui.AbstractGuiElement
-
- com.microstrategy.web.app.gui.shortcuts.AbstractShortcutList
-
- All Implemented Interfaces:
GuiElement
,ShortcutListElement
- Direct Known Subclasses:
ShortcutListPicker
,ShortcutListStyles
public abstract class AbstractShortcutList extends AbstractGuiElement implements ShortcutListElement
This abstractGuiElement
implementation serves as base for rendering information about the different types ofShortcutListElement
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 AbstractShortcutList()
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 WebComponent
getFeaturesRoot()
Get theWebComponent
instance that will be used as base for testing features.java.lang.String
getGroupCss()
Get the css class for the main div that contains theShortcutList
.java.lang.String
getId()
Get the id for the main div that contains theShortcutList
.ShortcutList
getShortcutList()
Get theShortcutList
instance to be rendered by this elementprotected boolean
isEnabled(ShortcutList list)
Utility method that tests if theShortcutList
instance shall be enabled for the user.boolean
isIncludeSubItems()
This flag indicates whether the HTML should include the subitems content when this element is rendered.boolean
isShowPrefixElements()
Indicates whether there are children elements maked as "Prefix" that should be included in the output as such.boolean
isShowSuffixElements()
Indicates whether there are children elements maked as "Suffix" that should be included in the output as such.MarkupOutput
renderElement()
Render the instance according to the information provided on its configuration.void
setGroupCss(java.lang.String css)
Set the css class for the main div that contains theShortcutList
.void
setId(java.lang.String id)
Set the id for the main div that contains theShortcutList
.void
setIncludeSubItems(boolean value)
This flag indicates whether the HTML should include the subitems content when this element is rendered.void
setShortcutList(ShortcutList _config)
Set theShortcutList
instance to be rendered by this elementvoid
setShowPrefixElements(boolean value)
Set the boolean flag value that indicates whether there are children elements maked as "Prefix" that should be included in the output as such.void
setShowSuffixElements(boolean value)
Set the boolean flag value that indicates whether there are children elements maked as "Suffix" that should be included in the output as such.-
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.
-
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.
-
setShortcutList
public void setShortcutList(ShortcutList _config)
Set theShortcutList
instance to be rendered by this element- Specified by:
setShortcutList
in interfaceShortcutListElement
- Parameters:
_config
-ShortcutList
instance to be rendered by this GUI element.
-
getShortcutList
public ShortcutList getShortcutList()
Get theShortcutList
instance to be rendered by this element- Specified by:
getShortcutList
in interfaceShortcutListElement
- Returns:
- the current
ShortcutList
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 interfaceShortcutListElement
- 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 interfaceShortcutListElement
- Returns:
- boolean true if subitems content will be included when the element is rendered.
-
setShowPrefixElements
public void setShowPrefixElements(boolean value)
Set the boolean flag value that indicates whether there are children elements maked as "Prefix" that should be included in the output as such.- Specified by:
setShowPrefixElements
in interfaceShortcutListElement
- Parameters:
value
- boolean true if these children should be rendered.
-
isShowPrefixElements
public boolean isShowPrefixElements()
Indicates whether there are children elements maked as "Prefix" that should be included in the output as such.- Specified by:
isShowPrefixElements
in interfaceShortcutListElement
- Returns:
- boolean true if children marked as "Prefix" are included when the element is rendered.
-
setShowSuffixElements
public void setShowSuffixElements(boolean value)
Set the boolean flag value that indicates whether there are children elements maked as "Suffix" that should be included in the output as such.- Specified by:
setShowSuffixElements
in interfaceShortcutListElement
- Parameters:
value
-boolean
value indicating if these children should be rendered.
-
isShowSuffixElements
public boolean isShowSuffixElements()
Indicates whether there are children elements maked as "Suffix" that should be included in the output as such.- Specified by:
isShowSuffixElements
in interfaceShortcutListElement
- Returns:
- boolean true if children marked as "Suffix" are included when the element is rendered.
-
setGroupCss
public void setGroupCss(java.lang.String css)
Set the css class for the main div that contains theShortcutList
.- Specified by:
setGroupCss
in interfaceShortcutListElement
- Parameters:
css
- the new css class to use. By default the value is "group:
-
setId
public void setId(java.lang.String id)
Set the id for the main div that contains theShortcutList
.- Specified by:
setId
in interfaceShortcutListElement
- Parameters:
id
-String
value with the identifier for the instance.
-
getId
public java.lang.String getId()
Get the id for the main div that contains theShortcutList
.- Specified by:
getId
in interfaceShortcutListElement
- Returns:
- the current id for the main div that contains the ShortcutList. If an id has not been set it uses the name of the associated ShortcutList If no ShortcutList is associated, it then returns null.
-
getGroupCss
public java.lang.String getGroupCss()
Get the css class for the main div that contains theShortcutList
.- Specified by:
getGroupCss
in interfaceShortcutListElement
- Returns:
- the current css class for the main div that contains the ShortcutList.
-
isEnabled
protected boolean isEnabled(ShortcutList list)
Utility method that tests if theShortcutList
instance shall be enabled for the user.- Parameters:
list
-ShortcutList
instance to test- Returns:
boolean
value indicating if the instance tested is enabled or not.
-
-