Examples of AbstractTreeNode


Examples of com.intellij.ide.util.treeView.AbstractTreeNode

      boolean hasFocus)
    {
      DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
      if (node.getUserObject() instanceof AbstractTreeNode)
      {
        AbstractTreeNode userNode = (AbstractTreeNode) node.getUserObject();
        Object userValue = userNode.getValue();

        if (userValue instanceof XSModelTreeElement)
        {
          XSModelTreeElement treeElement = (XSModelTreeElement) userValue;

          if (treeElement.hasXStructureSupport())
          {
            String tagName = treeElement.getTagName();
            String targetLabel = treeElement.getTargetLabel();
            String targetTooltip = treeElement.getTargetTooltip();

            setIcon(expanded ? userNode.getOpenIcon() : userNode.getClosedIcon());

            setToolTipText(targetTooltip);

            append(tagName, SimpleTextAttributes.GRAYED_ATTRIBUTES);
            if (targetLabel != null)
View Full Code Here

Examples of com.intellij.ide.util.treeView.AbstractTreeNode

      final DartUrlResolver resolver = DartUrlResolver.getInstance(project, pubspecYamlFile);
      resolver.processLivePackages(new PairConsumer<String, VirtualFile>() {
        public void consume(final @NotNull String packageName, final @NotNull VirtualFile packageDir) {
          final VirtualFile folder = packagesDir.findChild(packageName);
          if (folder != null) {
            final AbstractTreeNode node = getFolderNode(children, folder);
            if (node == null) {
              modifiedChildren.add(new SymlinkToLivePackageNode(project, packageName, packageDir));
            }
            else {
              node.getPresentation().setLocationString(getPackageLocationString(packageDir));
            }
          }
        }
      });
View Full Code Here

Examples of com.lowagie.tools.swing.treenodes.AbstractTreeNode

     * @param e TreeSelectionEvent
     */
    public void jTreeValueChanged(TreeSelectionEvent e) {
    String event = e.getClass().toString();
    if (event.equalsIgnoreCase("class javax.swing.event.TreeSelectionEvent")) {
      AbstractTreeNode selectednode = (AbstractTreeNode) pdfTree
          .getLastSelectedPathComponent();
      System.out.println("Selected node: " + selectednode);
      if (selectednode != null) {
        selectednode.updateview(this);
      }
    }
  }
View Full Code Here

Examples of hermes.browser.model.tree.AbstractTreeNode

            {
               Object component = selectionPath.getLastPathComponent();

               if (component instanceof AbstractTreeNode)
               {
                  AbstractTreeNode node = (AbstractTreeNode) component;

                  if (node instanceof ConnectionFactoryTreeNode)
                  {
                     ContextTreeNode ctxNode = (ContextTreeNode) node.getParent();
                     ConnectionFactoryTreeNode cfNode = (ConnectionFactoryTreeNode) node;
                     String binding = getAbsoluteBinding(cfNode);
                     Class clazz = null;

                     if (cfNode.getBean() instanceof QueueConnectionFactory && cfNode.getBean() instanceof TopicConnectionFactory)
                     {
                        clazz = JNDIConnectionFactory.class;
                     }
                     else if (cfNode.getBean() instanceof QueueConnectionFactory)
                     {
                        clazz = JNDIQueueConnectionFactory.class;
                     }
                     else
                     {
                        clazz = JNDITopicConnectionFactory.class;
                     }

                     FactoryConfig factoryConfig = HermesBrowser.getConfigDAO().createJNDIFactoryConfig(ctxNode.getConfig().getClasspathId(), "S:" + System.currentTimeMillis()
                           + ":" + node.getId(), binding, ctxNode.getConfig().getProperties(), clazz.getName());

                     rval.add(factoryConfig);
                  }
               }
            }
View Full Code Here

Examples of hermes.browser.model.tree.AbstractTreeNode

      final TreeNode[] path = (TreeNode[]) model.getPathToRoot(leaf);
      final StringBuffer rval = new StringBuffer();

      for (int i = 1; i < path.length; i++)
      {
         AbstractTreeNode node = (AbstractTreeNode) path[i];

         rval.append(node.getId());

         if (i != path.length - 1)
         {
            if (!node.getId().endsWith("/"))
            {
               rval.append("/");
            }
         }
      }
View Full Code Here

Examples of hermes.browser.model.tree.AbstractTreeNode

         {
            Object component = selectionPath.getLastPathComponent();

            if (component instanceof AbstractTreeNode)
            {
               AbstractTreeNode node = (AbstractTreeNode) component;

               if (node instanceof QueueTopicTreeNode || node instanceof QueueTreeNode || node instanceof TopicTreeNode)
               {
                  DestinationConfig config = HermesBrowser.getConfigDAO().createDestinationConfig();
                  String binding = getAbsoluteBinding(node);

                  config.setName(binding);
                  config.setDomain(Domain.getDomain((Destination) node.getBean()).getId());

                  rval.add(config);
               }
            }
         }
View Full Code Here

Examples of hermes.browser.model.tree.AbstractTreeNode

            HermesBrowser.getBrowser().showErrorDialog(node.getException().getClass().getName() + "\n" + node.getException());
         }
         else if (getSelectionPath().getLastPathComponent() instanceof AbstractTreeNode)
         {
            AbstractTreeNode node = (AbstractTreeNode) getSelectionPath().getLastPathComponent();

            if (node instanceof ContextTreeNode)
            {
               // NOP
            }
            else
            {
               BeanPropertyDialog dialog = new BeanPropertyDialog(HermesBrowser.getBrowser(), node.getBean(), false);
               dialog.pack();
               JideSwingUtilities.centerWindow(dialog);
               dialog.show();
            }
         }
View Full Code Here

Examples of hermes.browser.model.tree.AbstractTreeNode

   {
      super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);

      if (value instanceof AbstractTreeNode)
      {
         AbstractTreeNode node = (AbstractTreeNode) value;

         if (node.hasOpenIcon() && expanded)
         {
            setIcon(node.getOpenIcon());
         }
         else
         {
            setIcon(node.getIcon());
         }
      }
      else
      {
         if (expanded)
View Full Code Here

Examples of hermes.browser.model.tree.AbstractTreeNode

         HermesBrowser.getBrowser().getBrowserTree().getBrowserModel().nodesWereRemoved(hermesNode, index, objects);
      }
      else
      {
         AbstractTreeNode cleanup = destinationNode;
         do
         {
            AbstractTreeNode cleanupParent = (AbstractTreeNode) cleanup.getParent();
            int index = cleanupParent.getIndex(cleanup);
            cleanupParent.remove(cleanup);

            HermesBrowser.getBrowser().getBrowserTree().getBrowserModel().nodesWereRemoved(cleanupParent, new int[] { index }, new Object[] { cleanup });
            cleanup = cleanupParent;
         }
         while (cleanup.getChildCount() == 0 && cleanup instanceof DestinationFragmentTreeNode);
View Full Code Here

Examples of hermes.browser.model.tree.AbstractTreeNode

   public void actionPerformed(ActionEvent e)
   {
      try
      {
         final BrowseContextAction browseContext = (BrowseContextAction) HermesBrowser.getBrowser().getDocumentPane().getActiveDocument();
         final AbstractTreeNode node = (AbstractTreeNode) browseContext.getContextTree().getSelectionPath().getLastPathComponent();
         final String binding = JOptionPane.showInputDialog(HermesBrowser.getBrowser(), "Enter Binding", "");

         if (binding != null && !binding.equals(""))
         {
            if (node.getParent() instanceof ContextTreeNode)
            {
               ContextTreeNode contextNode = (ContextTreeNode) node.getParent();
               Context context = (Context) contextNode.getContextFactory().createContext().lookup(node.getPathFromRoot());
               context.rename(node.getId(), binding);
               context.close();

               Hermes.ui.getDefaultMessageSink().add(node.getId() + " renamed to " + binding);
            }
         }
      }
      catch (Throwable ex)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.