Skip navigation links


com.essbase.eas.essbase.ui.outline
Class OutlineTreeNode

java.lang.Object
  extended by com.essbase.eas.essbase.ui.outline.OutlineTreeNode

All Implemented Interfaces:
MemberListener, OutlineTreeNodePainter, java.io.Serializable, java.util.EventListener, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Direct Known Subclasses:
DefaultOutlineMutableTreeNode, OutlineTreeRootNode

public class OutlineTreeNode
extends java.lang.Object
implements MemberListener, javax.swing.tree.MutableTreeNode, OutlineTreeNodePainter, java.io.Serializable

implements a specialized mutable tree node for the outline viewer and editor.

Since:
6.5.1
Version:
7.1.0
Author:
Hank Cox
See Also:
Serialized Form

Field Summary
protected  java.util.TreeMap accessFiles
          member access file containing the children of this member
protected  boolean allowsChildren
          true if the node is able to have children
protected  int childIndex
          indicates the child index, position of the node as a child
protected  java.util.ArrayList childNodes
          contains the child nodes that have been instantiated
protected  java.lang.String editText
           
static java.util.Enumeration EMPTY_ENUMERATION
          An enumeration that is always empty.
protected  int insertionIndex
          indicates the index position of the insertion node
protected  OutlineTreeNode insertionNode
          indicates that we are interactively adding children to this node
protected  boolean isExpanded
          indicates whether this node is expanded or not
protected static java.lang.Object loaded
           
protected  boolean modified
          indicates that the member underlying this node object has been modified
protected  boolean onScreen
          indicates whether this object is being used in a "viewable" control
protected  javax.swing.tree.MutableTreeNode parent
          this node's parent, or null if this node has no parent
protected  java.util.ArrayList pieces
           
protected static java.lang.Object unloaded
           
protected  java.lang.Object userObject
          optional user object
protected  java.util.ArrayList windowsLoaded
           

 

Constructor Summary
OutlineTreeNode()
           
OutlineTreeNode(java.lang.Object userObject, boolean allowsChildren, boolean onScreen, int index)
           
OutlineTreeNode(java.lang.Object userObject, boolean allowsChildren, int index)
           
OutlineTreeNode(java.lang.Object userObject, int index)
           

 

Method Summary
 void add(OutlineTreeNode newChild)
           
 void alternateHierarchySettingChanged(MemberEvent e)
           
 void beginInsertionPhase(OutlineTreeNode node, int index)
           
 void buildDisplayString(Representation representation, ViewerOptions opts)
           
 void buildDisplayString(Representation representation, ViewerOptions opts, boolean force)
           
 void childCountChanged(MemberEvent e)
           
 java.util.Enumeration children()
           
 void childrenSorted(MemberEvent e)
           
 void commentChanged(MemberEvent e)
           
 void compressionDimensionChanged(MemberEvent e)
           
 void consolidationChanged(MemberEvent e)
           
 void currencyConversionChanged(MemberEvent e)
           
 void currencyMemberChanged(MemberEvent e)
           
 java.util.Enumeration depthFirstEnumeration()
           
 void dimensionCategoryChanged(MemberEvent e)
           
 void dimensionSolveOrderChanged(MemberEvent e)
           
 void dimensionStorageChanged(MemberEvent e)
           
 boolean doChildNodesExist()
           
 void endInsertionPhase()
           
 void expenseChanged(MemberEvent e)
           
 void flowMetricChanged(MemberEvent e)
           
 void formulaChanged(MemberEvent e)
           
 void generationChanged(MemberEvent e)
           
 void genericEvent(MemberEvent e)
           
protected  void genericMemberEventResponse(MemberEvent e)
           
 MemberAccessFile getAccessFileFor(int childIndex)
           
 java.util.TreeMap getAccessFiles()
           
 OutlineTreeNode[] getActualizedChildren()
          returns the child nodes that have been actualized.
 void getActualizedDescendants(java.util.Collection results)
          returns the descendant nodes that have been actualized; this can be used to perform cleanup without the risk of creating new nodes and new member objects that calling getChildCount() and getChildAt() would pose.
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAfter(OutlineTreeNode aChild)
           
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 OutlineTreeNode getChildBefore(OutlineTreeNode aChild)
           
 int getChildCount()
           
 int getChildIndex()
           
 int getChildIndexFor(long handle)
           
 OutlineTreeNode getDefaultOutlineMutableTreeNode()
           
 OutlineTreeNode getDimensionNode()
           
 java.lang.String getDisplayString()
           
 OutlineTreeNode getFirstChild()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 int getInsertionIndex()
           
 java.lang.String getLastEditText()
           
 int getLevel()
           
 OutlineTreeNode getNextSibling()
           
 java.lang.Object[] getPaintingPieces()
           
 javax.swing.tree.TreeNode getParent()
           
 OutlineTreeNode[] getPath()
          Returns the path from the root, to get to this node.
protected  OutlineTreeNode[] getPathToRoot(OutlineTreeNode aNode, int depth)
          Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
 OutlineTreeNode getPreviousSibling()
           
 OutlineTreeNode getRoot()
          Returns the root of the tree that contains this node.
 java.lang.Object getRootAs(java.lang.Class c)
           
 java.lang.Object getUserObject()
           
 Member getUserObjectAsMember()
           
 void hierarchyTypeChanged(MemberEvent e)
           
 void hybridAnalysisDescendantChanged(MemberEvent e)
           
 void hybridAnalysisSettingChanged(MemberEvent e)
           
 void initChildNodes()
           
 void initChildNodes(int length)
           
 void insert(java.util.Collection c, int beginningIndex)
          inserts multiple items to the end of this nodes set of children.
 void insert(javax.swing.tree.MutableTreeNode newChild, int childIndex)
           
 boolean isCutCopyMember()
           
 boolean isExpanded()
           
 boolean isLeaf()
           
 boolean isModified()
           
 boolean isNodeAncestor(OutlineTreeNode anotherNode)
           
 boolean isNodeChild(OutlineTreeNode aNode)
           
 boolean isNodeDescendant(OutlineTreeNode anotherNode)
           
 boolean isNodeSibling(OutlineTreeNode anotherNode)
           
 boolean isOnScreen()
           
 void levelChanged(MemberEvent e)
           
 void levelWeightChanged(MemberEvent e)
           
 void memberAliasAll(MemberAliasEvent e)
           
 void memberAliasChanged(MemberAliasEvent e)
           
 void memberAliasRemoved(MemberAliasEvent e)
           
 void memberAliasSet(MemberAliasEvent e)
           
 void memberAttributeAll(MemberAttributeEvent e)
           
 void memberAttributeChanged(MemberAttributeEvent e)
           
 void memberAttributeCreated(MemberAttributeEvent e)
           
 void memberAttributeRemoved(MemberAttributeEvent e)
           
 void memberRenamed(MemberEvent e)
           
 void memberSolveOrderChanged(MemberEvent e)
           
 void memberUDACreated(MemberUDAEvent e)
           
 void memberUDARemoved(MemberUDAEvent e)
           
 void memberUDASet(MemberUDAEvent e)
           
 java.util.Enumeration postorderEnumeration()
           
 void propertiesUpdated(MemberEvent e)
           
 void release()
           
 void releaseChildNodes()
           
 void releaseNode()
           
 void remove(int childIndex)
           
 void remove(javax.swing.tree.MutableTreeNode node)
           
 void removeAllChildren()
          Removes all of this node's children, setting their parents to null.
 void removeFromParent()
           
 void resetFromParent()
           
 void setAccessFile(int startIndex, MemberAccessFile value)
           
 void setAllowsChildren(boolean allows)
          Determines whether or not this node is allowed to have children.
 void setChildIndex(int index)
           
 void setChildren(javax.swing.tree.MutableTreeNode[] children)
           
 void setExpanded(boolean expanded)
           
 void setLastEditText(java.lang.String text)
           
 void setParent(javax.swing.tree.MutableTreeNode newParent)
           
 void setUserObject(java.lang.Object userObject)
           
 void shareChanged(MemberEvent e)
           
protected  void simpleMemberEventResponse(MemberEvent e)
           
 void syncChildren(javax.swing.tree.MutableTreeNode[] children)
           
 void timeBalanceChanged(MemberEvent e)
           
 void timeBalanceSkipChanged(MemberEvent e)
           
 java.lang.String toString()
           
 void twopassCalculationChanged(MemberEvent e)
           
 int[] updateChildNodesAfterSorting(ViewerOptions vopts)
           
 void updateChildOrder(long[] handles)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

parent

protected javax.swing.tree.MutableTreeNode parent
this node's parent, or null if this node has no parent

onScreen

protected boolean onScreen
indicates whether this object is being used in a "viewable" control

isExpanded

protected boolean isExpanded
indicates whether this node is expanded or not

userObject

protected transient java.lang.Object userObject
optional user object

allowsChildren

protected boolean allowsChildren
true if the node is able to have children

pieces

protected java.util.ArrayList pieces

editText

protected java.lang.String editText

accessFiles

protected java.util.TreeMap accessFiles
member access file containing the children of this member

childNodes

protected java.util.ArrayList childNodes
contains the child nodes that have been instantiated

modified

protected boolean modified
indicates that the member underlying this node object has been modified

insertionNode

protected OutlineTreeNode insertionNode
indicates that we are interactively adding children to this node

insertionIndex

protected int insertionIndex
indicates the index position of the insertion node

childIndex

protected int childIndex
indicates the child index, position of the node as a child

unloaded

protected static java.lang.Object unloaded

loaded

protected static java.lang.Object loaded

windowsLoaded

protected java.util.ArrayList windowsLoaded

EMPTY_ENUMERATION

public static final java.util.Enumeration EMPTY_ENUMERATION
An enumeration that is always empty. This is used when an enumeration of a leaf node's children is requested.

Constructor Detail

OutlineTreeNode

public OutlineTreeNode()

OutlineTreeNode

public OutlineTreeNode(java.lang.Object userObject,
                       int index)

OutlineTreeNode

public OutlineTreeNode(java.lang.Object userObject,
                       boolean allowsChildren,
                       int index)

OutlineTreeNode

public OutlineTreeNode(java.lang.Object userObject,
                       boolean allowsChildren,
                       boolean onScreen,
                       int index)

Method Detail

setChildIndex

public void setChildIndex(int index)

getChildIndex

public int getChildIndex()

buildDisplayString

public void buildDisplayString(Representation representation,
                               ViewerOptions opts,
                               boolean force)

buildDisplayString

public void buildDisplayString(Representation representation,
                               ViewerOptions opts)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPaintingPieces

public java.lang.Object[] getPaintingPieces()
Specified by:
getPaintingPieces in interface OutlineTreeNodePainter

isCutCopyMember

public boolean isCutCopyMember()
Specified by:
isCutCopyMember in interface OutlineTreeNodePainter

getDimensionNode

public OutlineTreeNode getDimensionNode()

getRootAs

public java.lang.Object getRootAs(java.lang.Class c)

getAccessFiles

public java.util.TreeMap getAccessFiles()

getAccessFileFor

public MemberAccessFile getAccessFileFor(int childIndex)

setAccessFile

public void setAccessFile(int startIndex,
                          MemberAccessFile value)

isExpanded

public boolean isExpanded()

setExpanded

public void setExpanded(boolean expanded)

isModified

public boolean isModified()

isOnScreen

public boolean isOnScreen()

getUserObject

public java.lang.Object getUserObject()

getUserObjectAsMember

public Member getUserObjectAsMember()

setUserObject

public void setUserObject(java.lang.Object userObject)
Specified by:
setUserObject in interface javax.swing.tree.MutableTreeNode

simpleMemberEventResponse

protected void simpleMemberEventResponse(MemberEvent e)

genericMemberEventResponse

protected void genericMemberEventResponse(MemberEvent e)

childrenSorted

public void childrenSorted(MemberEvent e)
Specified by:
childrenSorted in interface MemberListener

childCountChanged

public void childCountChanged(MemberEvent e)
Specified by:
childCountChanged in interface MemberListener

release

public void release()

releaseChildNodes

public void releaseChildNodes()

doChildNodesExist

public boolean doChildNodesExist()

initChildNodes

public void initChildNodes()

initChildNodes

public void initChildNodes(int length)

setLastEditText

public void setLastEditText(java.lang.String text)

getLastEditText

public java.lang.String getLastEditText()

commentChanged

public void commentChanged(MemberEvent e)
Specified by:
commentChanged in interface MemberListener

consolidationChanged

public void consolidationChanged(MemberEvent e)
Specified by:
consolidationChanged in interface MemberListener

currencyConversionChanged

public void currencyConversionChanged(MemberEvent e)
Specified by:
currencyConversionChanged in interface MemberListener

currencyMemberChanged

public void currencyMemberChanged(MemberEvent e)
Specified by:
currencyMemberChanged in interface MemberListener

dimensionCategoryChanged

public void dimensionCategoryChanged(MemberEvent e)
Specified by:
dimensionCategoryChanged in interface MemberListener

dimensionStorageChanged

public void dimensionStorageChanged(MemberEvent e)
Specified by:
dimensionStorageChanged in interface MemberListener

expenseChanged

public void expenseChanged(MemberEvent e)
Specified by:
expenseChanged in interface MemberListener

formulaChanged

public void formulaChanged(MemberEvent e)
Specified by:
formulaChanged in interface MemberListener

generationChanged

public void generationChanged(MemberEvent e)
Specified by:
generationChanged in interface MemberListener

genericEvent

public void genericEvent(MemberEvent e)
Specified by:
genericEvent in interface MemberListener

twopassCalculationChanged

public void twopassCalculationChanged(MemberEvent e)
Specified by:
twopassCalculationChanged in interface MemberListener

hybridAnalysisSettingChanged

public void hybridAnalysisSettingChanged(MemberEvent e)
Specified by:
hybridAnalysisSettingChanged in interface MemberListener

hybridAnalysisDescendantChanged

public void hybridAnalysisDescendantChanged(MemberEvent e)
Specified by:
hybridAnalysisDescendantChanged in interface MemberListener

levelChanged

public void levelChanged(MemberEvent e)
Specified by:
levelChanged in interface MemberListener

memberAliasChanged

public void memberAliasChanged(MemberAliasEvent e)
Specified by:
memberAliasChanged in interface MemberListener

memberAliasSet

public void memberAliasSet(MemberAliasEvent e)
Specified by:
memberAliasSet in interface MemberListener

memberAliasRemoved

public void memberAliasRemoved(MemberAliasEvent e)
Specified by:
memberAliasRemoved in interface MemberListener

memberAliasAll

public void memberAliasAll(MemberAliasEvent e)
Specified by:
memberAliasAll in interface MemberListener

memberAttributeCreated

public void memberAttributeCreated(MemberAttributeEvent e)
Specified by:
memberAttributeCreated in interface MemberListener

memberAttributeRemoved

public void memberAttributeRemoved(MemberAttributeEvent e)
Specified by:
memberAttributeRemoved in interface MemberListener

memberAttributeChanged

public void memberAttributeChanged(MemberAttributeEvent e)
Specified by:
memberAttributeChanged in interface MemberListener

memberAttributeAll

public void memberAttributeAll(MemberAttributeEvent e)
Specified by:
memberAttributeAll in interface MemberListener

memberRenamed

public void memberRenamed(MemberEvent e)
Specified by:
memberRenamed in interface MemberListener

memberUDASet

public void memberUDASet(MemberUDAEvent e)
Specified by:
memberUDASet in interface MemberListener

memberUDACreated

public void memberUDACreated(MemberUDAEvent e)
Specified by:
memberUDACreated in interface MemberListener

memberUDARemoved

public void memberUDARemoved(MemberUDAEvent e)
Specified by:
memberUDARemoved in interface MemberListener

shareChanged

public void shareChanged(MemberEvent e)
Specified by:
shareChanged in interface MemberListener

timeBalanceChanged

public void timeBalanceChanged(MemberEvent e)
Specified by:
timeBalanceChanged in interface MemberListener

timeBalanceSkipChanged

public void timeBalanceSkipChanged(MemberEvent e)
Specified by:
timeBalanceSkipChanged in interface MemberListener

propertiesUpdated

public void propertiesUpdated(MemberEvent e)
Specified by:
propertiesUpdated in interface MemberListener

hierarchyTypeChanged

public void hierarchyTypeChanged(MemberEvent e)
Specified by:
hierarchyTypeChanged in interface MemberListener

memberSolveOrderChanged

public void memberSolveOrderChanged(MemberEvent e)
Specified by:
memberSolveOrderChanged in interface MemberListener

dimensionSolveOrderChanged

public void dimensionSolveOrderChanged(MemberEvent e)
Specified by:
dimensionSolveOrderChanged in interface MemberListener

alternateHierarchySettingChanged

public void alternateHierarchySettingChanged(MemberEvent e)
Specified by:
alternateHierarchySettingChanged in interface MemberListener

levelWeightChanged

public void levelWeightChanged(MemberEvent e)
Specified by:
levelWeightChanged in interface MemberListener

flowMetricChanged

public void flowMetricChanged(MemberEvent e)
Specified by:
flowMetricChanged in interface MemberListener

compressionDimensionChanged

public void compressionDimensionChanged(MemberEvent e)
Specified by:
compressionDimensionChanged in interface MemberListener

insert

public void insert(java.util.Collection c,
                   int beginningIndex)
inserts multiple items to the end of this nodes set of children. Every item in the collection must be of the type OutlineTreeNode.

insert

public void insert(javax.swing.tree.MutableTreeNode newChild,
                   int childIndex)
Specified by:
insert in interface javax.swing.tree.MutableTreeNode

setChildren

public void setChildren(javax.swing.tree.MutableTreeNode[] children)

remove

public void remove(int childIndex)
Specified by:
remove in interface javax.swing.tree.MutableTreeNode

remove

public void remove(javax.swing.tree.MutableTreeNode node)
Specified by:
remove in interface javax.swing.tree.MutableTreeNode

removeFromParent

public void removeFromParent()
Specified by:
removeFromParent in interface javax.swing.tree.MutableTreeNode

resetFromParent

public void resetFromParent()

setParent

public void setParent(javax.swing.tree.MutableTreeNode newParent)
Specified by:
setParent in interface javax.swing.tree.MutableTreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode

children

public java.util.Enumeration children()
Specified by:
children in interface javax.swing.tree.TreeNode

setAllowsChildren

public void setAllowsChildren(boolean allows)
Determines whether or not this node is allowed to have children. If allows is false, all of this node's children are removed.

Note: By default, a node allows children.

Parameters:
allows - true if this node is allowed to have children

getPath

public OutlineTreeNode[] getPath()
Returns the path from the root, to get to this node. The last element in the path is this node.
Returns:
an array of OutlineTreeNode objects giving the path, where the first element in the path is the root and the last element is this node.

getPathToRoot

protected OutlineTreeNode[] getPathToRoot(OutlineTreeNode aNode,
                                          int depth)
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array. The length of the returned array gives the node's depth in the tree.
Parameters:
aNode - the TreeNode to get the path for
depth - an int giving the number of steps already taken towards the root (on recursive calls), used to size the returned array
Returns:
an array of OutlineTreeNodes giving the path from the root to the specified node

getRoot

public OutlineTreeNode getRoot()
Returns the root of the tree that contains this node. The root is the ancestor with a null parent.
Returns:
the root of the tree that contains this node
See Also:
isNodeAncestor(com.essbase.eas.essbase.ui.outline.OutlineTreeNode)

beginInsertionPhase

public void beginInsertionPhase(OutlineTreeNode node,
                                int index)

endInsertionPhase

public void endInsertionPhase()

add

public void add(OutlineTreeNode newChild)

removeAllChildren

public void removeAllChildren()
Removes all of this node's children, setting their parents to null. If this node has no children, this method does nothing.

isNodeAncestor

public boolean isNodeAncestor(OutlineTreeNode anotherNode)

isNodeChild

public boolean isNodeChild(OutlineTreeNode aNode)

getChildAfter

public javax.swing.tree.TreeNode getChildAfter(OutlineTreeNode aChild)

getChildBefore

public OutlineTreeNode getChildBefore(OutlineTreeNode aChild)

getFirstChild

public OutlineTreeNode getFirstChild()

getNextSibling

public OutlineTreeNode getNextSibling()

getPreviousSibling

public OutlineTreeNode getPreviousSibling()

isNodeDescendant

public boolean isNodeDescendant(OutlineTreeNode anotherNode)

isNodeSibling

public boolean isNodeSibling(OutlineTreeNode anotherNode)

postorderEnumeration

public java.util.Enumeration postorderEnumeration()

depthFirstEnumeration

public java.util.Enumeration depthFirstEnumeration()

getLevel

public int getLevel()

getActualizedDescendants

public void getActualizedDescendants(java.util.Collection results)
returns the descendant nodes that have been actualized; this can be used to perform cleanup without the risk of creating new nodes and new member objects that calling getChildCount() and getChildAt() would pose.
Parameters:
results - - collection to put all the descendant nodes into.

getActualizedChildren

public OutlineTreeNode[] getActualizedChildren()
returns the child nodes that have been actualized.

getDisplayString

public java.lang.String getDisplayString()

getInsertionIndex

public int getInsertionIndex()

updateChildNodesAfterSorting

public int[] updateChildNodesAfterSorting(ViewerOptions vopts)

updateChildOrder

public void updateChildOrder(long[] handles)

syncChildren

public void syncChildren(javax.swing.tree.MutableTreeNode[] children)

getChildIndexFor

public int getChildIndexFor(long handle)

releaseNode

public void releaseNode()

getDefaultOutlineMutableTreeNode

public OutlineTreeNode getDefaultOutlineMutableTreeNode()

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.