Skip navigation links


com.essbase.eas.ui.ptree
Class PTreeCheckBoxNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by com.essbase.eas.ui.ptree.PTreeNode
          extended by com.essbase.eas.ui.ptree.PTreeCheckBoxNode

All Implemented Interfaces:
PrintableObject, java.awt.event.ActionListener, java.awt.event.ItemListener, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.event.DocumentListener, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Direct Known Subclasses:
ApplicationTreeNode, WizardTreeCheckBoxNode

public class PTreeCheckBoxNode
extends PTreeNode

Extends the DefaultMutableTreeNode class to implement some specific features that we need to support in the OLAP console properties. Notes:

10/13/2000, nvarma:

Version:
1.00, 10/13/2000
Author:
Namita Varma
See Also:
Serialized Form

Field Summary
protected  javax.swing.JCheckBox checkBox
           
protected  boolean expanded
           
protected  boolean nodeSelected
           
protected  int nodeTag
           
protected  boolean updatePeer
           

 

Fields inherited from class com.essbase.eas.ui.ptree.PTreeNode
bundle, cancelAction, caption, editable, editValue, enabled, enableRemoval, enterAction, icon, keyAdapter, nodeObject, tipText

 

Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject

 

Constructor Summary
PTreeCheckBoxNode()
           
PTreeCheckBoxNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption)
           
PTreeCheckBoxNode(java.lang.Object userObject, java.lang.String caption, boolean allowsChildren)
           
PTreeCheckBoxNode(java.lang.Object userObject, java.lang.String caption, boolean allowsChildren, int nTag, javax.swing.Icon icon)
           
PTreeCheckBoxNode(java.lang.Object userObject, java.lang.String caption, boolean allowsChildren, java.lang.Object nodeObject)
           

 

Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void cancelEditing()
           
protected  javax.swing.JCheckBox createCheckBox()
           
 int drawObject(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int posX, int posY, int height)
          Draws the object at the x and y.
 void editNode(PTree tree)
           
 void endEditing()
           
 javax.swing.JCheckBox getCheckBox()
           
 boolean getCheckBoxState()
           
 java.lang.Object getEditingValue()
           
 int getHeight(java.awt.print.PageFormat pageFormat, java.awt.Font font)
          Returns the height of the object with the font
 java.lang.Object[] getPrintableObjects()
           
 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.
 void installListeners()
           
 boolean isSelected()
           
 void nodeRemoved()
           
 void setCheckBoxState(boolean bool)
           
 void setSelected(boolean selected)
           
 void setUpdatePeer(boolean update)
           
 void uninstallListeners()
           
protected  void updatePeerCheckBoxState()
           
 void willExpand()
           

 

Methods inherited from class com.essbase.eas.ui.ptree.PTreeNode
addAction, addAndNotify, addNodesAndNotify, addSortedChild, addSortedChild, changedUpdate, clone, drawText, drawText, drawText, drawText, getCaption, getChildForUserObject, getContextMenuItems, getEditText, getIcon, getLabel, getNodeObject, getToolTipText, getTree, getWidth, handleClick, handleDoubleClick, handleRightClick, insertUpdate, installListeners, isEditable, isEnabled, itemStateChanged, nodeChanged, paintCheckIcon, paintIcon, paintRadioIcon, propertyChange, remove, removeAction, removeAllChildren, removeAndNotify, removeUpdate, setCaption, setChildrenEnabled, setDescendantsEnabled, setEditable, setEditingValue, setEnabled, setEnableRemoval, setIcon, setNodeObject, setTipText, setTree, setUserObject, toString, uninstallListeners

 

Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, 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, removeFromParent, setAllowsChildren, setParent

 

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

 

Field Detail

nodeTag

protected int nodeTag

checkBox

protected javax.swing.JCheckBox checkBox

nodeSelected

protected boolean nodeSelected

expanded

protected boolean expanded

updatePeer

protected boolean updatePeer

Constructor Detail

PTreeCheckBoxNode

public PTreeCheckBoxNode()

PTreeCheckBoxNode

public PTreeCheckBoxNode(java.lang.Object userObject,
                         boolean allowsChildren,
                         java.lang.String caption)

PTreeCheckBoxNode

public PTreeCheckBoxNode(java.lang.Object userObject,
                         java.lang.String caption,
                         boolean allowsChildren)

PTreeCheckBoxNode

public PTreeCheckBoxNode(java.lang.Object userObject,
                         java.lang.String caption,
                         boolean allowsChildren,
                         java.lang.Object nodeObject)

PTreeCheckBoxNode

public PTreeCheckBoxNode(java.lang.Object userObject,
                         java.lang.String caption,
                         boolean allowsChildren,
                         int nTag,
                         javax.swing.Icon icon)

Method Detail

installListeners

public void installListeners()
Overrides:
installListeners in class PTreeNode

uninstallListeners

public void uninstallListeners()
Overrides:
uninstallListeners in class PTreeNode

setCheckBoxState

public void setCheckBoxState(boolean bool)

isSelected

public boolean isSelected()

setSelected

public void setSelected(boolean selected)

getCheckBoxState

public boolean getCheckBoxState()

willExpand

public void willExpand()
Overrides:
willExpand in class PTreeNode

getTreeCellRendererComponent

public 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. In this case it will be a checkbox. The text of this check box is null because we use the caption of the node on the left side of the main returnPanel.
Overrides:
getTreeCellRendererComponent in class PTreeNode

getPrintableObjects

public java.lang.Object[] getPrintableObjects()
Overrides:
getPrintableObjects in class PTreeNode

getHeight

public int getHeight(java.awt.print.PageFormat pageFormat,
                     java.awt.Font font)
Description copied from interface: PrintableObject
Returns the height of the object with the font
Specified by:
getHeight in interface PrintableObject
Overrides:
getHeight in class PTreeNode
font - font
Returns:
the height

drawObject

public int drawObject(java.awt.Graphics graphics,
                      java.awt.print.PageFormat pageFormat,
                      int posX,
                      int posY,
                      int height)
Description copied from interface: PrintableObject
Draws the object at the x and y.
Specified by:
drawObject in interface PrintableObject
Overrides:
drawObject in class PTreeNode
Parameters:
graphics - graphics to draw
pageFormat - the current page format
posX - the x position
posY - the Y position
height - the height
Returns:
the width of the object

editNode

public void editNode(PTree tree)
Overrides:
editNode in class PTreeNode

getCheckBox

public javax.swing.JCheckBox getCheckBox()

setUpdatePeer

public void setUpdatePeer(boolean update)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class PTreeNode

updatePeerCheckBoxState

protected void updatePeerCheckBoxState()

createCheckBox

protected javax.swing.JCheckBox createCheckBox()

endEditing

public void endEditing()
Overrides:
endEditing in class PTreeNode

cancelEditing

public void cancelEditing()
Overrides:
cancelEditing in class PTreeNode

getEditingValue

public java.lang.Object getEditingValue()
Overrides:
getEditingValue in class PTreeNode

nodeRemoved

public void nodeRemoved()
Overrides:
nodeRemoved in class PTreeNode

Skip navigation links


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