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

Examples of com.google.gwt.user.client.ui.Tree$ImagesFromImageBase$Prototype


    private static void infanticide( final TreeItem treeNode ) {
        treeNode.removeItems();
    }

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

        return tree;
    }
View Full Code Here


    public VerifierResultWidget(AnalysisReport report,
                                boolean showFactUsage) {
       
        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 ) {
            tree.addItem( new FactUsagesItem( report.factUsages ) );
        }

        tree.addCloseHandler( new CloseHandler<TreeItem>() {
            public void onClose(CloseEvent<TreeItem> event) {
                swapTitleWithUserObject( event.getTarget() );
            }
        } );
        tree.addOpenHandler( new OpenHandler<TreeItem>() {
            public void onOpen(OpenEvent<TreeItem> event) {
                swapTitleWithUserObject( event.getTarget() );
            }
        } );
        layout.addRow( tree );
View Full Code Here

              Analyzer.application.addGrammars(new GrammarsNode(Analyzer.application));
            }
            Analyzer.application.grammars.addInclude(include);
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
          WadlPanel.wadlArea.clear();
          WadlPanel.wadlArea.setWidget(wadlTree);
        }         
      });
      containerPanel.add(addSchemaButton);
    }

    // default namespace
    final Button addNamespaceButton = new Button(GuiFactory.strings.addNamespace());
    if (!defaultNamespace.isEmpty()) {
      final Vector reallyAddDefaultNamespace = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.defaultNamespaces()));
      ScrollPanel defaultNamespaceContainerPanel = new ScrollPanel();
      defaultNamespaceContainerPanel.setStyleName("restDescribe-wadlArea");
      defaultNamespaceContainerPanel.setHeight(panelHeight);
      VerticalPanel defaultNamespacePanel = new VerticalPanel();
      defaultNamespaceContainerPanel.add(defaultNamespacePanel);
      containerPanel.add(defaultNamespaceContainerPanel);
     
      Iterator defaultNamespaceIterator = defaultNamespace.iterator();
      int i = 0;
      HorizontalPanel horizontalNamespacePanel = new HorizontalPanel();
      defaultNamespacePanel.add(horizontalNamespacePanel);
      Grid grid = new Grid(defaultNamespace.size(), 2);
      horizontalNamespacePanel.add(grid);
      while (defaultNamespaceIterator.hasNext()) {       
        final String defaultNamespace = (String) defaultNamespaceIterator.next();
        reallyAddDefaultNamespace.add(defaultNamespace);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddDefaultNamespace.contains(defaultNamespace)) {             
              reallyAddDefaultNamespace.add(defaultNamespace);
            }          
            else {
              if (reallyAddDefaultNamespace.contains(defaultNamespace)) {
                reallyAddDefaultNamespace.remove(defaultNamespace);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, defaultNamespace);
        i++;
      }           
      addNamespaceButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          Iterator addNamespaceIterator = reallyAddDefaultNamespace.iterator();
          while (addNamespaceIterator.hasNext()) {
            String namespace = (String) addNamespaceIterator.next();           
            Analyzer.application.addNamespace(
                new NamespaceAttribute(null, namespace));
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
          WadlPanel.wadlArea.clear();
          WadlPanel.wadlArea.setWidget(wadlTree);
        }         
      });
      containerPanel.add(addNamespaceButton);
    }
    final Button addOtherNamespacesButton = new Button(GuiFactory.strings.addOtherNamespace());
    // other namespaces
    if (!otherNamespaces.isEmpty()) {
      final Vector reallyAddOtherNamespaces = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.otherNamespaces()));
      ScrollPanel otherNamespacesContainerPanel = new ScrollPanel();
      otherNamespacesContainerPanel.setStyleName("restDescribe-wadlArea");     
      otherNamespacesContainerPanel.setHeight(panelHeight);
      VerticalPanel otherNamespacesPanel = new VerticalPanel();
      otherNamespacesContainerPanel.add(otherNamespacesPanel);
      containerPanel.add(otherNamespacesContainerPanel);
     
      Iterator otherNamespacesIterator = otherNamespaces.iterator();
      int i = 0;
      HorizontalPanel horizontalNamespacePanel = new HorizontalPanel();
      otherNamespacesPanel.add(horizontalNamespacePanel);
      Grid grid = new Grid(otherNamespaces.size(), 2);
      horizontalNamespacePanel.add(grid);
      while (otherNamespacesIterator.hasNext()) {       
        final String otherNamespace = (String) otherNamespacesIterator.next();
        reallyAddOtherNamespaces.add(otherNamespace);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddOtherNamespaces.contains(otherNamespace)) {             
              reallyAddOtherNamespaces.add(otherNamespace);
            }          
            else {
              if (reallyAddOtherNamespaces.contains(otherNamespace)) {
                reallyAddOtherNamespaces.remove(otherNamespace);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, otherNamespace);
        i++;
      }           
      addOtherNamespacesButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          Iterator addNamespaceIterator = reallyAddOtherNamespaces.iterator();
          while (addNamespaceIterator.hasNext()) {
            String namespace = (String) addNamespaceIterator.next();           
            Analyzer.application.addNamespace(
                new NamespaceAttribute(null, namespace));
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
          WadlPanel.wadlArea.clear();
          WadlPanel.wadlArea.setWidget(wadlTree);
        }         
      });
      containerPanel.add(addOtherNamespacesButton);
View Full Code Here

     
      Analyzer analyzer = new Analyzer(separatedRequestStrings[i]);     
      application = analyzer.analyze();
    }   
    WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
    Tree wadlTree = wadlTreeRoot.buildTree(application);
   
    WadlPanel.wadlArea.setWidget(wadlTree);
    GuiFactory.toggleButtonsEnabled(true);
  }
View Full Code Here

      public void onClick(Widget sender) {            
        Analyzer analyzer = new Analyzer(parameterTree.requestString);
        ApplicationNode application = analyzer.analyze();
           
        WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
        Tree wadlTree = wadlTreeRoot.buildTree(application);
       
        WadlPanel.wadlArea.setWidget(wadlTree);
        GuiFactory.toggleButtonsEnabled(true);
      }      
    });     
View Full Code Here

      if (startParsing(wadl)) {
        uploadDialogBox.setVisible(true);
        uploadDialogBox.hide();
        // if the parsing succeeded render a tree from the parsed wadl   
        WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
        Tree wadlTree = wadlTreeRoot.buildTree(application);      
        WadlPanel.wadlArea.setWidget(wadlTree);
        GuiFactory.toggleButtonsEnabled(true);
        WadlPanel.fullscreenButton.click();
      }
    } catch (DOMParseException e) {
View Full Code Here

        subsysPanel.setContent(subsysTree);
        stack.add(subsysPanel);

        // ----------------------------------------------------

        Tree deploymentTree = new LHSNavTree("profiles");
        deploymentTree.addItem(new LHSNavTreeItem("Manage Deployments", NameTokens.DeploymentListPresenter));
        DisclosurePanel deplPanel  = new DisclosureStackHeader("Deployments").asWidget();
        deplPanel.setContent(deploymentTree);

        stack.add(deplPanel);

        // ----------------------------------------------------

        Tree commonTree = new LHSNavTree("profiles");
        DisclosurePanel commonPanel  = new DisclosureStackHeader("General Configuration").asWidget();
        commonPanel.setContent(commonTree);

        LHSNavTreeItem[] commonItems = new LHSNavTreeItem[] {
                /*new LHSNavTreeItem("Server", NameTokens.StandaloneServerPresenter),*/
                new LHSNavTreeItem("Interfaces", NameTokens.InterfacePresenter),
                new LHSNavTreeItem("Socket Binding Groups", NameTokens.SocketBindingPresenter),
                new LHSNavTreeItem("System Properties", NameTokens.PropertiesPresenter)
        };

        for(LHSNavTreeItem item : commonItems)
        {
            commonTree.addItem(item);
        }

        stack.add(commonPanel);

        layout.add(stack);
View Full Code Here

        responseArea.setVisibleLines(20);

        outputPanel.add(requestArea);
        outputPanel.add(responseArea);

        tree = new Tree(DefaultTreeResources.INSTANCE);
        horz.add(tree);
        horz.add(outputPanel);
        tree.getElement().getParentElement().setAttribute("width", "30%");
        layout.add(horz);
View Full Code Here

    private static void infanticide( final TreeItem treeNode ) {
        treeNode.removeItems();
    }

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

        return tree;
    }
View Full Code Here

    private final Tree tree;

    private boolean isDSLR;

    public FactTypeBrowserWidget( final ClickEvent ev ) {
        this.tree = new Tree();

        final VerticalPanel panel = new VerticalPanel();
        final HorizontalPanel hpFactsAndHide = new HorizontalPanel();
        final HorizontalPanel hpShow = new HorizontalPanel();
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.Tree$ImagesFromImageBase$Prototype

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.