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

Examples of com.google.gwt.user.client.ui.Tree$ImageAdapter


    root.add(table);
  }
 
  private Tree createTree() {
    Tree tree = new Tree();
    /*TreeItem widgets =*/ tree.addItem("Widgets");
    /*TreeItem lists =*/ tree.addItem("Lists and Menus");
    TreeItem popups = tree.addItem("Popups");
    popups.addItem(createTreeItem("Message Box", new CwMessageBox()));
    /*TreeItem tables =*/ tree.addItem("Tables");
   
    return tree;
  }
View Full Code Here


        int size = valueMapArray.length();
        panel.add(new HTML("<div>************************</di>"
                + "<h4>Layouts analyzed on server, total top level problems: "
                + size + " </h4>"));
        if (size > 0) {
            Tree tree = new Tree();

            // Position relative does not work here in IE7
            DOM.setStyleAttribute(tree.getElement(), "position", "");

            TreeItem root = new TreeItem("Root problems");
            for (int i = 0; i < size; i++) {
                printLayoutError(valueMapArray.get(i), root, ac);
            }
            panel.add(tree);
            tree.addItem(root);

        }
        if (zeroHeightComponents.size() > 0 || zeroWidthComponents.size() > 0) {
            panel.add(new HTML("<h4> Client side notifications</h4>"
                    + " <em>The following relative sized components were "
View Full Code Here

    private void create() {
        window = new DefaultWindow("Management Model View");
        window.setGlassEnabled(true);

        tree = new Tree();
        tree.getElement().addClassName("browser-tree");
        tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
            @Override
            public void onSelection(SelectionEvent<TreeItem> selection) {
                TreeItem selectedItem = selection.getSelectedItem();
View Full Code Here

    // Create a table to layout the content
    VerticalPanel dialogContents = new VerticalPanel();
    dialogContents.setSpacing(4);
    dialogBox.setWidget(dialogContents);

    final Tree dynamicTree = createDynamicTree(pubInfoList);
    dynamicTree.ensureDebugId("cwTree-dynamicTree");
    ScrollPanel dynamicTreeWrapper = new ScrollPanel(dynamicTree);
    dynamicTreeWrapper.ensureDebugId("cwTree-dynamicTree-Wrapper");
    dynamicTreeWrapper.setSize("300px", "300px");

    // Wrap the dynamic tree in a DecoratorPanel
    DecoratorPanel dynamicDecorator = new DecoratorPanel();
    dynamicDecorator.setWidget(dynamicTreeWrapper);
    dialogContents.add(dynamicDecorator);

    // Add a close button at the bottom of the dialog
    Button nextButton = new Button("Next", new ClickHandler() {
      public void onClick(ClickEvent event) {
        newDataSourceID.append(dynamicTree.getSelectedItem().getText());
        dashboardService.getDataSourceAllDetails(newDataSourceID.toString(), new AsyncCallback<DataSourceConfiguration>() {

          public void onFailure(Throwable caught) {
            // TODO Auto-generated method stub
View Full Code Here

    return dialogBox;
  }

  private Tree createDynamicTree(ArrayList<PublisherInfo> pubInfoList) {
    // Create a new tree
    final Tree dynamicTree = new Tree();

    for (int i = 0; i < pubInfoList.size(); i++) {
      TreeItem item = dynamicTree.addItem(pubInfoList.get(i).getPublisherID());
      item.addItem("");
    }

    dynamicTree.addOpenHandler(new OpenHandler<TreeItem>() {
      public void onOpen(OpenEvent<TreeItem> event) {
        final TreeItem item = event.getTarget();
        dashboardService.getDataSources(event.getTarget().getText(), new AsyncCallback<ArrayList<DataSourceInfo>>() {

          public void onSuccess(ArrayList<DataSourceInfo> result) {
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

    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

          cancel();
          String usersRolesLabel = Messages.getString( "users" ) + "/" + Messages.getString( "roles" );
          GwtTree adminCatTree = (GwtTree) container.getDocumentRoot().getElementById( "adminCatTree" );

          TreeItem usersRolesTreeItem = null;
          Tree adminTree = adminCatTree.getTree();
          Iterator<TreeItem> adminTreeItr = adminTree.treeItemIterator();
          while ( adminTreeItr.hasNext() ) {
            usersRolesTreeItem = adminTreeItr.next();
            if ( usersRolesTreeItem.getText().equals( usersRolesLabel ) ) {
              usersRolesTreeItem.setVisible( enabled );
              break;
View Full Code Here

    t.scheduleRepeating( 250 );
  }

  public void selectAdminCatTreeTreeItem( final String treeLabel ) {
    GwtTree adminCatTree = (GwtTree) container.getDocumentRoot().getElementById( "adminCatTree" );
    Tree adminTree = adminCatTree.getTree();
    adminTree.setSelectedItem( null, true );
    Iterator<TreeItem> adminTreeItr = adminTree.treeItemIterator();
    while ( adminTreeItr.hasNext() ) {
      TreeItem treeItem = adminTreeItr.next();
      if ( treeItem.getText().equals( treeLabel ) ) {
        adminTree.setSelectedItem( treeItem, true );
        break;
      }
    }
  }
View Full Code Here

    // Add a CheckBox to the tree
    TreeItem item = new TreeItem(new CheckBox("item3"));
    root.addItem(item);

    Tree t = new Tree();
    t.addItem(root);

    // Add it to the root panel.
    RootPanel.get().add(t);
  }
View Full Code Here

TOP

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

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.