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

Examples of com.google.gwt.user.client.ui.SimplePanel


   *
   * @param options Provides a configuration for displaying and executing the
   *          SearchControl's searches
   */
  public SearchControl(SearchControlOptions options) {
    SimplePanel contents = new SimplePanel();
    initWidget(contents);
    setStyleName("gwt-SearchControl");

    // Associate the backing JSO with this facade object.
    SEARCH_CONTROL.bind(jsoPeer, this);

    // Wire up the search callback every time
    SEARCH_CONTROL.setSearchCompleteCallback(this, null,
        new SearchControlCompleteCallback() {
          public void onSearchResult(SearchControl control, Search search) {
            assert control == SearchControl.this;
            for (Result result : search.getResults()) {
              resultListeners.fireResult(search, result);
            }
          }
        });

    // If no keep label is explicity set, don't bother wiring up the callback.
    if (options.keepLabel != null) {
      KeepCallback keepCallback = new KeepCallback() {
        public void onKeep(Result result) {
          keepListeners.fireKeep(SearchControl.this, result);
        }
      };

      // keepLabel may be either a String or a KeepLabel
      if (options.keepLabel instanceof String) {
        SEARCH_CONTROL.setOnKeepCallback(this, null, keepCallback,
            (String) options.keepLabel);
      } else if (options.keepLabel instanceof KeepLabel) {
        SEARCH_CONTROL.setOnKeepCallback(this, null, keepCallback,
            ((KeepLabel) options.keepLabel).getValue());
      }
    }

    // Explicitly set the linkTarget if one is defined.
    if (options.linkTarget != null) {
      SEARCH_CONTROL.setLinkTarget(this, options.linkTarget.getValue());
    }

    // Set the timeoutInterval if necessary
    if (options.timeoutInterval != null) {
      SEARCH_CONTROL.setTimeoutInterval(this,
          options.timeoutInterval.getValue());
    }

    // Add all Searches to the control
    for (Search search : options.searchers) {
      GsearcherOptions searchOptions = options.searcherOptions.get(search);
      SEARCH_CONTROL.addSearcher(this, search, searchOptions);
    }

    // Build the UI.
    SEARCH_CONTROL.draw(this, contents.getElement(), options.drawOptions);
  }
View Full Code Here


            public void onClick(Widget arg0) {
                zoomOut();
            }
        });

        editWidget = new SimplePanel();

        add(editWidget);
        add(magSmall);
        add(whenlabel);
        add(magBig);
View Full Code Here

    WidgetArea draggableArea = new WidgetArea(context.draggable, null);
    for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
      Widget widget = (Widget) iterator.next();
      WidgetArea widgetArea = new WidgetArea(widget, null);
      Widget proxy = new SimplePanel();
      proxy.setPixelSize(widget.getOffsetWidth(), widget.getOffsetHeight());
      proxy.addStyleName(PRIVATE_CSS_PROXY);
      container.add(proxy, widgetArea.getLeft() - draggableArea.getLeft(), widgetArea.getTop()
          - draggableArea.getTop());
    }

    return container;
View Full Code Here

  Widget makePositioner(Widget reference) {
    if (allowDroppingOnBoundaryPanel) {
      return super.makePositioner(reference);
    } else {
      return new SimplePanel();
    }
  }
View Full Code Here

        map.addControl(new SmallMapControl());
        map.addControl(new MapTypeControl());
        map.setScrollWheelZoomEnabled(true);

        SimplePanel sizeCorrector = new SimplePanel();
        sizeCorrector.add(map);
        sizeCorrector.setPixelSize(760,300);
       
        initWidget(sizeCorrector);
       
       
    }
View Full Code Here

        setCalendar(parent);
        content = new HorizontalPanel();
        timebar = new Timebar(format24h);
        content.add(timebar);

        wrapper = new SimplePanel();
        wrapper.setStylePrimaryName("v-calendar-week-wrapper");
        wrapper.add(content);

        setWidget(wrapper);
    }
View Full Code Here

        } else if (!isVerticalScrollEnabled && (isVerticalScrollable())) {
            verticalScrollEnabled = false;
            horizontalScrollEnabled = false;
            wrapper.remove(content);

            SimplePanel simplePanel = new SimplePanel();
            simplePanel.setStylePrimaryName("v-calendar-week-wrapper");
            simplePanel.setWidget(content);

            setWidget(simplePanel);
            wrapper = simplePanel;
        }
    }
View Full Code Here

            collectOpenNodes(it.next(), openNodes);
        }

        clear();

        SimplePanel trees = new SimplePanel();

        for (ApplicationConnection application : ApplicationConfiguration
                .getRunningApplications()) {
            ServerConnector uiConnector = application.getUIConnector();
            Widget connectorTree = buildConnectorTree(uiConnector, openNodes);

            trees.add(connectorTree);
        }

        add(trees);
    }
View Full Code Here

            titleHtml.setText(displayerSettings.getTitle());
        }

        VerticalPanel verticalPanel = new VerticalPanel();
        verticalPanel.add(titleHtml);
        verticalPanel.add(filterPanel = new SimplePanel());
        verticalPanel.add(chart);
        return verticalPanel;
    }
View Full Code Here

                                    installContext_.packageArchiveExtension() +
                                    ")");
      mainPanel.add(packageSourceListBox_);
     
      // source panel container
      sourcePanel_ = new SimplePanel();
      sourcePanel_.setStylePrimaryName(RESOURCES.styles().packageSourcePanel());
     
      // repos source panel
      reposSourcePanel_ = new FlowPanel();
      Label packagesLabel = new Label(
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.SimplePanel

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.