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

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


  private Tree publisherTree;
  private PublicationServiceAsync publicationService = (PublicationServiceAsync) GWT.create(PublicationService.class);
  private FindServiceAsync findService = (FindServiceAsync) GWT.create(FindService.class);
 
  public BusinessTreePanel() {
    publisherTree = new Tree(UDDIBrowser.images);
    publisherTree.addTreeListener(this);
    initWidget(publisherTree);
  }
View Full Code Here


  private Tree subscriptionTree;
  private Node selectedNode=null;
  private SubscriptionServiceAsync subscriptionService = (SubscriptionServiceAsync) GWT.create(SubscriptionService.class);
 
  public SubscriptionTreePanel() {
    subscriptionTree = new Tree(UDDIBrowser.images);
    subscriptionTree.addTreeListener(this);
    initWidget(subscriptionTree);
  }
View Full Code Here

            return null;
        }
    }

    public Tree createTree() {
        return new Tree();
    }
View Full Code Here

    ++row;
    final int widgetRow = row + 1;
    table.setWidget(row, 0, new Button("Normal tree", new ClickListener() {
      public void onClick(Widget sender) {
        long time = System.currentTimeMillis();
        Tree t = new Tree();
        profileCreateTree(t, Integer.parseInt(branches.getText()),
            Integer.parseInt(nodes.getText()),
            TreeType.getType(type.getSelectedIndex()));
        table.setWidget(widgetRow, 0, t);
        Window.alert("Elapsed time: " + (System.currentTimeMillis() - time));
View Full Code Here

      throw new RuntimeException("What?");
    }
  }

  private void createTree(int numBranches, int numNodes, TreeType type) {
    Tree t = new Tree();
    TreeItem root = t.addItem("root");

    ArrayList front = new ArrayList();
    front.add(add(root, type));
    int count = 0;
    while (true) {
View Full Code Here

   *
   * @return
   */
  private Widget createDynamicTree() {
    // Create a new tree
    Tree dynamicTree = new Tree();

    // Add some default tree items
    for (int i = 0; i < 5; i++) {
      TreeItem item = dynamicTree.addItem("Item " + i);

      // Temporarily add an item so we can expand this node
      item.addItem("");
    }

    // Add a handler that automatically generates some children
    dynamicTree.addOpenHandler(new OpenHandler<TreeItem>() {
      public void onOpen(OpenEvent<TreeItem> event) {
        TreeItem item = event.getTarget();
        if (item.getChildCount() == 1) {
          // Close the item immediately
          item.setState(false, false);
View Full Code Here

      // Display a Map Blowup Window
      content = new InfoWindowContent.MapBlowupContent();
    } else {

      // The default case
      Tree tree = new Tree();
      TreeItem foo = new TreeItem("Foo");
      tree.addItem(foo);
      TreeItem bar = new TreeItem("bar");
      foo.addItem(bar);
      bar.addItem("baz");
      bar.addItem("gwt");
      // max-height must be set in advance so info window is sized appropriately
      tree.setSize("217px", "104px");
      content = new InfoWindowContent(tree);
    }

    info.open(map.getCenter(), content);
  }
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

        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 Constants     constants = GWT.create( Constants.class );
    private static Images images    = GWT.create( Images.class );

    public FactTypeBrowser(SuggestionCompletionEngine sce,
                           final ClickEvent ev) {
        Tree tree = new Tree();

        final VerticalPanel panel = new VerticalPanel();

        HorizontalPanel hp = new HorizontalPanel();

        hp.add( new SmallLabel( constants.FactTypes() ) );
        hp.add( new ClickableLabel( constants.hide(),
                                    new ClickHandler() {
                                        public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
                                            panel.setVisible( false );
                                        }
                                    } ) );
        panel.add( hp );

        panel.add( tree );
        if ( sce.getFactTypes() != null ) {
            for ( String type : sce.getFactTypes() ) {
                TreeItem it = new TreeItem();
                it.setHTML( "<img src='" + new Image( images.classImage() ).getUrl() + "'/><small>"
                        + type + "</small>" );
                it.setUserObject( type + "( )" );
                tree.addItem( it );

                String[] fields = (String[]) sce.getModelFields( type );
                if ( fields != null ) {
                    for ( String field : fields ) {
                        TreeItem fi = new TreeItem();
                        fi.setHTML( "<img src='" + new Image( images.field() ).getUrl() + "'/><small>"
                                + field + "</small>" );
                        fi.setUserObject( field );
                        it.addItem( fi );
                    }
                }
            }
        }

        tree.setStyleName( "category-explorer-Tree" ); //NON-NLS
        tree.addSelectionHandler( new SelectionHandler<TreeItem>() {

            public void onSelection(SelectionEvent<TreeItem> event) {
                Object o = event.getSelectedItem().getUserObject();
                if ( o instanceof String ) {
                    ev.selected( (String) o );
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.