Search in sources :

Example 1 with StructureTreeHull

use of org.freeplane.core.ui.ribbon.StructureTree.StructureTreeHull in project freeplane by freeplane.

the class RibbonBuildContext method processChildren.

public void processChildren(StructurePath path, ARibbonContributor parent) {
    WeightedMutableTreeNode<StructureTreeHull> parentNode = ribbonBuilder.structure.get(path);
    if (parentNode != null) {
        StructurePath lastPath = getCurrentPath();
        try {
            Enumeration<WeightedMutableTreeNode<StructureTreeHull>> children = parentNode.children();
            while (children.hasMoreElements()) {
                WeightedMutableTreeNode<StructureTreeHull> node = children.nextElement();
                currentPath = node.getUserObject().getPath();
                ((ARibbonContributor) node.getUserObject().getObject()).contribute(this, parent);
            }
        } finally {
            currentPath = lastPath;
        }
    }
}
Also used : StructurePath(org.freeplane.core.ui.ribbon.StructureTree.StructurePath) StructureTreeHull(org.freeplane.core.ui.ribbon.StructureTree.StructureTreeHull)

Aggregations

StructurePath (org.freeplane.core.ui.ribbon.StructureTree.StructurePath)1 StructureTreeHull (org.freeplane.core.ui.ribbon.StructureTree.StructureTreeHull)1