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

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


    public static Tree getQAStructure( final Map<TreeItem, String> itemWidgets ) {
        Tree tree = new Tree();
        tree.setAnimationEnabled( true );

        final TreeItem scenarios = new TreeItem( Util.getHeader( images.testManager(), constants.TestScenariosInPackages() ) );
        scenarios.addItem( new TreeItem( constants.PleaseWaitDotDotDot() ) );
        tree.addItem( scenarios );
        itemWidgets.put( scenarios, TEST_SCENARIOS_ROOT_ID );

        final TreeItem analysis = new TreeItem( Util.getHeader( images.analyze(), constants.Analysis() ) );
        analysis.addItem( new TreeItem( constants.PleaseWaitDotDotDot() ) );
        itemWidgets.put( analysis, ANALYSIS_ROOT_ID );

        if ( ApplicationPreferences.showVerifier() ) {
            tree.addItem( analysis );
        }
View Full Code Here


       
        FormStyleLayout layout = new FormStyleLayout();

        Tree tree = new Tree();

        TreeItem errors = doMessageLines( constants.Errors(),
                                          images.error(),
                                          report.errors );
        tree.addItem( errors );

        TreeItem warnings = doMessageLines( constants.Warnings(),
                                            images.warning(),
                                            report.warnings );
        tree.addItem( warnings );

        TreeItem notes = doMessageLines( constants.Notes(),
                                         images.note(),
                                         report.notes );
        tree.addItem( notes );

        if ( showFactUsage ) {
View Full Code Here

    private TreeItem doMessageLines(String messageType,
                                    ImageResource icon,
                                    AnalysisReportLine[] lines) {

        TreeItem linesItem;

        String summary = constants.analysisResultSummary(messageType, lines.length );

        String topicHtml = "<img src='" + icon.getURL() + "' /> &nbsp; " + summary;
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 void doFacts(AnalysisFactUsage[] factUsages) {
        for ( AnalysisFactUsage factUsage : factUsages ) {

            TreeItem fact = new TreeItem( "<img src='" + new Image( images.fact() ).getUrl() + "'/>" + factUsage.name );
            TreeItem fieldList = doFields( factUsage.fields );
            fact.addItem( fieldList );
            fieldList.setState( true );

            addItem( fact );
            fact.setState( true );
        }
    }
View Full Code Here

            fact.setState( true );
        }
    }

    private TreeItem doFields(AnalysisFieldUsage[] fields) {
        TreeItem fieldList = new TreeItem( constants.FieldsUsed() );

        for ( AnalysisFieldUsage fieldUsage : fields ) {
            TreeItem field = new TreeItem( "<img src='" + images.field().getURL() + "'/>" + fieldUsage.name );
            fieldList.addItem( field );
            TreeItem ruleList = doAffectedRules( fieldUsage );
            field.addItem( ruleList );
            field.setState( true );
        }

        return fieldList;
View Full Code Here

        return fieldList;
    }

    private TreeItem doAffectedRules(AnalysisFieldUsage fieldUsage) {
        TreeItem ruleList = new TreeItem( constants.ShowRulesAffected() );
        ruleList.setUserObject( new HTML( constants.RulesAffected() ) );
        for ( String ruleName : fieldUsage.rules ) {
            ruleList.addItem( new TreeItem( "<img src='" + images.ruleAsset().getURL() + "'/>" + ruleName ) );
        }
        return ruleList;
    }
View Full Code Here

   
    Iterator methodIterator = methods.iterator();   
    while (methodIterator.hasNext()) {
      MethodNode method = (MethodNode) methodIterator.next();
      MethodItem methodItem = new MethodItem(method, method.getParent(), parentTreeItem, requestString);
      TreeItem methodTreeItem = new TreeItem(methodItem);     
      methodTreeItem.setUserObject(WadlXml.methodNode);
      parentTreeItem.addItem(methodTreeItem);    
     
      if (method.getHref() == null) {
        // request
        RequestItem.listRequest(method, methodTreeItem);
       
        // response
        ResponseItem.listResponse(method, methodTreeItem);
      
        // close method item
        GenericClosingItem methodCloseItem = new GenericClosingItem(WadlXml.methodNode);
        TreeItem methodCloseTreeItem = new TreeItem(methodCloseItem);
        methodCloseTreeItem.setUserObject(WadlXml.methodNode);
        parentTreeItem.addItem(methodCloseTreeItem);
      }
      methodTreeItem.setState(SettingsDialog.treeItemsAlwaysOpen);     
    }
       
    if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.methodNode)) {     
      // add method button     
      HorizontalPanel addMethodPanel = new HorizontalPanel();
           
      Button addMethodButton = new Button(GuiFactory.strings.addMethod());
      addMethodButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          if (parentNode instanceof ResourceNode) {
            ((ResourceNode) parentNode).directlyAddMethod(new MethodNode(GuiFactory.strings.newMethod(), (GenericNode) parentNode, ((GenericNode) parentNode).getApplication()));
            listMethods(parentNode, parentTreeItem, requestString);
          }
          else if (parentNode instanceof ApplicationNode) {
            MethodNode method = new MethodNode(GuiFactory.strings.newMethod(), (GenericNode) parentNode, (ApplicationNode) parentNode);
            method.setId(GuiFactory.strings.newId());
            ((ApplicationNode) parentNode).directlyAddMethod(method);
            listMethods(parentNode, parentTreeItem, requestString);
          }
          else if (parentNode instanceof ResourceTypeNode) {
            ((ResourceTypeNode) parentNode).directlyAddMethod(new MethodNode(GuiFactory.strings.newMethod(), (GenericNode) parentNode, ((GenericNode) parentNode).getApplication()));
            listMethods(parentNode, parentTreeItem, requestString);
          }         
        }
      });
      addMethodPanel.add(addMethodButton);
      TreeItem addMethodTreeItem = new TreeItem(addMethodPanel);
      addMethodTreeItem.setUserObject(ApplicationItem.button + WadlXml.methodNode);
      parentTreeItem.addItem(addMethodTreeItem);
    }
   
    WadlTreeRoot.addButtons(buttonTreeItems, parentTreeItem);
   
View Full Code Here

    Vector buttonTreeItems = WadlTreeRoot.removeChildrenXKeepButtons(applicationTreeItem, WadlXml.grammarsNode);
   
    if ((application.getGrammars() != null) && (application.getGrammars().getAllIncludes().size() > 0)) {
      GrammarsNode grammars = application.getGrammars();
      GrammarsItem grammarsItem = new GrammarsItem(grammars, applicationTreeItem);
      TreeItem grammarsTreeItem = new TreeItem(grammarsItem);
      grammarsTreeItem.setUserObject(WadlXml.grammarsNode);
      applicationTreeItem.addItem(grammarsTreeItem);
      final VerticalPanel includePanel = new VerticalPanel();     
     
      // include items     
      grammarsTreeItem.addItem(includePanel);
      IncludeItem.listIncludes(grammars, includePanel);   
      grammarsTreeItem.setState(SettingsDialog.treeItemsAlwaysOpen);
        
      // close grammars item      
      TreeItem grammarsCloseItem = new TreeItem(new GenericClosingItem(WadlXml.grammarsNode));
      grammarsCloseItem.setUserObject(WadlXml.grammarsNode);
      applicationTreeItem.addItem(grammarsCloseItem);
    }   
    else {
      if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.grammarsNode)) {     
        // add grammars button     
        HorizontalPanel addGrammarsPanel = new HorizontalPanel();
             
        Button addGrammarsButton = new Button(GuiFactory.strings.addGrammars());
        addGrammarsButton.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {         
            application.addGrammars(new GrammarsNode(application));
            application.getGrammars().addInclude(GuiFactory.strings.newInclude());
            listGrammars(application, applicationTreeItem);                   
          }
        });
        addGrammarsPanel.add(addGrammarsButton);
        TreeItem addGrammarsTreeItem = new TreeItem(addGrammarsPanel);
        addGrammarsTreeItem.setUserObject(ApplicationItem.button + WadlXml.grammarsNode);
        applicationTreeItem.addItem(addGrammarsTreeItem);
      }
    }
    WadlTreeRoot.addButtons(buttonTreeItems, applicationTreeItem);
  }
View Full Code Here

    Vector buttonTreeItems = WadlTreeRoot.removeChildrenXKeepButtons(parentTreeItem, WadlXml.faultNode);
      
    Iterator allfaultsIterator = allFaults.iterator();
    while (allfaultsIterator.hasNext()) {
      FaultNode fault = (FaultNode) allfaultsIterator.next();     
      TreeItem faultTreeItem = new TreeItem(new FaultItem(fault, parentNode, parentTreeItem));
      faultTreeItem.setUserObject(WadlXml.faultNode);
      parentTreeItem.addItem(faultTreeItem);     
    }   
   
    if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.faultNode)) {
      // add fault button
      HorizontalPanel addFaultPanel = new HorizontalPanel();
     
      Button addFaultButton = new Button(GuiFactory.strings.addFault());
      addFaultButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {       
          if (parentNode instanceof ApplicationNode) {
            FaultNode fault = new FaultNode(GuiFactory.strings.newFault(), (GenericNode) parentNode, (ApplicationNode) parentNode);
            fault.setId(GuiFactory.strings.newId());
            ((ApplicationNode) parentNode).addFault(fault);
          }
          else if (parentNode instanceof ResponseNode) {
            ((ResponseNode) parentNode).addFault(new FaultNode(GuiFactory.strings.newFault(), (GenericNode) parentNode, ((ResponseNode) parentNode).getApplication()));
          }
          listFaults(parentNode, parentTreeItem);          
        }
      });
      addFaultPanel.add(addFaultButton);
      TreeItem addFaultTreeItem = new TreeItem(addFaultPanel);
      addFaultTreeItem.setUserObject(ApplicationItem.button + WadlXml.faultNode);
      parentTreeItem.addItem(addFaultTreeItem);
    }
   
    WadlTreeRoot.addButtons(buttonTreeItems, parentTreeItem);
   
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.