Package org.freeplane.core.ui.ribbon.StructureTree

Examples of org.freeplane.core.ui.ribbon.StructureTree.StructurePath


              }
            }
            else {
              button = createCommandButton(action);
              if(context.hasChildren(context.getCurrentPath())) {
                StructurePath path = context.getCurrentPath();
                ((JCommandButton)button).setPopupCallback(getPopupPanelCallBack(path, context));
                ((JCommandButton)button).setCommandButtonKind(CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);
                KeyStroke ks = context.getBuilder().getAcceleratorManager().getAccelerator(actionKey);
                updateRichTooltip(button, action, ks);
                updateActionState(action, button);
              }
            }
            button.putClientProperty(ACTION_KEY_PROPERTY, action);
           
            KeyStroke ks = context.getBuilder().getAcceleratorManager().getAccelerator(actionKey);
            if(ks != null) {
              button.putClientProperty(ACTION_ACCELERATOR, ks);
              updateRichTooltip(button, action, ks);
            }
            getAccelChangeListener().addAction(actionKey, button);
           
            builder.getMapChangeAdapter().addListener(new ActionChangeListener(action, button))
            parent.addChild(button, childProps);
          }
        }
        else {
          final String name = attributes.getProperty("name");
          if(name != null) {
            AFreeplaneAction action = ActionUtils.getDummyAction(name);
            final JCommandButton button = new JCommandButton(ActionUtils.getActionTitle(action), ActionUtils.getActionIcon(action));
            button.putClientProperty(ACTION_NAME_PROPERTY, action);
            updateRichTooltip(button, action, null);
            if(context.hasChildren(context.getCurrentPath())) {
              StructurePath path = context.getCurrentPath();
              button.setPopupCallback(getPopupPanelCallBack(path, context));
              button.setCommandButtonKind(CommandButtonKind.POPUP_ONLY);
            }
            button.setFocusable(false);
            parent.addChild(button, childProps);
View Full Code Here


  }
 
  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();
View Full Code Here

      IRibbonContributorFactory factory = builder.getContributorFactory(tag);
      if(factory != null) {
       
        ARibbonContributor contributor = factory.getContributor(attributes.getAttributes());
        try {
          final StructurePath menuPath = new StructurePath((StructurePath) parent, contributor.getKey());
          if(!builder.containsPath(menuPath)) {
            builder.add(contributor, menuPath, ARibbonContributor.parseOrderSettings(attributes.getAttribute("orderPriority", "")));
          }
          return menuPath;
        }
View Full Code Here

      String name = attributes.getAttribute("name", null);
      if(name != null) {
        IRibbonContributorFactory factory = builder.getContributorFactory(name);
        if(factory != null) {
          ARibbonContributor contributor = factory.getContributor(attributes.getAttributes());
          final StructurePath menuPath = new StructurePath((StructurePath) parent, contributor.getKey());
          if(!builder.containsPath(menuPath)) {
            builder.add(contributor, menuPath, ARibbonContributor.parseOrderSettings(attributes.getAttribute("orderPriority", "")));
          }
          return menuPath;
        }
View Full Code Here

TOP

Related Classes of org.freeplane.core.ui.ribbon.StructureTree.StructurePath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.