当前位置: 首页>>代码示例>>Java>>正文


Java CategoryNode类代码示例

本文整理汇总了Java中org.apache.log4j.lf5.viewer.categoryexplorer.CategoryNode的典型用法代码示例。如果您正苦于以下问题:Java CategoryNode类的具体用法?Java CategoryNode怎么用?Java CategoryNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CategoryNode类属于org.apache.log4j.lf5.viewer.categoryexplorer包,在下文中一共展示了CategoryNode类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: save

import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryNode; //导入依赖的package包/类
public void save() {
  CategoryExplorerModel model = _monitor.getCategoryExplorerTree().getExplorerModel();
  CategoryNode root = model.getRootCategoryNode();

  StringBuffer xml = new StringBuffer(2048);
  openXMLDocument(xml);
  openConfigurationXML(xml);
  processLogRecordFilter(_monitor.getNDCTextFilter(), xml);
  processLogLevels(_monitor.getLogLevelMenuItems(), xml);
  processLogLevelColors(_monitor.getLogLevelMenuItems(),
      LogLevel.getLogLevelColorMap(), xml);
  processLogTableColumns(LogTableColumn.getLogTableColumns(), xml);
  processConfigurationNode(root, xml);
  closeConfigurationXML(xml);
  store(xml.toString());
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:17,代码来源:ConfigurationManager.java

示例2: processCategories

import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryNode; //导入依赖的package包/类
protected void processCategories(Document doc) {
  CategoryExplorerTree tree = _monitor.getCategoryExplorerTree();
  CategoryExplorerModel model = tree.getExplorerModel();
  NodeList nodeList = doc.getElementsByTagName(CATEGORY);

  // determine where the starting node is
  NamedNodeMap map = nodeList.item(0).getAttributes();
  int j = (getValue(map, NAME).equalsIgnoreCase(FIRST_CATEGORY_NAME)) ? 1 : 0;
  // iterate backwards throught the nodeList so that expansion of the
  // list can occur
  for (int i = nodeList.getLength() - 1; i >= j; i--) {
    Node n = nodeList.item(i);
    map = n.getAttributes();
    CategoryNode chnode = model.addCategory(new CategoryPath(getValue(map, PATH)));
    chnode.setSelected((getValue(map, SELECTED).equalsIgnoreCase("true")) ? true : false);
    if (getValue(map, EXPANDED).equalsIgnoreCase("true")) ;
    tree.expandPath(model.getTreePathToRoot(chnode));
  }

}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:21,代码来源:ConfigurationManager.java

示例3: exportXMLElement

import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryNode; //导入依赖的package包/类
private void exportXMLElement(CategoryNode node, TreePath path, StringBuffer xml) {
  CategoryExplorerTree tree = _monitor.getCategoryExplorerTree();

  xml.append("\t<").append(CATEGORY).append(" ");
  xml.append(NAME).append("=\"").append(node.getTitle()).append("\" ");
  xml.append(PATH).append("=\"").append(treePathToString(path)).append("\" ");
  xml.append(EXPANDED).append("=\"").append(tree.isExpanded(path)).append("\" ");
  xml.append(SELECTED).append("=\"").append(node.isSelected()).append("\"/>\r\n");
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:10,代码来源:ConfigurationManager.java


注:本文中的org.apache.log4j.lf5.viewer.categoryexplorer.CategoryNode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。