Package com.gwtext.client.widgets.tree.event

Examples of com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter


                                                                                   childNode.setIcon( "images/category_small.gif" );
                                                                                   childNode.setText( current );

                                                                                   childNode.setUserObject( (path.equals( "/" )) ? current : path + "/" + current );
                                                                                   childNode.appendChild( new TreeNode( constants.PleaseWaitDotDotDot() ) );
                                                                                   childNode.addListener( new TreeNodeListenerAdapter() {
                                                                                       boolean expanding = false;

                                                                                       public void onExpand(Node node) {

                                                                                           if ( !expanding ) {
View Full Code Here


        if ( Preferences.getBooleanPref( "verifier" ) ) {
            treeNode.appendChild( analysis );
        }

        scenarios.addListener( new TreeNodeListenerAdapter() {
            public void onExpand(Node node) {

                RepositoryServiceFactory.getService().listPackages( new GenericCallback<PackageConfigData[]>() {
                    public void onSuccess(PackageConfigData[] conf) {
                        for ( int i = 0; i < conf.length; i++ ) {
                            final PackageConfigData c = conf[i];
                            TreeNode pkg = new TreeNode();
                            pkg.setText( c.name );
                            pkg.setIcon( "images/package.gif" ); //NON-NLS

                            scenarios.appendChild( pkg );
                            pkg.addListener( new TreeNodeListenerAdapter() {
                                public void onClick(Node node,
                                                    EventObject e) {
                                    if ( !centerPanel.showIfOpen( "scenarios" + c.uuid ) ) { //NON-NLS
                                        String m = Format.format( constants.ScenariosForPackage(),
                                                                  c.name );
                                        centerPanel.addTab( m,
                                                            true,
                                                            new ScenarioPackageView( c.uuid,
                                                                                     c.name,
                                                                                     edit,
                                                                                     centerPanel ),
                                                            "scenarios" + c.uuid ); //NON-NLS
                                    }
                                }
                            } );
                        }
                        scenarios.removeChild( scenarios.getFirstChild() );

                    }
                } );
            }

            public void onCollapse(Node node) {
                Node[] cs = node.getChildNodes();
                for ( int i = 0; i < cs.length; i++ ) {
                    node.removeChild( cs[i] );
                }
                node.appendChild( new TreeNode( constants.PleaseWaitDotDotDot() ) );
            }
        } );

        analysis.addListener( new TreeNodeListenerAdapter() {

            public void onExpand(Node node) {
                RepositoryServiceFactory.getService().listPackages( new GenericCallback<PackageConfigData[]>() {
                    public void onSuccess(PackageConfigData[] conf) {

                        for ( int i = 0; i < conf.length; i++ ) {
                            final PackageConfigData c = conf[i];
                            TreeNode pkg = new TreeNode();
                            pkg.setText( c.name );
                            pkg.setIcon( "images/package.gif" ); //NON-NLS

                            analysis.appendChild( pkg );
                            pkg.addListener( new TreeNodeListenerAdapter() {
                                public void onClick(Node node,
                                                    EventObject e) {
                                    if ( !centerPanel.showIfOpen( "analysis" + c.uuid ) ) { //NON-NLS
                                        final EditItemEvent edit = new EditItemEvent() {
                                            public void open(String key) {
View Full Code Here

        for (Map.Entry<String, String> e : pages.entrySet()) {
            final TreeNode tn = new TreeNode(e.getKey());
            tn.setId(e.getKey());
            tn.setAttribute("url", e.getValue());
            root.appendChild(tn);
            tn.addListener(new TreeNodeListenerAdapter() {
                @Override
                public void onClick(Node node, EventObject eventObject) {
                  if (!centertabbedPanel.showIfOpen(tn.getId())) {
                      centertabbedPanel.addTab(tn.getText(), true, openEmbedded(tn.getAttribute("url")), tn.getId());
                  }
View Full Code Here

        for (Map.Entry<String, String> e : pages.entrySet()) {
            final TreeNode tn = new TreeNode(e.getKey());
            tn.setId(e.getKey());
            tn.setAttribute("url", e.getValue());
            root.appendChild(tn);
            tn.addListener(new TreeNodeListenerAdapter() {
                @Override
                public void onClick(Node node, EventObject eventObject) {
                  if (!centertabbedPanel.showIfOpen(tn.getId())) {
                      centertabbedPanel.addTab(tn.getText(), true, openEmbedded(tn.getAttribute("url")), tn.getId());
                  }
View Full Code Here

  }

  private TreeNode addNode(final String title, String image, final ExplorerViewCenterPanel centertabbedPanel, final Widget content) {
    TreeNode browse = new TreeNode(title);
    if (image != null) browse.setIcon(image);
    browse.addListener(new TreeNodeListenerAdapter() {
      @Override

      public void onClick(Node node, EventObject e) {
        if (!centertabbedPanel.showIfOpen(title)) {
          centertabbedPanel.addTab(title, true, content, title);
View Full Code Here

                                                                                   childNode.setIcon( "images/category_small.gif" );
                                                                                   childNode.setText( current );

                                                                                   childNode.setUserObject( (path.equals( "/" )) ? current : path + "/" + current );
                                                                                   childNode.appendChild( new TreeNode( constants.PleaseWaitDotDotDot() ) );
                                                                                   childNode.addListener( new TreeNodeListenerAdapter() {
                                                                                       boolean expanding = false;

                                                                                       public void onExpand(Node node) {

                                                                                           if ( !expanding ) {
View Full Code Here

        if ( Preferences.getBooleanPref( "verifier" ) ) {
            treeNode.appendChild( analysis );
        }

        scenarios.addListener( new TreeNodeListenerAdapter() {
            public void onExpand(Node node) {

                RepositoryServiceFactory.getService().listPackages( new GenericCallback<PackageConfigData[]>() {
                    public void onSuccess(PackageConfigData[] conf) {
                        for ( int i = 0; i < conf.length; i++ ) {
                            final PackageConfigData c = conf[i];
                            TreeNode pkg = new TreeNode();
                            pkg.setText( c.name );
                            pkg.setIcon( "images/package.gif" ); //NON-NLS

                            scenarios.appendChild( pkg );
                            pkg.addListener( new TreeNodeListenerAdapter() {
                                public void onClick(Node node,
                                                    EventObject e) {
                                    if ( !centerPanel.showIfOpen( "scenarios" + c.uuid ) ) { //NON-NLS
                                        String m = Format.format( constants.ScenariosForPackage(),
                                                                  c.name );
                                        centerPanel.addTab( m,
                                                            true,
                                                            new ScenarioPackageView( c.uuid,
                                                                                     c.name,
                                                                                     edit,
                                                                                     centerPanel ),
                                                            "scenarios" + c.uuid ); //NON-NLS
                                    }
                                }
                            } );
                        }
                        scenarios.removeChild( scenarios.getFirstChild() );

                    }
                } );
            }

            public void onCollapse(Node node) {
                Node[] cs = node.getChildNodes();
                for ( int i = 0; i < cs.length; i++ ) {
                    node.removeChild( cs[i] );
                }
                node.appendChild( new TreeNode( constants.PleaseWaitDotDotDot() ) );
            }
        } );

        analysis.addListener( new TreeNodeListenerAdapter() {

            public void onExpand(Node node) {
                RepositoryServiceFactory.getService().listPackages( new GenericCallback<PackageConfigData[]>() {
                    public void onSuccess(PackageConfigData[] conf) {

                        for ( int i = 0; i < conf.length; i++ ) {
                            final PackageConfigData c = conf[i];
                            TreeNode pkg = new TreeNode();
                            pkg.setText( c.name );
                            pkg.setIcon( "images/package.gif" ); //NON-NLS

                            analysis.appendChild( pkg );
                            pkg.addListener( new TreeNodeListenerAdapter() {
                                public void onClick(Node node,
                                                    EventObject e) {
                                    if ( !centerPanel.showIfOpen( "analysis" + c.uuid ) ) { //NON-NLS
                                        final EditItemEvent edit = new EditItemEvent() {
                                            public void open(String key) {
View Full Code Here

        add(bogusPanel);

        updateButtonStates();
        if (nodeListener == null) {
            //listener for click on the comment icon to display notes
            nodeListener = new TreeNodeListenerAdapter() {

                //TODO: this functionality is similar to that found in AbstractFieldWidget and
                @Override
                public boolean doBeforeClick(final Node node, final EventObject e) {
View Full Code Here

  }

  private TreeNode addNode(final String title, String image, final ExplorerViewCenterPanel centertabbedPanel, final Widget content) {
    TreeNode browse = new TreeNode(title);
    if (image != null) browse.setIcon(image);
    browse.addListener(new TreeNodeListenerAdapter() {
      @Override

      public void onClick(Node node, EventObject e) {
        if (!centertabbedPanel.showIfOpen(title)) {
          centertabbedPanel.addTab(title, true, content, title);
View Full Code Here

                childNode.setIcon("images/category_small.gif");
                childNode.setText(current);

                childNode.setUserObject((path.equals("/")) ? current : path + "/" + current);
                childNode.appendChild(new TreeNode(constants.PleaseWaitDotDotDot()));
                childNode.addListener(new TreeNodeListenerAdapter() {
                  boolean expanding = false;

                  public void onExpand(Node node) {

                    if (!expanding) {
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter

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.