Package com.microstrategy.web.app.gui
Class TreeViewImpl
- java.lang.Object
-
- com.microstrategy.web.app.gui.AbstractGuiElement
-
- com.microstrategy.web.app.gui.TreeViewImpl
-
- All Implemented Interfaces:
GuiElement
,TreeView
public class TreeViewImpl extends AbstractGuiElement implements TreeView
- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.gui.AbstractGuiElement
_appContext, _name, _webComponent
-
Fields inherited from interface com.microstrategy.web.app.gui.TreeView
TREE_COMPONENT_ID
-
-
Constructor Summary
Constructors Constructor Description TreeViewImpl()
TreeViewImpl constructor, initialize all tree properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addScriptDependency(java.lang.String filename, java.lang.String loadCondition)
This method adds a script dependency for a bone.EventManager
getEventManager()
get event manager for this gui elementJsonGenerator
getJSONGenerator()
This allows the user to retrieve the JSONGenerator object on which attribute-value pairs can be set These attribute-value pairs translate to properties on the tree bone tree boneboolean
getRenderEntireTreeIframeReqNotWithstanding()
Returns a boolean value that indicates whether a criteria has been set other than iframe request which decides whether the entire tree should be rendered or just the request nodeTreeNode
getRootTreeNode()
Function used to return the root tree node.boolean
getSortChildNodes()
Returns whether we should sort the child nodes.MarkupOutput
renderElement()
Function that returns instance of output writer.void
renderJavaScript(MarkupOutput out)
Renders the script dependencies and the bone.void
setRenderEntireTreeIframeReqNotWithstanding(boolean value)
This method allows the user to specify if he/she wants a criteria other than iframe request to decide whether to render the entire tree or render just the request node.void
setRenderRoot(boolean renderRoot)
void
setRenderShell(boolean renderShell)
void
setRootTreeNode(TreeNode root)
void
setScriptClass(java.lang.String scriptClass)
Holds the name of the javaScript class to be associated with the component.void
setSortChildNodes(boolean value)
Sets whether the child nodes have to be sorted.void
setStyle(java.lang.String style)
void
setSubObjectType(java.lang.String subObjType)
Holds the sub object type of the tree if the tree bone is used as a child bone A bone is the corresponding concept of a bean in Microstrategy's javascript environment.
by defautl the subObjectType of the tree is null so the tree bone itself should be a registered bonevoid
setTreeDivAttribute(java.lang.String name, java.lang.String value)
Function used for setting Tree properties.-
Methods inherited from class com.microstrategy.web.app.gui.AbstractGuiElement
getAppContext, getDescriptor, getDescriptor, getDescriptor, 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, getExtraInput, getExtraUrl, getFeatures, getMessages, getName, getUseIFrame, getWebComponent, renderElement, setAppContext, setExtraInput, setExtraUrl, setName, setUseIFrame, setWebComponent
-
-
-
-
Method Detail
-
renderElement
public MarkupOutput renderElement()
Function that returns instance of output writer.- Specified by:
renderElement
in interfaceGuiElement
- Specified by:
renderElement
in classAbstractGuiElement
- Returns:
- MarkupOutput
-
renderJavaScript
public void renderJavaScript(MarkupOutput out)
Renders the script dependencies and the bone.- Parameters:
out
-
-
getEventManager
public EventManager getEventManager()
Description copied from class:AbstractGuiElement
get event manager for this gui element- Specified by:
getEventManager
in interfaceGuiElement
- Overrides:
getEventManager
in classAbstractGuiElement
- Returns:
- the
EventManager
object
-
setRenderShell
public void setRenderShell(boolean renderShell)
- Specified by:
setRenderShell
in interfaceTreeView
-
setRenderRoot
public void setRenderRoot(boolean renderRoot)
- Specified by:
setRenderRoot
in interfaceTreeView
-
setRootTreeNode
public void setRootTreeNode(TreeNode root)
- Specified by:
setRootTreeNode
in interfaceTreeView
-
getRootTreeNode
public TreeNode getRootTreeNode()
Description copied from interface:TreeView
Function used to return the root tree node. The TreeBox will iterate though the children of this root node to render the tree.- Specified by:
getRootTreeNode
in interfaceTreeView
- Returns:
- The root TreeNode
-
setTreeDivAttribute
public void setTreeDivAttribute(java.lang.String name, java.lang.String value)
Description copied from interface:TreeView
Function used for setting Tree properties. You can specify any property to be set on the main tree div using this function.- Specified by:
setTreeDivAttribute
in interfaceTreeView
- Parameters:
name
- Name of propertyvalue
- Property's value.
-
setScriptClass
public void setScriptClass(java.lang.String scriptClass)
Description copied from interface:TreeView
Holds the name of the javaScript class to be associated with the component. When the scriptClass is specified, a bone is registered on the page for this component. A bone is the corresponding concept of a bean in Microstrategy's javascript environment.
If no scriptClass is specified we will use "mstrTreeViewImpl" as the default scriptClass- Specified by:
setScriptClass
in interfaceTreeView
- Parameters:
scriptClass
- the name of the script class
-
setSortChildNodes
public void setSortChildNodes(boolean value)
Sets whether the child nodes have to be sorted.- Parameters:
value
-
-
setSubObjectType
public void setSubObjectType(java.lang.String subObjType)
Description copied from interface:TreeView
Holds the sub object type of the tree if the tree bone is used as a child bone A bone is the corresponding concept of a bean in Microstrategy's javascript environment.
by defautl the subObjectType of the tree is null so the tree bone itself should be a registered bone- Specified by:
setSubObjectType
in interfaceTreeView
- Parameters:
subObjType
- the sub object type to be set
-
getSortChildNodes
public boolean getSortChildNodes()
Returns whether we should sort the child nodes.
-
setRenderEntireTreeIframeReqNotWithstanding
public void setRenderEntireTreeIframeReqNotWithstanding(boolean value)
Description copied from interface:TreeView
This method allows the user to specify if he/she wants a criteria other than iframe request to decide whether to render the entire tree or render just the request node. If set to true, the entire tree will be rendered irrespective of whether the request was an iframe request or not. Default value is set to false- Specified by:
setRenderEntireTreeIframeReqNotWithstanding
in interfaceTreeView
-
getRenderEntireTreeIframeReqNotWithstanding
public boolean getRenderEntireTreeIframeReqNotWithstanding()
Description copied from interface:TreeView
Returns a boolean value that indicates whether a criteria has been set other than iframe request which decides whether the entire tree should be rendered or just the request node- Specified by:
getRenderEntireTreeIframeReqNotWithstanding
in interfaceTreeView
-
addScriptDependency
public void addScriptDependency(java.lang.String filename, java.lang.String loadCondition)
Description copied from interface:TreeView
This method adds a script dependency for a bone. Registration of a bone with a script dependency will be held until all script file dependencies have been resolved (loaded). If the user does not specify any script dependency the application will use "mstrTreeViewImpl.js" as the default JavaScript file name and "mstrTreeViewImplScript" the as the default load condition.- Specified by:
addScriptDependency
in interfaceTreeView
- Parameters:
filename
- String the name of the script fileloadCondition
- String a JavaScript string that when evaluated (using the eval function) will return true when the file is loaded.
-
getJSONGenerator
public JsonGenerator getJSONGenerator()
Description copied from interface:TreeView
This allows the user to retrieve the JSONGenerator object on which attribute-value pairs can be set These attribute-value pairs translate to properties on the tree bone tree bone- Specified by:
getJSONGenerator
in interfaceTreeView
-
-