Business Components

oracle.jbo.uicli.jui
Class JUTreeNodeBinding

java.lang.Object
  |
  +--oracle.jbo.uicli.binding.JUControlBinding
        |
        +--oracle.jbo.uicli.binding.JUCtrlValueBinding
              |
              +--oracle.jbo.uicli.binding.JUCtrlRangeBinding
                    |
                    +--oracle.jbo.uicli.binding.JUCtrlHierNodeBinding
                          |
                          +--oracle.jbo.uicli.jui.JUTreeNodeBinding
All Implemented Interfaces:
AttributeList

public class JUTreeNodeBinding
extends JUCtrlHierNodeBinding

This class implements rules that govern display of each node in a JTree which is bound to a JUTreeBinding and what to display when the associated node is expanded. The framework creates instances of this class for each node in the tree.

See Also:
Row, RowIterator, JUTreeBinding, JTree

Fields inherited from class oracle.jbo.uicli.binding.JUCtrlHierNodeBinding
mChildren
 
Constructor Summary
TypeConstructor
protected JUTreeNodeBinding(javax.swing.JTree tr, JUTreeBinding treeBinding, JUTreeNodeBinding parent, JUIteratorBinding iterBinding, JUCtrlHierTypeBinding typeBinding, RowSetIterator parentRSI, Row row, boolean expandable)
          *** For internal framework use only ***
protected JUTreeNodeBinding(javax.swing.JTree tr, JUTreeBinding treeBinding, JUTreeNodeBinding parent, JUIteratorBinding iterBinding, java.lang.String attrName, java.lang.Object nodeVal, boolean expandable)
          *** For internal framework use only ***
 
Method Summary
TypeMethod
 void addControlToPanel(java.lang.Object panel, java.lang.Object layoutObject, java.lang.Object layoutCons)
          *** For internal framework use only ***
 void collapse()
          Collapses the detail nodes of this node and closes this node.
 void executeQueryIfNeeded()
          Execute the query for the RowIterator that this row is associated with if it's not already executed.
 void expand()
          Expands this node if this node has child-rows to display.
 JUCtrlHierTypeBinding getHierTypeBinding()
          Returns the type binding that this governs the display of this node.
 RowSetIterator getParentRowSetIterator()
          Returns the RowSetIterator that this node's row is part of.
 Key getRowKey()
          Returns the Key object that identifies the row that this node is displaying.
 javax.swing.tree.DefaultMutableTreeNode getTreeNode()
          Returns the swing TreeNode object that this node is associated to.
 javax.swing.tree.TreePath getTreePath()
          Returns the TreePath that represents this node in the containing JTree hierarchy.
 java.lang.Object getValueAt(int rowIndex, int attrIndex)
          Returns the value that this node displays.
 void nodeSelected()
          Finds the row that this node represents in the associated iterator by asking this node's parent node for the iterator and then sets that row as current row in the RowIterator.
 void setValueAt(java.lang.Object value, int rowIndex, int attrIndex)
          Sets the value that this node is displaying.
 java.lang.String toString()
          Renders the attribute value that this node is supposed to show.
 void updateRowDeleted(DeleteEvent event)
          Removes a child node that displays the deleted row from amongst this node's children.
 void updateRowInserted(InsertEvent event)
          Update the display by adding a node to render the inserted row as this node's child.
 void updateValuesFromRow(Row row)
          Finds the child node that displays this row and updates it's display.
 void updateValuesFromRows(Row[] rows, boolean clear)
          Updates the child nodes that this node contains after optionally clearing out all the currently displayed children based on the clear flag.
 
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlHierNodeBinding
addChild, getChildren, getHierBinding, getParent, removeChild
 
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlRangeBinding
getEstimatedRowCount, updateNavigated, updateRangeScrolled
 
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlValueBinding
findAttributeDef, getAttribute, getAttribute, getAttributeCount, getAttributeDef, getAttributeDefs, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeIndexOf, getAttributeNames, isAttributeUpdateable, setAttribute, setAttribute, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, stopEditing
 
Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding
executeQuery, getAllRowsInRange, getApplicationModule, getControl, getCurrentRow, getDef, getFormBinding, getIteratorBinding, getLayoutObject, getName, getRowAtRangeIndex, getRowIterator, getTransaction, getViewObject, isControlQueriable, reportException, setFormBinding, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JUTreeNodeBinding

protected JUTreeNodeBinding(javax.swing.JTree tr,
                            JUTreeBinding treeBinding,
                            JUTreeNodeBinding parent,
                            JUIteratorBinding iterBinding,
                            java.lang.String attrName,
                            java.lang.Object nodeVal,
                            boolean expandable)
*** For internal framework use only ***

JUTreeNodeBinding

protected JUTreeNodeBinding(javax.swing.JTree tr,
                            JUTreeBinding treeBinding,
                            JUTreeNodeBinding parent,
                            JUIteratorBinding iterBinding,
                            JUCtrlHierTypeBinding typeBinding,
                            RowSetIterator parentRSI,
                            Row row,
                            boolean expandable)
*** For internal framework use only ***
Method Detail

nodeSelected

public void nodeSelected()
Finds the row that this node represents in the associated iterator by asking this node's parent node for the iterator and then sets that row as current row in the RowIterator.

executeQueryIfNeeded

public void executeQueryIfNeeded()
Execute the query for the RowIterator that this row is associated with if it's not already executed.
Overrides:
executeQueryIfNeeded in class JUControlBinding

addControlToPanel

public void addControlToPanel(java.lang.Object panel,
                              java.lang.Object layoutObject,
                              java.lang.Object layoutCons)
*** For internal framework use only ***
Overrides:
addControlToPanel in class JUControlBinding

collapse

public void collapse()
Collapses the detail nodes of this node and closes this node.

expand

public void expand()
Expands this node if this node has child-rows to display.

getParentRowSetIterator

public RowSetIterator getParentRowSetIterator()
Returns the RowSetIterator that this node's row is part of.

getRowKey

public Key getRowKey()
Returns the Key object that identifies the row that this node is displaying.

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int attrIndex)
Returns the value that this node displays.
Overrides:
getValueAt in class JUCtrlRangeBinding

setValueAt

public void setValueAt(java.lang.Object value,
                       int rowIndex,
                       int attrIndex)
Sets the value that this node is displaying. Note that this method only changes the display and does not actually update the value of the attribute that this row is displaying.
Overrides:
setValueAt in class JUCtrlRangeBinding

getTreeNode

public javax.swing.tree.DefaultMutableTreeNode getTreeNode()
Returns the swing TreeNode object that this node is associated to.

getTreePath

public javax.swing.tree.TreePath getTreePath()
Returns the TreePath that represents this node in the containing JTree hierarchy. This treepath can be used to work with the JTree/TreeModel apis that expect a tree path for a node.

updateRowInserted

public void updateRowInserted(InsertEvent event)
Update the display by adding a node to render the inserted row as this node's child.
Overrides:
updateRowInserted in class JUCtrlValueBinding

updateRowDeleted

public void updateRowDeleted(DeleteEvent event)
Removes a child node that displays the deleted row from amongst this node's children.
Overrides:
updateRowDeleted in class JUCtrlValueBinding

updateValuesFromRow

public void updateValuesFromRow(Row row)
Finds the child node that displays this row and updates it's display.
Overrides:
updateValuesFromRow in class JUCtrlRangeBinding

updateValuesFromRows

public void updateValuesFromRows(Row[] rows,
                                 boolean clear)
Updates the child nodes that this node contains after optionally clearing out all the currently displayed children based on the clear flag.

This method determines the rules to associate to each row in the given array of rows.

Overrides:
updateValuesFromRows in class JUCtrlRangeBinding

toString

public java.lang.String toString()
Renders the attribute value that this node is supposed to show. This method is used by JTree to display the string for a node in the tree.
Overrides:
toString in class java.lang.Object

getHierTypeBinding

public final JUCtrlHierTypeBinding getHierTypeBinding()
Returns the type binding that this governs the display of this node. The returned object can be used to find out the name of the attribute that this node displays and the accessor that this row will expand (if any).

Business Components