Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## samples.javaclient.analyzer
Class CatalogTreeModel

    java.lang.Object
      samples.javaclient.analyzer.CatalogTreeModel

All Implemented Interfaces:
  BITreeModel, java.util.EventListener, javax.swing.event.TreeExpansionListener, javax.swing.tree.TreeModel

public class CatalogTreeModel
extends java.lang.Object
implements BITreeModel, javax.swing.event.TreeExpansionListener

Implementation of BITreeModel, which allows a JTree to display contents of the BI Beans Catalog. The `CatalogExplorer` and the `FavoritesExplorer` use this class.

Field Summary
`private oracle.dss.bicontext.BIContext` | `m_context` The root folder in the Catalog.
`private oracle.dss.bicontext.BISearchControls` | `m_controls` Search controls to refine the search for objects to display.
`private javax.naming.directory.Attributes` | `m_filters` Attributes of objects to search for, to display in the tree.
`private javax.swing.event.EventListenerList` | `m_listenerList` Listeners for events that this model generates.
`private CatalogTreeNode` | `m_root` The root node in the tree.

Constructor Summary
`CatalogTreeModel(oracle.dss.bicontext.BIContext con, javax.naming.directory.Attributes filters, oracle.dss.bicontext.BISearchControls controls, java.lang.String rootName)` Constructor.

Method Summary
`void` | `addTreeModelListener(javax.swing.event.TreeModelListener l)` Registers a listener for this model.
`void` | `fireTreeStructureChanged(BITreeNode node)` Notifies listeners of changes to the tree structure.
`java.lang.Object` | `getChild(java.lang.Object node, int index)` Gets a child node.
`int` | `getChildCount(java.lang.Object node)` Gets the number of child nodes that a node has.
`int[]` | `getIndexes(java.lang.Object node)` Gets the indexes of child nodes for a node.
`int` | `getIndexOfChild(java.lang.Object parent, java.lang.Object child)` Gets the index of a child node.
`oracle.dss.bicontext.BIContext` | `getInitialContext()` Gets the root folder in the Catalog.
`java.lang.Object` | `getRoot()` Gets the root node for this model.
`oracle.dss.bicontext.BISearchControls` | `getSearchControls()` The search controls for this CatalogTreeModel.
`javax.naming.directory.Attributes` | `getSearchFilters()` Gets the search attributes for this CatalogTreeModel.
`protected void` | `initialize(java.lang.String rootName)` Initializes this model.
`boolean` | `isLeaf(java.lang.Object node)` Indicates whether a node is a leaf node (has no child nodes).
`void` | `removeTreeModelListener(javax.swing.event.TreeModelListener l)` Removes a listener from this model.
`void` | `treeCollapsed(javax.swing.event.TreeExpansionEvent evt)` Null implementation for TreeExplansionListener interface.
`void` | `treeExpanded(javax.swing.event.TreeExpansionEvent evt)` Responds to tree expansion events.
`void` | `valueForPathChanged(javax.swing.tree.TreePath treepath, java.lang.Object obj)` Null implementation for TreeModel interface.

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

Field Detail

### m_context

    private oracle.dss.bicontext.BIContext m_context

  The root folder in the Catalog.

### m_root

    private CatalogTreeNode m_root

  The root node in the tree.

### m_filters

    private javax.naming.directory.Attributes m_filters

  Attributes of objects to search for, to display in the tree.

### m_controls

    private oracle.dss.bicontext.BISearchControls m_controls

  Search controls to refine the search for objects to display.

### m_listenerList

    private javax.swing.event.EventListenerList m_listenerList

  Listeners for events that this model generates.

Constructor Detail

### CatalogTreeModel

    public CatalogTreeModel(oracle.dss.bicontext.BIContext con,
                            javax.naming.directory.Attributes filters,
                            oracle.dss.bicontext.BISearchControls controls,
                            java.lang.String rootName)

  Constructor.

Parameters:
  `con` - The root folder of the Catalog.
  `filters` - Search attributes that specify the Catalog objects to display.
  `controls` - Search controls to specify the scope of the Catalog search.
  `rootName` - A name for the root node of the tree.

Method Detail

### getInitialContext

    public oracle.dss.bicontext.BIContext getInitialContext()

  Gets the root folder in the Catalog.

  Specified by:
    `getInitialContext` in interface `BITreeModel`
  Returns:
    The root folder.

### getSearchFilters

    public javax.naming.directory.Attributes getSearchFilters()

  Gets the search attributes for this CatalogTreeModel. Search attributes specify the type of objects to display in the tree.

  Specified by:
    `getSearchFilters` in interface `BITreeModel`
  Returns:
    The search attributes for this model.

### getSearchControls

    public oracle.dss.bicontext.BISearchControls getSearchControls()

  The search controls for this CatalogTreeModel. Search controls specify the scope of the search and custom filters for the search results.

  Specified by:
    `getSearchControls` in interface `BITreeModel`
  Returns:
    The search controls for this model.

### initialize

    protected void initialize(java.lang.String rootName)

  Initializes this model. This method creates a root node.

  Parameters:
    `rootName` - The name for the root node.
  See Also:
    `CatalogExplorer.ROOT`, `CatalogExplorer.populateTree()`

### getRoot

    public java.lang.Object getRoot()

  Gets the root node for this model.

  Specified by:
    `getRoot` in interface `javax.swing.tree.TreeModel`
  Returns:
    The root node.

### getIndexes

    public int[] getIndexes(java.lang.Object node)

  Gets the indexes of child nodes for a node.

  Returns:
    An array of indexes, one for each child node.
  See Also:
    `CatalogTreeNode.getIndexes()`

### getChild

    public java.lang.Object getChild(java.lang.Object node,
                                     int index)

  Gets a child node. This method gets the specified child of the specified node.

  Specified by:
    `getChild` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `node` - The node whose child you want.
    `index` - The index of the child node that you want.
  Returns:
    The child of `node` at `index`.

### getChildCount

    public int getChildCount(java.lang.Object node)

  Gets the number of child nodes that a node has.

  Specified by:
    `getChildCount` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `node` - The node whose child nodes to count.
  Returns:
    The number of child nodes that `node` has.

### getIndexOfChild

    public int getIndexOfChild(java.lang.Object parent,
                               java.lang.Object child)

  Gets the index of a child node.

  Specified by:
    `getIndexOfChild` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `parent` - The node whose child index you want.
    `child` - The child node whose index you want.

### addTreeModelListener

    public void addTreeModelListener(javax.swing.event.TreeModelListener l)

  Registers a listener for this model.

  Specified by:
    `addTreeModelListener` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `l` - The listener to add.

### removeTreeModelListener

    public void removeTreeModelListener(javax.swing.event.TreeModelListener l)

  Removes a listener from this model.

  Specified by:
    `removeTreeModelListener` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `l` - The listener to remove.

### fireTreeStructureChanged

    public void fireTreeStructureChanged(BITreeNode node)

  Notifies listeners of changes to the tree structure.

  Specified by:
    `fireTreeStructureChanged` in interface `BITreeModel`
  Parameters:
    `node` - The node whose structure has changed.

### valueForPathChanged

    public void valueForPathChanged(javax.swing.tree.TreePath treepath,
                                    java.lang.Object obj)

  Null implementation for TreeModel interface.

  Specified by:
    `valueForPathChanged` in interface `javax.swing.tree.TreeModel`

### isLeaf

    public boolean isLeaf(java.lang.Object node)

  Indicates whether a node is a leaf node (has no child nodes).

  Specified by:
    `isLeaf` in interface `javax.swing.tree.TreeModel`
  Parameters:
    `node` - The node that might be a leaf node.
  Returns:
    `true` if `node` has no child nodes, `false` if `node` had child nodes.

### treeCollapsed

    public void treeCollapsed(javax.swing.event.TreeExpansionEvent evt)

  Null implementation for TreeExplansionListener interface.

  Specified by:
    `treeCollapsed` in interface `javax.swing.event.TreeExpansionListener`

### treeExpanded

    public void treeExpanded(javax.swing.event.TreeExpansionEvent evt)

  Responds to tree expansion events.

  Specified by:
    `treeExpanded` in interface `javax.swing.event.TreeExpansionListener`
  Parameters:
    `evt` - Information about the tree expansion.

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD