Skip navigation links


com.essbase.eas.ui.ptree
Class PTreeNumericFieldNode

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

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

public class PTreeNumericFieldNode
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  boolean allowDecimal
           
protected  java.lang.Number max
           
protected  java.lang.Number min
           

 

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
PTreeNumericFieldNode()
           
PTreeNumericFieldNode(javax.swing.JTextField tf)
           
PTreeNumericFieldNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption)
           
PTreeNumericFieldNode(java.lang.Object userObject, boolean allowsChildren, java.lang.String caption, java.lang.Object nodeObject)
           

 

Method Summary
 void cancelEditing()
           
protected  CRestrictedNumericTextField createTextField()
           
 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 endEditing()
           
 boolean getAllowDecimal()
           
 java.lang.Double getDouble()
           
 double getDoubleValue()
           
 java.lang.Object getEditingValue()
           
 java.lang.Integer getInteger()
           
 int getIntValue()
           
 java.lang.Long getLong()
           
 long getLongValue()
           
 java.lang.Object[] getPrintableObjects()
           
 CRestrictedNumericTextField getTextField()
           
 java.lang.String getTextValue()
           
 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.
 boolean isEmpty()
           
 void setAllowDecimal(boolean allow)
           
 void setMaximum(java.lang.Number max)
           
 void setMinimum(java.lang.Number min)
           
 void setTextValue(java.lang.String value)
           

 

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

 

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

allowDecimal

protected boolean allowDecimal

max

protected java.lang.Number max

min

protected java.lang.Number min

Constructor Detail

PTreeNumericFieldNode

public PTreeNumericFieldNode()

PTreeNumericFieldNode

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

PTreeNumericFieldNode

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

PTreeNumericFieldNode

public PTreeNumericFieldNode(javax.swing.JTextField tf)

Method Detail

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 CTextField. The textField is assumed to have the appropriate text when this node type is created through the c'tor.
Overrides:
getTreeCellRendererComponent in class PTreeNode

getPrintableObjects

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

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

getTextValue

public java.lang.String getTextValue()

setTextValue

public void setTextValue(java.lang.String value)

getTextField

public CRestrictedNumericTextField getTextField()

createTextField

protected CRestrictedNumericTextField createTextField()

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

setMaximum

public void setMaximum(java.lang.Number max)

setMinimum

public void setMinimum(java.lang.Number min)

setAllowDecimal

public void setAllowDecimal(boolean allow)

getAllowDecimal

public boolean getAllowDecimal()

getIntValue

public int getIntValue()

getLongValue

public long getLongValue()

getDoubleValue

public double getDoubleValue()

getInteger

public java.lang.Integer getInteger()

getLong

public java.lang.Long getLong()

getDouble

public java.lang.Double getDouble()

isEmpty

public boolean isEmpty()

Skip navigation links


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