Skip navigation links


com.essbase.eas.ui.ptree
Class PTreeNodeEditorRenderer

java.lang.Object
  extended by javax.swing.tree.DefaultTreeCellEditor
      extended by com.essbase.eas.ui.ptree.PTreeNodeEditorRenderer

All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, javax.swing.CellEditor, javax.swing.event.TreeSelectionListener, javax.swing.tree.TreeCellEditor

public class PTreeNodeEditorRenderer
extends javax.swing.tree.DefaultTreeCellEditor

This defines the default cellEditorRenderer for a PTreeNode node of the properties tree. The return component is a editor based on the node type. Editatble nodes will fetch Renderers from their respective node types. Notes:

Version:
1.00, 10/13/2000
Author:
Namita Varma

Nested Class Summary

 

Nested classes/interfaces inherited from class javax.swing.tree.DefaultTreeCellEditor
javax.swing.tree.DefaultTreeCellEditor.DefaultTextField, javax.swing.tree.DefaultTreeCellEditor.EditorContainer

 

Field Summary

 

Fields inherited from class javax.swing.tree.DefaultTreeCellEditor
borderSelectionColor, canEdit, editingComponent, editingContainer, editingIcon, font, lastPath, lastRow, offset, realEditor, renderer, timer

 

Constructor Summary
PTreeNodeEditorRenderer(javax.swing.JTree tree)
           
PTreeNodeEditorRenderer(javax.swing.JTree tree, javax.swing.tree.DefaultTreeCellRenderer rend)
           
PTreeNodeEditorRenderer(javax.swing.JTree tree, javax.swing.tree.DefaultTreeCellRenderer rend, javax.swing.tree.TreeCellEditor editor)
           

 

Method Summary
 void cancelCellEditing()
           
 boolean canEditImmediately(java.util.EventObject e)
          Overrides the canEditImmediately of the DefaultCellEditor .
 void dispose()
           
 java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row)
          This is the function that returns the renderer for the CTreeNode.
 boolean isCellEditable(java.util.EventObject e)
          Determines if the node we are clicking on is editable.
 boolean shouldSelectCell(java.util.EventObject e)
           
 boolean stopCellEditing()
           

 

Methods inherited from class javax.swing.tree.DefaultTreeCellEditor
actionPerformed, addCellEditorListener, createContainer, createTreeCellEditor, determineOffset, getBorderSelectionColor, getCellEditorListeners, getCellEditorValue, getFont, inHitRegion, prepareForEditing, removeCellEditorListener, setBorderSelectionColor, setFont, setTree, shouldStartEditingTimer, startEditingTimer, valueChanged

 

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

 

Constructor Detail

PTreeNodeEditorRenderer

public PTreeNodeEditorRenderer(javax.swing.JTree tree)

PTreeNodeEditorRenderer

public PTreeNodeEditorRenderer(javax.swing.JTree tree,
                               javax.swing.tree.DefaultTreeCellRenderer rend,
                               javax.swing.tree.TreeCellEditor editor)

PTreeNodeEditorRenderer

public PTreeNodeEditorRenderer(javax.swing.JTree tree,
                               javax.swing.tree.DefaultTreeCellRenderer rend)

Method Detail

canEditImmediately

public boolean canEditImmediately(java.util.EventObject e)
Overrides the canEditImmediately of the DefaultCellEditor .
Overrides:
canEditImmediately in class javax.swing.tree.DefaultTreeCellEditor

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
                                                     java.lang.Object value,
                                                     boolean selected,
                                                     boolean expanded,
                                                     boolean leaf,
                                                     int row)
This is the function that returns the renderer for the CTreeNode. If the node is an instanceof CTreeNode we redirect to the function call for that node type, else return null.
Specified by:
getTreeCellEditorComponent in interface javax.swing.tree.TreeCellEditor
Overrides:
getTreeCellEditorComponent in class javax.swing.tree.DefaultTreeCellEditor

cancelCellEditing

public void cancelCellEditing()
Specified by:
cancelCellEditing in interface javax.swing.CellEditor
Overrides:
cancelCellEditing in class javax.swing.tree.DefaultTreeCellEditor

stopCellEditing

public boolean stopCellEditing()
Specified by:
stopCellEditing in interface javax.swing.CellEditor
Overrides:
stopCellEditing in class javax.swing.tree.DefaultTreeCellEditor

isCellEditable

public boolean isCellEditable(java.util.EventObject e)
Determines if the node we are clicking on is editable.
Specified by:
isCellEditable in interface javax.swing.CellEditor
Overrides:
isCellEditable in class javax.swing.tree.DefaultTreeCellEditor

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject e)
Specified by:
shouldSelectCell in interface javax.swing.CellEditor
Overrides:
shouldSelectCell in class javax.swing.tree.DefaultTreeCellEditor

dispose

public void dispose()

Skip navigation links


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