Examples of insertNodeInto()


Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

      addIndex = index;
      String[] values = s.split("\n");
      addCount = values.length;
      for (String value : values) {
        TreePath path = target.getPathForRow(index++);
        model.insertNodeInto(new DefaultMutableTreeNode(value), (MutableTreeNode) path.getLastPathComponent(), 0);
      }
    }

    // not working perfectly right, but good enough for testing.
    @Override
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

      public void onClick(final AjaxRequestTarget target)
      {
        treeTable.modelChanging();
        DefaultTreeModel model = (DefaultTreeModel)treeTable.getDefaultModelObject();
        model.removeNodeFromParent(c3);
        model.insertNodeInto(c3, c2, model.getChildCount(c2));
        treeTable.modelChanged();
        treeTable.nodeSelected(c2);
        treeTable.updateTree(target);
      }
    });
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

    DefaultMutableTreeNode c1 = new DefaultMutableTreeNode("c1");
    c2 = new DefaultMutableTreeNode("c2");
    c3 = new DefaultMutableTreeNode("c3");
    DefaultMutableTreeNode cc2 = new DefaultMutableTreeNode("cc2");
    DefaultTreeModel model = new DefaultTreeModel(root);
    model.insertNodeInto(c1, root, 0);
    model.insertNodeInto(c2, root, 1);
    model.insertNodeInto(cc2, c2, 0);
    model.insertNodeInto(c3, root, 2);
    return model;
  }
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

    c2 = new DefaultMutableTreeNode("c2");
    c3 = new DefaultMutableTreeNode("c3");
    DefaultMutableTreeNode cc2 = new DefaultMutableTreeNode("cc2");
    DefaultTreeModel model = new DefaultTreeModel(root);
    model.insertNodeInto(c1, root, 0);
    model.insertNodeInto(c2, root, 1);
    model.insertNodeInto(cc2, c2, 0);
    model.insertNodeInto(c3, root, 2);
    return model;
  }
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

    c3 = new DefaultMutableTreeNode("c3");
    DefaultMutableTreeNode cc2 = new DefaultMutableTreeNode("cc2");
    DefaultTreeModel model = new DefaultTreeModel(root);
    model.insertNodeInto(c1, root, 0);
    model.insertNodeInto(c2, root, 1);
    model.insertNodeInto(cc2, c2, 0);
    model.insertNodeInto(c3, root, 2);
    return model;
  }

View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

    DefaultMutableTreeNode cc2 = new DefaultMutableTreeNode("cc2");
    DefaultTreeModel model = new DefaultTreeModel(root);
    model.insertNodeInto(c1, root, 0);
    model.insertNodeInto(c2, root, 1);
    model.insertNodeInto(cc2, c2, 0);
    model.insertNodeInto(c3, root, 2);
    return model;
  }


}
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

            }

            if (parentNode != null) {
                DefaultTreeModel model = (DefaultTreeModel) getModel();
                int location = findNewFileLocation(parentNode, element);
                model.insertNodeInto(node, parentNode, location);
                repaint();
            }
        } catch (QuestEditorException ex) {
            // if the project isn't loaded, can not be happen
            ex.printStackTrace();
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

            }

            if (parentNode != null) {
                DefaultTreeModel model = (DefaultTreeModel) getModel();
                int location = findNewResourceLocation(parentNode, element);
                model.insertNodeInto(node, parentNode, location);
                repaint();
            }
        }

        repaint();
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

              int sort = parent.getIndex(dest);

              moveNode(srcItem.getId(), sort);

              tm.removeNodeFromParent(src);
              tm.insertNodeInto(src, parent, sort);

              logger.info("Set page sort " + srcItem.getId() + " to " + sort);
            }
          }
          else
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.insertNodeInto()

          else
          {
            reparentNode(srcItem.getId(), destItem.getId());

            tm.removeNodeFromParent(src);
            tm.insertNodeInto(src, dest, dest.getChildCount());

            logger.info("Set parent for page " + srcItem.getId() + " to " + destItem.getId());
          }
        }
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.