Package javax.swing

Examples of javax.swing.JTree


    {
    }

    private void createPopupMenu(final MouseEvent e)
    {
      final JTree tree = getTree();
      final ReportDesignerContext context = getReportDesignerContext();
      if (context.getActiveContext() == null)
      {
        return;
      }

      final TreePath path = tree.getPathForLocation(e.getX(), e.getY());
      if (path == null)
      {
        return;
      }
      if (tree.getSelectionModel().isPathSelected(path) == false)
      {
        tree.getSelectionModel().setSelectionPath(path);
      }

      final Object o = path.getLastPathComponent();
      final JPopupMenu pop = ContextMenuUtility.getMenu(context, o);
      if (pop == null)
View Full Code Here


  model = new ExplorerTreeModel(root);

  /*
   * Create JTree to display object/broker admin objects
   */
        tree = new JTree(model);
        tree.getSelectionModel().setSelectionMode
                (TreeSelectionModel.SINGLE_TREE_SELECTION);

        tree.addTreeSelectionListener(this);

View Full Code Here

    final DefaultTreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
    selectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    selectionModel.addTreeSelectionListener(new ExpressionSelectionHandler());

    expressionsTree = new JTree(ExpressionsTreeModel.getTreeModel());
    expressionsTree.setRootVisible(false);
    expressionsTree.setSelectionModel(selectionModel);
    expressionsTree.addMouseListener(new DblClickHandler());
    expressionsTree.setCellRenderer(new ExpressionTreeCellRenderer());
View Full Code Here

      list.getSelectionModel().clearSelection();
      list.repaint();
    }
    else if (owner instanceof JTree)
    {
      final JTree list = (JTree) owner;
      list.clearSelection();
      list.repaint();
    }
    else
    {
      final ReportDocumentContext activeContext = getActiveContext();
      if (activeContext != null)
View Full Code Here

      list.getSelectionModel().setSelectionInterval(0, list.getModel().getSize());
      list.repaint();
    }
    else if (owner instanceof JTree)
    {
      final JTree list = (JTree) owner;
      final int[] indices = new int[list.getRowCount()];
      for (int i = 0; i < indices.length; i++)
      {
        indices[i] = i;
      }
      list.setSelectionRows(indices);
      list.repaint();
    }
    else if (owner instanceof RootBandRenderComponent)
    {
      final RootBandRenderComponent rc = (RootBandRenderComponent) owner;
      final Section reportElement = rc.getRendererRoot().getElement();
View Full Code Here

  public ProvisionDataSourcePanel()
  {
    availableDataSourcesModel = new DataFactoryTreeModel();

    availableDataSources = new JTree(availableDataSourcesModel);
    availableDataSources.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    availableDataSources.setCellRenderer(new DataFactoryTreeCellRenderer());
    availableDataSources.setRootVisible(false);

    init();
View Full Code Here

    rootContent.add(placeHolder, BorderLayout.NORTH);

    final DemoSelectorTreeNode root = new DemoSelectorTreeNode(null,
        demoSelector);
    final DefaultTreeModel model = new DefaultTreeModel(root);
    final JTree demoTree = new JTree(model);
    demoTree.addTreeSelectionListener(new TreeSelectionHandler());

    JSplitPane rootSplitPane =
        new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
            new JScrollPane(demoTree), rootContent);
    rootSplitPane.setContinuousLayout(true);
View Full Code Here

    treeModel = new ConfigTreeModel(packageManager, includeGlobals);

    final TreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
    selectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

    tree = new JTree(treeModel);
    tree.setSelectionModel(selectionModel);
    tree.setCellRenderer(new ConfigTreeRenderer());
    tree.setRootVisible(false);
    tree.setShowsRootHandles(true);
    tree.addTreeSelectionListener(new ModuleTreeSelectionHandler());
View Full Code Here

      panel_2.add(scriptRunBtn);

      JScrollPane scrollPane_2 = new JScrollPane();
      panel_1.add(scrollPane_2, BorderLayout.CENTER);

      scriptTree = new JTree();
      scriptTree.setFont(new Font("SansSerif", Font.PLAIN, 10));
      scriptTree.addTreeSelectionListener(new TreeSelectionListener() {
        public void valueChanged(TreeSelectionEvent e) {
          if (tinaController != null) {
            tinaController.getJwfScriptController().scriptPropertiesTree_changed(e);
View Full Code Here

      panel_42.setLayout(new BorderLayout(0, 0));

      JScrollPane scrollPane_2 = new JScrollPane();
      panel_42.add(scrollPane_2, BorderLayout.CENTER);

      dancingFlamesFlamePropertiesTree = new JTree();
      dancingFlamesFlamePropertiesTree.addTreeSelectionListener(new TreeSelectionListener() {
        public void valueChanged(TreeSelectionEvent e) {
          if (tinaController != null) {
            tinaController.getDancingFractalsController().flamePropertiesTree_changed(e);
          }
View Full Code Here

TOP

Related Classes of javax.swing.JTree

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.