Package javax.swing.event

Examples of javax.swing.event.TreeWillExpandListener


        }
    }
   
    private void doAddTreeExpandListener()
    {
        m_tree.addTreeWillExpandListener(new TreeWillExpandListener()
        {
            public void treeWillExpand(TreeExpansionEvent evthrows ExpandVetoException
            {
                doExpandTree(ev);
            }
View Full Code Here


      });
    receiversTree.expandPath(
      new TreePath(model.getPathToRoot(model.RootNode)));

    receiversTree.addTreeWillExpandListener(
      new TreeWillExpandListener() {
        public void treeWillCollapse(TreeExpansionEvent event)
          throws ExpandVetoException {
          if (event.getPath().getLastPathComponent() == model.RootNode) {
            throw new ExpandVetoException(event);
          }
View Full Code Here

        }
       
       
        public void addTreeExpandListener(){
            jTree.addTreeWillExpandListener(
                new TreeWillExpandListener() {
                    public void treeWillExpand(javax.swing.event.TreeExpansionEvent event) throws javax.swing.tree.ExpandVetoException {
                        SwingTreePathProvider oSwingTreePathProvider = new SwingTreePathProvider(event.getPath());
                        XUnoNode oUnoNode = oSwingTreePathProvider.getLastPathComponent();
                        if (!m_oInspectorPane.expandNode(oUnoNode, oSwingTreePathProvider)){
                            throw new ExpandVetoException(event);
View Full Code Here

      });
    receiversTree.expandPath(
      new TreePath(model.getPathToRoot(model.RootNode)));

    receiversTree.addTreeWillExpandListener(
      new TreeWillExpandListener() {
        public void treeWillCollapse(TreeExpansionEvent event)
          throws ExpandVetoException {
          if (event.getPath().getLastPathComponent() == model.RootNode) {
            throw new ExpandVetoException(event);
          }
View Full Code Here

            public void treeWillExpand(TreeExpansionEvent e) throws ExpandVetoException {
            }
        }
        ;
        TreeWillExpandListener TreeWillExpandListener1 = new ConcreteTreeWillExpandListener();
        TreeWillExpandListener TreeWillExpandListener2 = new ConcreteTreeWillExpandListener();
        TreeWillExpandListener TreeWillExpandListener3 = new ConcreteTreeWillExpandListener();
        EventListener[] listenersArray = null;
        listenersArray = tree.getTreeWillExpandListeners();
        int initialValue = listenersArray.length;
        tree.addTreeWillExpandListener(TreeWillExpandListener1);
        tree.addTreeWillExpandListener(TreeWillExpandListener2);
View Full Code Here

                collapseMarker.setAuxiliary(event);
            }
        });
        final Marker willExpandMarker = new Marker();
        final Marker willCollapseMarker = new Marker();
        tree.addTreeWillExpandListener(new TreeWillExpandListener() {
            public void treeWillExpand(final TreeExpansionEvent event)
                    throws ExpandVetoException {
                willExpandMarker.setOccurred();
                willExpandMarker.setAuxiliary(event);
            }
View Full Code Here

        assertFalse(tree.isExpanded(unexistedPath));
        tree.setExpandedState(path111, false);
        assertTrue(tree.isExpanded(path1));
        assertTrue(tree.isExpanded(path11));
        assertFalse(tree.isExpanded(path111));
        tree.addTreeWillExpandListener(new TreeWillExpandListener() {
            public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
                throw new ExpandVetoException(event);
            }

            public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
            }
        });
        tree.setExpandedState(path111, true);
        assertTrue(tree.isExpanded(path1));
        assertTrue(tree.isExpanded(path11));
        assertFalse(tree.isExpanded(path111));
        tree.addTreeWillExpandListener(new TreeWillExpandListener() {
            public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
            }

            public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
                throw new ExpandVetoException(event);
View Full Code Here

        // Listen for expand/collapse so we can redraw ourselves
        // TF:24/06/2008:Extracted this code into a named variable
        this.tree.addTreeExpansionListener(expansionListener);

        // Disable the collapse if the controls are hidden.  CraigM 03/10/2007.
        this.tree.addTreeWillExpandListener(new TreeWillExpandListener() {
            public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
                if (OutlineField.this.isControlsDisplayed() == false) {
                    ExpandVetoException errorVar = new ExpandVetoException(event);
                    ErrorMgr.addError(errorVar);
                    throw errorVar;
View Full Code Here

            }
          }
        });
       
        // In forte, trees could never be expanded if they didn't have children
        this.addTreeWillExpandListener(new TreeWillExpandListener() {
      /*
       * (non-Javadoc)
       *
       * @see javax.swing.event.TreeWillExpandListener#treeWillCollapse(javax.swing.event.TreeExpansionEvent)
       */
 
View Full Code Here

        // Listen for expand/collapse so we can redraw ourselves
        // TF:24/06/2008:Extracted this code into a named variable
        this.tree.addTreeExpansionListener(expansionListener);

        // Disable the collapse if the controls are hidden.  CraigM 03/10/2007.
        this.tree.addTreeWillExpandListener(new TreeWillExpandListener() {
            public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
                if (OutlineField.this.isControlsDisplayed() == false) {
                    ExpandVetoException errorVar = new ExpandVetoException(event);
                    ErrorMgr.addError(errorVar);
                    throw errorVar;
View Full Code Here

TOP

Related Classes of javax.swing.event.TreeWillExpandListener

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.