Package javax.swing.event

Examples of javax.swing.event.TreeExpansionListener


            public void treeExpanded(TreeExpansionEvent e) {
            }
        }
        ;
        TreeExpansionListener TreeExpansionListener1 = new ConcreteTreeExpansionListener();
        TreeExpansionListener TreeExpansionListener2 = new ConcreteTreeExpansionListener();
        TreeExpansionListener TreeExpansionListener3 = new ConcreteTreeExpansionListener();
        EventListener[] listenersArray = null;
        listenersArray = tree.getTreeExpansionListeners();
        int initialValue = listenersArray.length;
        tree.addTreeExpansionListener(TreeExpansionListener1);
        tree.addTreeExpansionListener(TreeExpansionListener2);
View Full Code Here


    }

    public void testFireTreeExpandedCollapsedWillExpandCollapse() throws Exception {
        final Marker expandMarker = new Marker();
        final Marker collapseMarker = new Marker();
        tree.addTreeExpansionListener(new TreeExpansionListener() {
            public void treeExpanded(final TreeExpansionEvent event) {
                expandMarker.setOccurred();
                expandMarker.setAuxiliary(event);
            }
View Full Code Here

      public void treeWillExpand(TreeExpansionEvent event) {
      }
    });

    tree.addTreeExpansionListener(new TreeExpansionListener() {
      public void treeCollapsed(TreeExpansionEvent event) {
      }

      public void treeExpanded(TreeExpansionEvent event) {
        TreePath path = event.getPath();
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

    tree = new JTree(model);
   
    tree.expandRow(0);
    tree.setVisibleRowCount(15);
   
    tree.addTreeExpansionListener(new TreeExpansionListener() {

      @Override
      public void treeExpanded(TreeExpansionEvent e) {

        expanded.add(e.getPath());
View Full Code Here

    tree = new JTree(model);

    tree.expandRow(0);
    tree.setVisibleRowCount(15);

    tree.addTreeExpansionListener(new TreeExpansionListener() {

      @Override
      public void treeExpanded(TreeExpansionEvent e) {

        expanded.add(e.getPath());
View Full Code Here

      setEditable(false);
      setAutoscrolls(true);
      setRootVisible(true);
      setShowsRootHandles(false);
      setScrollsOnExpand(true);
      addTreeExpansionListener(new TreeExpansionListener() {
         public void treeExpanded(TreeExpansionEvent e) {
            browser_treeExpanded(e);
         }

         public void treeCollapsed(TreeExpansionEvent e) {
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.