|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
com.essbase.eas.ui.ctree.CTreeNode
public abstract class CTreeNode
Extends the DefaultMutableTreeNode class to implement some specific features that we need to support in the OLAP console. Notes:
12/18/2000, hcox: Implementation of DropTargetListener added. CTreeNode objects override individual methods when needed. CTreeNode objects should never register themselves as drop targets. We implement the interface in order to provide logically named methods that the containing CTree object can call. 05/19/2003, hcox: Added new willExpand() methodology.
Field Summary | |
---|---|
protected java.awt.Component[] |
actionMenuItems |
protected boolean |
allChildrenRemoved |
protected java.lang.String |
caption |
protected java.awt.Component[] |
contextMenuItems |
protected boolean |
customViewEnabled |
protected boolean |
customViewNode |
protected boolean |
draggable |
static CTreeNode[] |
EMPTY_NODES |
protected boolean |
expanded |
protected java.util.List |
flavors |
protected javax.swing.Icon |
icon |
protected boolean |
notifyChildRemoval |
protected int |
startSortIndex |
protected java.lang.String |
toolTipText |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
---|---|
protected |
CTreeNode() |
protected |
CTreeNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption) |
protected |
CTreeNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption, javax.swing.Icon image) |
protected |
CTreeNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption, java.lang.String image) |
Method Summary | |
---|---|
void |
add(javax.swing.tree.MutableTreeNode newChild) |
protected void |
addNodeAndNotify(CTreeNode node) adds a single node as a child of this node, determines its index, and notifies the model that a child was inserted. |
void |
addNodeAndNotify(java.lang.Object obj) |
protected void |
addNodesAndNotify(CTreeNode[] nodes) adds multiple nodes as children of this node. |
void |
addNodesSortedAndNotify(CTreeNode[] nodes) |
void |
addNodesSortedAndNotify(CTreeNode[] nodes, boolean nodesAreSorted) |
void |
addSortedChild(CTreeNode newChild) adds a child node and ensures it is in a correctly sorted position. |
boolean |
areChildrenCollated() |
protected void |
broadcastNodeChanged() broadcasts a nodeChanged() to the model. |
boolean |
changeNodeIndex(CTreeNode node, int newIndex) |
java.lang.Object |
clone() |
protected void |
dispose() resets the references to null for gc |
void |
dragEnter(java.awt.dnd.DropTargetDragEvent dtde) implementation of the DropTargetListener.dragEnter() method. |
void |
dragExit(java.awt.dnd.DropTargetEvent dte) implementation of the DropTargetListener.dragExit() method. |
void |
dragOver(java.awt.dnd.DropTargetDragEvent dtde) implementation of the DropTargetListener.dragOver() method. |
void |
drop(java.awt.dnd.DropTargetDropEvent dtde) implementation of the DropTargetListener.drop() method. |
void |
dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde) implementation of the DropTargetListener.dropActionChanged() method. |
java.awt.Component[] |
getActionMenuItems() returns the items that this object needs placed on the console's action menu. |
boolean |
getAllChildrenRemoved() |
java.lang.String |
getCaption() |
CTreeNode |
getChildForUserObject(java.lang.Object value) returns the child node that has the associated user object. |
protected CTreeNode[] |
getChildrenAsArray() |
protected java.lang.Object[] |
getChildUserObjects() gets an array of the user objects for this nodes children. |
protected java.util.List |
getChildUserObjectsAsList() gets a list of the user objects for this nodes children. |
java.lang.String |
getContextCaption() |
java.lang.String[][] |
getContextInformation() returns an array of strings containing the context information for this tree node. |
java.awt.Component[] |
getContextMenuItems() |
boolean |
getCustomViewEnabled() |
boolean |
getCustomViewNode() |
boolean |
getDraggable() returns whether or not this node can be dragged to a new location. |
boolean |
getExpandedState() This may not be the actual state of the node. |
javax.swing.Icon |
getIcon() |
boolean |
getNotifyRemoveChildren() |
java.lang.Object[] |
getPrintableObjects() returns the printable string |
int |
getSortedChildIndex(CTreeNode newChild) returns -1 for end of the list |
protected int |
getStartSortIndex() |
java.lang.String |
getToolTipText() |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor) implementation of the Transferable.getTransferData() method. |
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors() implementation of the Transferable.getTransferDataFlavors() method. |
java.awt.Component |
getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) retrieves the tree cell renderer for this object. |
CTreeModel |
getTreeModel() |
protected java.lang.Object |
getUserObjectAs(java.lang.Class c) gets the user object as a member of a specific class. |
void |
handleDelete() |
void |
handleDoubleClick() used to handle a double click event; the default implementation is to do nothing. |
boolean |
handleExpand(java.util.List candidates) method that should be overridden by all derived classes in order to add children to the node. |
protected void |
initFlavors() initializes the flavors supported by this object. |
void |
insertNodeAndNotify(CTreeNode node, int index) adds a single node as a child of this node, determines its index, and notifies the model that a child was inserted. |
protected void |
installListeners() |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor) implementation of the Transferable.isDataFlavorSupported() method. |
void |
localizeMenuItems(java.awt.Component[] items, java.util.ResourceBundle r) |
void |
nodeRemoved() |
void |
personalizeMenuItems(java.awt.Component[] items, boolean ellipsis) |
void |
personalizeMenuItems(java.awt.Component[] items, boolean[] ellipsis) |
void |
personalizeMenuItems(java.awt.Component item, boolean ellips) |
void |
personalizeMenuItems(java.awt.Component item, boolean ellips, java.lang.String suffix) |
void |
remove(int childIndex) |
void |
removeChildrenNodeAndNotify(boolean propogate) removes all children node and notifies the model about the event. |
void |
removeNodeAndNotify(CTreeNode node) removes all children node and notifies the model about the event. |
void |
removeNodeAndNotify(CTreeNode node, boolean propogate) removes a child node and notifies the model about the event. |
void |
removeNodeAndNotify(java.lang.Object obj) removes a child node for a userObject and notifies the model about the event. |
void |
setAllChildrenRemoved(boolean value) |
void |
setCaption(java.lang.String value) |
boolean |
setContextInformation(java.lang.String[][] info) receives an array of strings containing the context information for this tree node. |
void |
setCustomViewEnabled(boolean value) |
void |
setCustomViewNode(boolean value) |
void |
setExpandedState(boolean state) This is not to set the expanded state of the node on the UI. |
void |
setIcon() |
protected void |
setIcon(javax.swing.Icon value) |
void |
setIcon(java.lang.String image) |
void |
setNotifyRemoveChildren() |
void |
setNotifyRemoveChildren(boolean notify) |
protected void |
setSortingIndex(int index) |
void |
setToolTipText(java.lang.String toolTipText) |
void |
setUserObject(java.lang.Object parm1) |
CTreeNode[] |
sortNodes(CTreeNode[] nodes) |
java.lang.String |
toString() |
boolean |
updateChildOrder(CTreeNode node) Updates the node order for the child node. |
protected void |
updateChildrenToMatch(java.lang.Object[] candidates, java.lang.Class c) synchronizes an array of objects with the current set of child nodes. |
protected void |
updateChildrenToMatch(java.lang.Object[] candidates, java.lang.Class c, boolean sorted) |
void |
updateNode() |
void |
willExpand() |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String caption
protected javax.swing.Icon icon
protected java.awt.Component[] contextMenuItems
protected java.awt.Component[] actionMenuItems
protected boolean customViewEnabled
protected boolean customViewNode
protected boolean draggable
protected java.util.List flavors
protected boolean allChildrenRemoved
protected boolean expanded
protected boolean notifyChildRemoval
protected int startSortIndex
protected java.lang.String toolTipText
public static CTreeNode[] EMPTY_NODES
Constructor Detail |
---|
protected CTreeNode()
protected CTreeNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption)
protected CTreeNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption, java.lang.String image)
protected CTreeNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption, javax.swing.Icon image)
Method Detail |
---|
public void setIcon(java.lang.String image)
public void setIcon()
public void setToolTipText(java.lang.String toolTipText)
public java.lang.String getToolTipText()
public void willExpand()
public java.awt.Component[] getActionMenuItems()
public java.awt.Component[] getContextMenuItems()
public java.lang.String[][] getContextInformation()
public boolean setContextInformation(java.lang.String[][] info)
public void personalizeMenuItems(java.awt.Component[] items, boolean[] ellipsis)
public void personalizeMenuItems(java.awt.Component[] items, boolean ellipsis)
public void personalizeMenuItems(java.awt.Component item, boolean ellips)
public void personalizeMenuItems(java.awt.Component item, boolean ellips, java.lang.String suffix)
public void localizeMenuItems(java.awt.Component[] items, java.util.ResourceBundle r)
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
public java.lang.String getContextCaption()
public javax.swing.Icon getIcon()
protected void setIcon(javax.swing.Icon value)
public java.lang.String getCaption()
public void setCaption(java.lang.String value)
public CTreeNode getChildForUserObject(java.lang.Object value)
public void setCustomViewEnabled(boolean value)
public boolean getCustomViewEnabled()
public void setCustomViewNode(boolean value)
public boolean getCustomViewNode()
public boolean getDraggable()
public boolean getAllChildrenRemoved()
public void setAllChildrenRemoved(boolean value)
public java.lang.Object clone()
clone
in class javax.swing.tree.DefaultMutableTreeNode
public void handleDoubleClick()
public void handleDelete()
public boolean handleExpand(java.util.List candidates)
protected void installListeners()
public void setUserObject(java.lang.Object parm1)
setUserObject
in interface javax.swing.tree.MutableTreeNode
setUserObject
in class javax.swing.tree.DefaultMutableTreeNode
protected void initFlavors()
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface java.awt.datatransfer.Transferable
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
dragEnter
in interface java.awt.dnd.DropTargetListener
public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
dragOver
in interface java.awt.dnd.DropTargetListener
public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
dropActionChanged
in interface java.awt.dnd.DropTargetListener
public void dragExit(java.awt.dnd.DropTargetEvent dte)
dragExit
in interface java.awt.dnd.DropTargetListener
public void drop(java.awt.dnd.DropTargetDropEvent dtde)
drop
in interface java.awt.dnd.DropTargetListener
public void addSortedChild(CTreeNode newChild)
public boolean areChildrenCollated()
protected void broadcastNodeChanged()
protected void addNodesAndNotify(CTreeNode[] nodes)
node
- CTreeNode to addprotected void addNodeAndNotify(CTreeNode node)
public void insertNodeAndNotify(CTreeNode node, int index)
public void add(javax.swing.tree.MutableTreeNode newChild)
add
in class javax.swing.tree.DefaultMutableTreeNode
public void addNodeAndNotify(java.lang.Object obj)
public void removeNodeAndNotify(CTreeNode node, boolean propogate)
public void removeNodeAndNotify(CTreeNode node)
public void removeNodeAndNotify(java.lang.Object obj)
public void removeChildrenNodeAndNotify(boolean propogate)
protected CTreeNode[] getChildrenAsArray()
protected java.lang.Object[] getChildUserObjects()
protected java.util.List getChildUserObjectsAsList()
protected java.lang.Object getUserObjectAs(java.lang.Class c)
protected void updateChildrenToMatch(java.lang.Object[] candidates, java.lang.Class c)
protected void updateChildrenToMatch(java.lang.Object[] candidates, java.lang.Class c, boolean sorted)
public java.lang.Object[] getPrintableObjects()
public CTreeModel getTreeModel()
public void remove(int childIndex)
remove
in interface javax.swing.tree.MutableTreeNode
remove
in class javax.swing.tree.DefaultMutableTreeNode
public void nodeRemoved()
public void setNotifyRemoveChildren()
public void setNotifyRemoveChildren(boolean notify)
public boolean getNotifyRemoveChildren()
public boolean changeNodeIndex(CTreeNode node, int newIndex)
public boolean updateChildOrder(CTreeNode node)
public boolean getExpandedState()
public void setExpandedState(boolean state)
public int getSortedChildIndex(CTreeNode newChild)
public CTreeNode[] sortNodes(CTreeNode[] nodes)
public void addNodesSortedAndNotify(CTreeNode[] nodes)
public void addNodesSortedAndNotify(CTreeNode[] nodes, boolean nodesAreSorted)
public void updateNode()
protected void setSortingIndex(int index)
protected int getStartSortIndex()
protected void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |