Package javax.swing.tree

Examples of javax.swing.tree.ExpandVetoException


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

        public void treeWillExpand(TreeExpansionEvent event)
          throws ExpandVetoException {
View Full Code Here


                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);
                        }
                    }

                    public void treeWillCollapse( javax.swing.event.TreeExpansionEvent evt) throws javax.swing.tree.ExpandVetoException {
                    }
View Full Code Here

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

        public void treeWillExpand(TreeExpansionEvent event)
          throws ExpandVetoException {
View Full Code Here

        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);
            }
        });
        tree.setExpandedState(path11, false);
        assertTrue(tree.isExpanded(path1));
        assertTrue(tree.isExpanded(path11));
View Full Code Here

        // 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;
                }
            }
            public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
View Full Code Here

       * @see javax.swing.event.TreeWillExpandListener#treeWillCollapse(javax.swing.event.TreeExpansionEvent)
       */
      public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
        // CraigM:12/06/2008 - Don't allow expand / collapse if we are inactive
        if (WidgetState.get(TreeViewWidget.this) == Constants.FS_INACTIVE) {
          throw new ExpandVetoException(event);
        }
      }

      /* (non-Javadoc)
       * @see javax.swing.event.TreeWillExpandListener#treeWillExpand(javax.swing.event.TreeExpansionEvent)
       */
      public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
        // CraigM:12/06/2008 - Don't allow expand / collapse if we are inactive
        if (WidgetState.get(TreeViewWidget.this) == Constants.FS_INACTIVE) {
          throw new ExpandVetoException(event);
        }

        Object node = event.getPath().getLastPathComponent();
        if (node instanceof DisplayNode) {
          if (((DisplayNode) node).isLeaf()) {
            ExpandVetoException errorVar = new ExpandVetoException(event);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

        // 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;
                }
            }
            public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
View Full Code Here

       * @see javax.swing.event.TreeWillExpandListener#treeWillCollapse(javax.swing.event.TreeExpansionEvent)
       */
      public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
        // CraigM:12/06/2008 - Don't allow expand / collapse if we are inactive
        if (WidgetState.get(TreeViewWidget.this) == Constants.FS_INACTIVE) {
          throw new ExpandVetoException(event);
        }
      }

      /* (non-Javadoc)
       * @see javax.swing.event.TreeWillExpandListener#treeWillExpand(javax.swing.event.TreeExpansionEvent)
       */
      public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
        // CraigM:12/06/2008 - Don't allow expand / collapse if we are inactive
        if (WidgetState.get(TreeViewWidget.this) == Constants.FS_INACTIVE) {
          throw new ExpandVetoException(event);
        }

        Object node = event.getPath().getLastPathComponent();
        if (node instanceof DisplayNode) {
          if (((DisplayNode) node).isLeaf()) {
            ExpandVetoException errorVar = new ExpandVetoException(event);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

        // 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;
                }
            }
            public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
View Full Code Here

       * @see javax.swing.event.TreeWillExpandListener#treeWillCollapse(javax.swing.event.TreeExpansionEvent)
       */
      public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
        // CraigM:12/06/2008 - Don't allow expand / collapse if we are inactive
        if (WidgetState.get(TreeViewWidget.this) == Constants.FS_INACTIVE) {
          throw new ExpandVetoException(event);
        }
      }

      /* (non-Javadoc)
       * @see javax.swing.event.TreeWillExpandListener#treeWillExpand(javax.swing.event.TreeExpansionEvent)
       */
      public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
        // CraigM:12/06/2008 - Don't allow expand / collapse if we are inactive
        if (WidgetState.get(TreeViewWidget.this) == Constants.FS_INACTIVE) {
          throw new ExpandVetoException(event);
        }

        Object node = event.getPath().getLastPathComponent();
        if (node instanceof DisplayNode) {
          if (((DisplayNode) node).isLeaf()) {
            ExpandVetoException errorVar = new ExpandVetoException(event);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

TOP

Related Classes of javax.swing.tree.ExpandVetoException

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.