## org.apache.log4j.lf5.viewer.categoryexplorer
Class CategoryExplorerModel

    java.lang.Object
      javax.swing.tree.DefaultTreeModel
          org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerModel

All Implemented Interfaces:
  Serializable, TreeModel

    public class CategoryExplorerModel

extends DefaultTreeModel

CategoryExplorerModel

Author:
  Michael J. Sikorsky, Robert Shaw, Brent Sprecher, Richard Hurst
See Also:
  Serialized Form

Field Summary
`protected ActionEvent` `_event`
`protected ActionListener` `_listener`
`protected boolean` `_renderFatal`

Fields inherited from class javax.swing.tree.DefaultTreeModel
`asksAllowsChildren, listenerList, root`

Constructor Summary
`CategoryExplorerModel(CategoryNode node)`

Method Summary
`void` `addActionListener(ActionListener l)`
`CategoryNode` `addCategory(CategoryPath path)` Method altered by Richard Hurst such that it returns the CategoryNode corresponding to the CategoryPath
`void` `addLogRecord(LogRecord lr)`
`CategoryNode` `getCategoryNode(CategoryPath path)` returns null if no CategoryNode exists.
`CategoryNode` `getCategoryNode(String category)`
`CategoryNode` `getRootCategoryNode()`
`TreePath` `getTreePathToRoot(CategoryNode node)` Returns the CategoryPath to the specified CategoryNode
`boolean` `isCategoryPathActive(CategoryPath path)`
`protected void` `notifyActionListeners()`
`protected void` `refresh(CategoryNode node)` Fires a nodechanged event on the SwingThread.
`void` `removeActionListener(ActionListener l)`
`void` `resetAllNodeCounts()`
`void` `setDescendantSelection(CategoryNode node, boolean selected)`
`void` `setParentSelection(CategoryNode node, boolean selected)`
`void` `update(CategoryNode node, boolean selected)`

Methods inherited from class javax.swing.tree.DefaultTreeModel

`addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged`

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

Field Detail

### _renderFatal

    protected boolean _renderFatal

### _listener

    protected ActionListener _listener

### _event

    protected ActionEvent _event

Constructor Detail

### CategoryExplorerModel

    public CategoryExplorerModel(CategoryNode node)

Method Detail

### addLogRecord

    public void addLogRecord(LogRecord lr)

### getRootCategoryNode

    public CategoryNode getRootCategoryNode()

### getCategoryNode

    public CategoryNode getCategoryNode(String category)

### getCategoryNode

    public CategoryNode getCategoryNode(CategoryPath path)

  returns null if no CategoryNode exists.

### isCategoryPathActive

    public boolean isCategoryPathActive(CategoryPath path)

  Returns:
    true if all the nodes in the specified CategoryPath are selected.

### addCategory

    public CategoryNode addCategory(CategoryPath path)

  Method altered by Richard Hurst such that it returns the CategoryNode corresponding to the CategoryPath

  Parameters:
    `path` - category path.
  Returns:
    CategoryNode

### update

    public void update(CategoryNode node,
                       boolean selected)

### setDescendantSelection

    public void setDescendantSelection(CategoryNode node,
                                       boolean selected)

### setParentSelection

    public void setParentSelection(CategoryNode node,
                                   boolean selected)

### addActionListener

    public void addActionListener(ActionListener l)

### removeActionListener

    public void removeActionListener(ActionListener l)

### resetAllNodeCounts

    public void resetAllNodeCounts()

### getTreePathToRoot

    public TreePath getTreePathToRoot(CategoryNode node)

  Returns the CategoryPath to the specified CategoryNode

  Parameters:
    `node` - The target CategoryNode
  Returns:
    CategoryPath

### notifyActionListeners

    protected void notifyActionListeners()

### refresh

    protected void refresh(CategoryNode node)

  Fires a nodechanged event on the SwingThread.

Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.