Package javax.swing.event

Examples of javax.swing.event.TreeExpansionListener


      }
    });

    mExpandListenerIsEnabled = true;

    addTreeExpansionListener(new TreeExpansionListener() {
      public void treeCollapsed(TreeExpansionEvent e) {
        if(e.getPath() != null && mExpandListenerIsEnabled) {
          ((FavoriteNode)e.getPath().getLastPathComponent()).setWasExpanded(false);
        }
      }
View Full Code Here


        // }
        //           
        // });

        this.getTreeTable().getTree().addTreeExpansionListener(
                new TreeExpansionListener() {
                    public void treeExpanded(TreeExpansionEvent arg0) {
                        Mediator.getGanttProjectSingleton().repaint2();

                    }
View Full Code Here

    }

    // Remember expanded states for namespace nodes
    private void addExpansionListener() {
        addTreeExpansionListener(
            new TreeExpansionListener() {
                public void treeExpanded(TreeExpansionEvent event) {
                    setPreference(event, true);
                }
                public void treeCollapsed(TreeExpansionEvent event) {
                    setPreference(event, false);
View Full Code Here

  public TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree) {
    this.tree = tree;
    this.treeTableModel = treeTableModel;

    tree.addTreeExpansionListener(new TreeExpansionListener() {
      // Don't use fireTableRowsInserted() here; the selection model
      // would get updated twice.
      public void treeExpanded(TreeExpansionEvent event) {
        fireTableDataChanged();
      }
View Full Code Here

  public ObjectExplorer() {
    setCellRenderer(new MonitorTreeCellRenderer());
    buildTree();

    addTreeExpansionListener(new TreeExpansionListener() {
      public void treeExpanded(TreeExpansionEvent event) {
        Runnable r = deferred.get(event.getPath().getLastPathComponent());
        if (r != null) r.run();
      }
View Full Code Here

    public TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree) {
        this.tree = tree;
        this.treeTableModel = treeTableModel;

  tree.addTreeExpansionListener(new TreeExpansionListener() {
      // Don't use fireTableRowsInserted() here; the selection model
      // would get updated twice.
      public void treeExpanded(TreeExpansionEvent event) { 
        fireTableDataChanged();
      }
View Full Code Here

        TreeTableModelAdapter(JTree tree) {
            assert tree != null;

            this.tree = tree; // need tree to implement getRowCount()
            tree.getModel().addTreeModelListener(getTreeModelListener());
            tree.addTreeExpansionListener(new TreeExpansionListener() {
                // Don't use fireTableRowsInserted() here; the selection model
                // would get updated twice.
                public void treeExpanded(TreeExpansionEvent event) {
                    updateAfterExpansionEvent(event);
                }
View Full Code Here

    public TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree) {
        this.tree = tree;
        this.treeTableModel = treeTableModel;

        tree.addTreeExpansionListener(new TreeExpansionListener() {
            // Don't use fireTableRowsInserted() here;
            // the selection model would get  updated twice.
            public void treeExpanded(TreeExpansionEvent event) {
                fireTableDataChanged();
            }
View Full Code Here

    public TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree) {
        this.tree = tree;
        this.treeTableModel = treeTableModel;

        tree.addTreeExpansionListener(new TreeExpansionListener() {
            // Don't use fireTableRowsInserted() here; the selection model
            // would get updated twice.
            public void treeExpanded(TreeExpansionEvent event) {
              fireTableDataChanged();
            }
View Full Code Here

    public TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree) {
        this.tree = tree;
        this.treeTableModel = treeTableModel;

        tree.addTreeExpansionListener(new TreeExpansionListener() {
            // Don't use fireTableRowsInserted() here; the selection model
            // would get updated twice.
            public void treeExpanded(TreeExpansionEvent event) {
              fireTableDataChanged();
            }
View Full Code Here

TOP

Related Classes of javax.swing.event.TreeExpansionListener

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.