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

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


  private final Geocoder geocoder;

  private final MapWidget map;

  public Geocoder2Demo() {
    Panel panel = new FlowPanel();
    final FormPanel form = new FormPanel();
    form.setAction("#");
    Panel formElements = new FlowPanel();
    Label label = new Label("Search for an address:");
    formElements.add(label);
    final TextBox addressBox = new TextBox();
    addressBox.setVisibleLength(40);
    formElements.add(addressBox);
    Button submit = new Button("Search");
    submit.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        form.submit();
      }
    });
    formElements.add(submit);
    form.add(formElements);
    form.addSubmitHandler(new SubmitHandler() {
      public void onSubmit(SubmitEvent event) {
        showAddress(addressBox.getText());
        event.cancel();
View Full Code Here


  private Label lngLabel;

  private MapWidget map;

  public GeocoderDemo() {
    Panel panel = new FlowPanel();
    final FormPanel form = new FormPanel();
    form.setAction("#");

    Panel formElements = new FlowPanel();
    final TextBox address = new TextBox();
    address.setVisibleLength(60);
    address.setText("10 10th Street, Atlanta, GA");
    formElements.add(address);
    formElements.add(buildLatLngPanel());
    this.displayLatLng(ATLANTA);

    Button submit = new Button("Go!");
    submit.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        form.submit();
      }
    });
    formElements.add(submit);
    form.add(formElements);
    form.addSubmitHandler(new SubmitHandler() {
      public void onSubmit(SubmitEvent event) {
        showAddress(address.getText());
        event.cancel();
View Full Code Here

      return false;
    }

    @Override
    protected Widget initialize(final MapWidget map) {
      Panel container = new FlowPanel();
      Button zoomInButton = new Button("Zoom In");
      zoomInButton.setStyleName("textualZoomControl");
      zoomInButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent clickEvent) {
          map.zoomIn();
        }
      });
      Button zoomOutButton = new Button("Zoom Out");
      zoomOutButton.setStyleName("textualZoomControl");
      zoomOutButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent clickEvent) {
          map.zoomOut();
        }
      });

      container.add(zoomInButton);
      container.add(zoomOutButton);
      return container;
    }
View Full Code Here

  }

  private MapWidget map;

  public EventDemo() {
    Panel panel =
        new FlowPanel();
    map =
        new MapWidget(LatLng.newInstance(37.4419, -122.1419), 13);
    map.setSize("500px", "300px");
    map.setUIToDefault();
    panel.add(map);
    final Label message =
        new Label();
    panel.add(message);
    initWidget(panel);
   
    map.addMapMoveEndHandler(new MapMoveEndHandler() {
      public void onMoveEnd(MapMoveEndEvent event) {
        message.setText(map.getCenter().toString());
View Full Code Here

     */
  protected boolean doRemove(View view, boolean skipEvent)
    {
      if (views.containsKey(view.getId()))
    {
      Panel containerPanel = getContainerPanel(view);
      boolean active = view.isActive();
      if (deactivate(view, containerPanel, skipEvent) && (skipEvent || view.unload()))
      {
        views.remove(view.getId());
        if (active)
        {
          containerPanel.clear();
        }
        return true;
      }
    }
    return false;
View Full Code Here

     * @param parameter
     */
    protected boolean renderView(View view, Object parameter)
    {
    assert (view!= null && views.containsKey(view.getId())):"Can not render the view["+view.getId()+"]. It was not added to the container";
    Panel containerPanel = getContainerPanel(view);
    boolean activated = activate(view, containerPanel, parameter);
    if (activated)
    {
      String title = view.getTitle();
      if (!StringUtils.isEmpty(title))
View Full Code Here

                        constraints.put( connectionRef,
                                         constraint );
                    }
                } );

                Panel panel = new HorizontalPanel();
                panel.add( new Label( constants.Priority() ) );
                panel.add( priorityTextBox );
                panel.add( new Label( constants.ValueRuleFlow() ) );
                panel.add( constraintTextBox );

                parametersForm.addAttribute( constraint.getName(),
                                             panel );
            }
        }
View Full Code Here

    protected void update(List<Message> messages) {
        clear();

        for (Message message : messages) {
            Panel panel = new FlowPanel();
            panel.setStyleName("message");

            Label messageText = new Label(message.getText());
            messageText.setStyleName("messageText");
            panel.add(messageText);

            Button button = new Button("Delete");
            button.addStyleName("deleteButton");
            button.addClickHandler(new DeleteClickHandler(message.getId()));

            panel.add(button);

            add(panel);
        }
    }
View Full Code Here

      public void onMouseOut(MouseOutEvent event) {
        popup.hide();
      }
    });

    final Panel panel = new HorizontalPanel();
    panel.add(link);
    panel.add(details);

    return panel;
  }
View Full Code Here

import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class AdminWidget extends Composite {
  public AdminWidget(final CommonServiceAsync commonService, final DeleteServiceAsync deleteService) {
    final Panel table = new VerticalPanel();
    initWidget(new ScrollPanel(table));

    GWT.runAsync(new RunAsyncCallback() {
      @Override
      public void onSuccess() {
        for (final Composite widget : new Composite[] { new EmailFeedbackWidget(), new LocaleSettingsWidget(), new DatabaseWidget(commonService, deleteService), new CacheStatsWidget(), LogConsole.get() }) {
          table.add(widget);
        }
      }
     
      @Override
      public void onFailure(Throwable reason) {
View Full Code Here

TOP

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

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.