Package javax.swing.event

Examples of javax.swing.event.TreeModelListener


   */
  private void fireTreeModelChanged()
  {
    for (int i = 0; i < listeners.size(); i++)
    {
      final TreeModelListener l = (TreeModelListener) listeners.get(i);
      l.treeStructureChanged(new TreeModelEvent(this, new TreePath(root)));
    }
  }
View Full Code Here


  public void optionHasChanged() {
    rejectedPaths.clear();
    acceptedPaths.clear();
    final Iterator it = this.listener.iterator();
    while (it.hasNext()) {
      TreeModelListener current = (TreeModelListener) it.next();
      current.treeStructureChanged(new TreeModelEvent(this, new TreePath(
          getRoot())));
    }
  }
View Full Code Here

     * Initialize the treetable. Addition of various listeners, tree's icons,
     */
    void initTreeTable() {
        clickPoint = null;
        getProject().getTaskCustomColumnManager().addCustomColumnsListener(this);
        getTreeTableModel().addTreeModelListener(new TreeModelListener() {
      public void treeNodesChanged(TreeModelEvent arg0) {
      }

      public void treeNodesInserted(TreeModelEvent arg0) {
      }
View Full Code Here

    /** {@inheritDoc} */
    public void listChanged(ListEvent<E> listChanges) {
        // todo: fire a more general event
        for(Iterator<TreeModelListener> i = listenerList.iterator(); i.hasNext(); ) {
            TreeModelListener listener = i.next();
            listener.treeStructureChanged(new TreeModelEvent(this, new Object[] { treeRoot }));
        }
    }
View Full Code Here

    // Installs a TreeModelListener that can update the table when
    // the tree changes. We use delayedFireTableDataChanged as we can
    // not be guaranteed the tree will have finished processing
    // the event before us.
    treeTableModel.addTreeModelListener(new TreeModelListener() {
      public void treeNodesChanged(TreeModelEvent e) {
        delayedFireTableDataChanged();
      }

      public void treeNodesInserted(TreeModelEvent e) {
View Full Code Here

    pluginRegistry.addPluginListener(model);
    receiversTree.setModel(model);

    receiversTree.setExpandsSelectedPaths(true);
    model.addTreeModelListener(
      new TreeModelListener() {
        public void treeNodesChanged(TreeModelEvent e) {
          expandRoot();
        }

        public void treeNodesInserted(TreeModelEvent e) {
View Full Code Here

            }
          }
        };
        jTree.addMouseListener(ml);

        TreeModelListener treeModelListener = new TreeModelListener() {

          public void treeNodesChanged(TreeModelEvent e) {
            // TODO Auto-generated method stub

          }
View Full Code Here

    }
  }

  private void notifyTreeStructureChanged()
  {
    TreeModelListener l;
    Object[] path = {this.root};
    TreeModelEvent e = new TreeModelEvent(this,path);
    Iterator it = listeners.iterator();
    while(it.hasNext())
    {
      l = (TreeModelListener)it.next();
      l.treeStructureChanged(e);
    }
  }
View Full Code Here

    }
  }

  private void notifyUpdate(SortedTreeNode node)
  {
    TreeModelListener l;
    TreeModelEvent e = new TreeModelEvent(this,node.getPath().toArray(),new int[]{node.getParent().indexOf(node)},new Object[]{node});
    Iterator it = listeners.iterator();
    while(it.hasNext())
    {
      l = (TreeModelListener)it.next();
      l.treeNodesChanged(e);
    }
  }
View Full Code Here

    }
  }

  private void notifyInsert(Object[] path, Object[] children)
  {
    TreeModelListener l;
    int[] indices = new int[children.length];
    for (int i=0;i<indices.length;i++)
    {
      indices[i] = ((SortedTreeNode)path[path.length-1]).indexOf((SortedTreeNode)children[i]);
    }
    TreeModelEvent e = new TreeModelEvent(this,path,indices,children);
    Iterator it = listeners.iterator();
    while(it.hasNext())
    {
      l = (TreeModelListener)it.next();
      l.treeNodesInserted(e);
    }
  }
View Full Code Here

TOP

Related Classes of javax.swing.event.TreeModelListener

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.