FileDocCategorySizeDatePackage
CategoryNode.javaAPI DocApache log4j 1.2.155538Sat Aug 25 00:09:38 BST 2007org.apache.log4j.lf5.viewer.categoryexplorer

CategoryNode

public class CategoryNode extends DefaultMutableTreeNode
CategoryNode
author
Michael J. Sikorsky
author
Robert Shaw

Fields Summary
private static final long
serialVersionUID
protected boolean
_selected
protected int
_numberOfContainedRecords
protected int
_numberOfRecordsFromChildren
protected boolean
_hasFatalChildren
protected boolean
_hasFatalRecords
Constructors Summary
public CategoryNode(String title)


  //--------------------------------------------------------------------------
  //   Private Variables:
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  //   Constructors:
  //--------------------------------------------------------------------------

     
     
    setUserObject(title);
  
Methods Summary
public voidaddRecord()

    _numberOfContainedRecords++;
    addRecordToParent();
  
protected voidaddRecordFromChild()
Passes up the addition from child to parent

    _numberOfRecordsFromChildren++;
    addRecordToParent();
  
protected voidaddRecordToParent()

    TreeNode parent = getParent();
    if (parent == null) {
      return;
    }
    ((CategoryNode) parent).addRecordFromChild();
  
public booleanequals(java.lang.Object obj)

    if (obj instanceof CategoryNode) {
      CategoryNode node = (CategoryNode) obj;
      String tit1 = getTitle().toLowerCase();
      String tit2 = node.getTitle().toLowerCase();

      if (tit1.equals(tit2)) {
        return (true);
      }
    }
    return (false);
  
public intgetNumberOfContainedRecords()

    return _numberOfContainedRecords;
  
protected intgetNumberOfRecordsFromChildren()

    return _numberOfRecordsFromChildren;
  
public java.lang.StringgetTitle()

    return (String) getUserObject();
  
protected intgetTotalNumberOfRecords()

    return getNumberOfRecordsFromChildren() + getNumberOfContainedRecords();
  
public booleanhasFatalChildren()

    return _hasFatalChildren;
  
public booleanhasFatalRecords()

    return _hasFatalRecords;
  
public inthashCode()

    return (getTitle().hashCode());
  
public booleanisSelected()

    return _selected;
  
public voidresetNumberOfContainedRecords()

    _numberOfContainedRecords = 0;
    _numberOfRecordsFromChildren = 0;
    _hasFatalRecords = false;
    _hasFatalChildren = false;
  
public voidsetAllDescendantsDeSelected()

deprecated

    Enumeration children = children();
    while (children.hasMoreElements()) {
      CategoryNode node = (CategoryNode) children.nextElement();
      node.setSelected(false);
      node.setAllDescendantsDeSelected();
    }
  
public voidsetAllDescendantsSelected()

deprecated

    Enumeration children = children();
    while (children.hasMoreElements()) {
      CategoryNode node = (CategoryNode) children.nextElement();
      node.setSelected(true);
      node.setAllDescendantsSelected();
    }
  
public voidsetHasFatalChildren(boolean flag)

    _hasFatalChildren = flag;
  
public voidsetHasFatalRecords(boolean flag)

    _hasFatalRecords = flag;
  
public voidsetSelected(boolean s)

    if (s != _selected) {
      _selected = s;
    }
  
public java.lang.StringtoString()

    return (getTitle());