Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.TreeItem$ContentPanel


          List<Business> businesses= response.getBusinesses();
          System.out.println("Businesses=" + businesses);
         
          for (Business business : businesses) {
         
            TreeItem businessTree = new TreeItem(UDDIBrowser.images.business().getHTML() + " " + business.getName());
            businessTree.setStyleName("portlet-form-field-label");
            businessTree.setState(true);
            businessTree.setUserObject(business);
            TreeItem serviceTree = new TreeItem(UDDIBrowser.images.services().getHTML() + SERVICES_LABEL);
            serviceTree.setUserObject(business);
            for (Service service : business.getServices()) {
              TreeItem serviceItem = new TreeItem(UDDIBrowser.images.service().getHTML() + " " + service.getName());
              serviceItem.setStyleName("portlet-form-field-label");
              serviceItem.setUserObject(service);
              serviceTree.addItem(serviceItem);
              serviceTree.setTitle("Service:" +  service.getKey());
            }
            businessTree.addItem(serviceTree);
View Full Code Here


          List<Business> businesses= response.getBusinesses();
          System.out.println("Businesses=" + businesses);
         
          for (Business business : businesses) {
         
            TreeItem businessTree = new TreeItem(UDDIBrowser.images.business().getHTML() + " " + business.getName());
            businessTree.setStyleName("portlet-form-field-label");
            businessTree.setState(true);
            businessTree.setUserObject(business);
            TreeItem serviceTree = new TreeItem(UDDIBrowser.images.services().getHTML() + SERVICES_LABEL);
            serviceTree.setUserObject(business);
            for (Service service : business.getServices()) {
              TreeItem serviceItem = new TreeItem(UDDIBrowser.images.service().getHTML() + " " + service.getName());
              serviceItem.setStyleName("portlet-form-field-label");
              serviceItem.setUserObject(service);
              serviceTree.addItem(serviceItem);
              serviceTree.setTitle("Service:" +  service.getKey());
            }
            businessTree.addItem(serviceTree);
View Full Code Here

          for (Node node : nodes) {
            String statusImg = UDDIBrowser.images.down().getHTML();
            if ("Up".equals(node.getStatus())) {
              statusImg = UDDIBrowser.images.up().getHTML();
            }
            TreeItem nodeTree = new TreeItem(statusImg + " " + node.getName());
            nodeTree.setUserObject(node);
            nodeTree.setStyleName("portlet-form-field-label");
            nodeTree.setState(true);
            nodeTree.setUserObject(node);
           
            if (node.getStatus().startsWith("D")) {
              TreeItem statItem = new TreeItem(node.getStatus());
              statItem.setStyleName("portlet-form-field-label");
              statItem.setUserObject(node);
              nodeTree.addItem(statItem);
            }
           
            TreeItem descItem = new TreeItem(UDDIBrowser.images.description().getHTML() + " " + node.getDescription());
            descItem.setStyleName("portlet-form-field-label");
            descItem.setUserObject(node);
            nodeTree.addItem(descItem);
           
            for (Subscription subcription : node.getSubscriptions()) {
              TreeItem subcriptionItem = new TreeItem(UDDIBrowser.images.subscription().getHTML() + " "
                  + subcription.getSubscriptionKey());
              subcriptionItem.setStyleName("portlet-form-field-label");
              subcription.setNode(node);
              subcriptionItem.setUserObject(subcription);
              nodeTree.addItem(subcriptionItem);
            }

            subscriptionTree.addItem(nodeTree);
          }
View Full Code Here

        setStyleName( "analysis-Report" );
        setHTML( topicHtml );

        for ( AnalysisReportLine line : lines ) {
            TreeItem report = new TreeItem( new HTML( line.description ) );
            if ( line.reason != null ) {
                report.addItem( new TreeItem( new HTML( "<b>"
                                                        + constants.Reason()
                                                        + ":</b>&nbsp;"
                                                        + line.reason ) ) );
            }

            TreeItem impactedRules = doImpactedRules( line );
            report.addItem( impactedRules );

            if ( line.causes.length > 0 ) {
                TreeItem causes = doCauses( new HTML( "<b>"
                                                      + constants.Causes()
                                                      + ":</b>" ),
                                            line.causes );

                report.addItem( causes );
                causes.setState( true );
            }

            addItem( report );
        }
View Full Code Here

    }

    private TreeItem doImpactedRules(AnalysisReportLine line) {

        TreeItem impactedRules = new TreeItem( new HTML( "<b>"
                                                         + constants.ImpactedRules()
                                                         + ":</b>&nbsp;" ) );

        for ( final String ruleAssetGuid : line.impactedRules.keySet() ) {
            HorizontalPanel rule = new HorizontalPanel();
            rule.add(new Image(images.ruleAsset()));
            rule.add(new Label(line.impactedRules.get( ruleAssetGuid )));
           
            // TODO ruleAssetGuid is not a Asset UUID, but a delimited\tokenised
            // String returned from the drools-verifier framework. This String
            // is Guvnor-agnostic and needs to be transformed
            //
            // rule.addClickHandler( new ClickHandler() {
            // public void onClick(ClickEvent event) {
            // edit.open( ruleAssetGuid );
            // }
            // } );
            impactedRules.addItem( rule );
        }

        return impactedRules;
    }
View Full Code Here

    public void setRootItem( IsTreeItem treeItem ) {
        root = treeItem.asTreeItem();
    }

    public void add( ImageResource formatIcon, String formatText, ModuleFormatsGridPlace formatsPlace ) {
        TreeItem treeItem = new TreeItem( Util.getHeader(
                formatIcon,
                formatText ) );
        treeItem.setUserObject( formatsPlace );
        root.addItem( treeItem );
    }
View Full Code Here

    }

    private TreeItem doCauses(HTML title,
                              Cause[] causes) {

        TreeItem treeItem = new TreeItem( title );

        for ( Cause cause : causes ) {
            treeItem.addItem( doCauses( new HTML( cause.getCause() ),
                                        cause.getCauses() ) );
        }

        return treeItem;
    }
View Full Code Here

    }

    public void collapseAll() {
        Iterator<TreeItem> i = tree.treeItemIterator();
        while(i.hasNext()) {
            TreeItem ti = i.next();
            ti.setState( false );
        }
    }
View Full Code Here

    }
   
    public void expandAll() {
        Iterator<TreeItem> i = tree.treeItemIterator();
        while(i.hasNext()) {
            TreeItem ti = i.next();
            ti.setState( true, false );
        }
    }
View Full Code Here

    public void refreshTree() {
        //TODO: Generated code -Rikkola-
    }

    public void onSelection(SelectionEvent<TreeItem> event) {
        TreeItem item = event.getSelectedItem();

        if ( item.getUserObject() instanceof PackageConfigData ) {
            PackageConfigData pc = (PackageConfigData) item.getUserObject();
            String id = itemWidgets.get( item );


            if ( ExplorerNodeConfig.TEST_SCENARIOS_ID.equals( id ) ) {
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.TreeItem$ContentPanel

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.