本文整理汇总了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());
}
示例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));
}
}
示例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");
}