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

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


    private boolean mouseDown;
    private MouseDownEvent mDownEvent;

    @SuppressWarnings("unused")
    public VMyDragSource() {
        FlowPanel fp = new FlowPanel();
        initWidget(fp);

        HTML html = new HTML("DragThis");

        fp.add(html);

        html.addMouseDownHandler(this);
        html.addMouseMoveHandler(this);
        html.addMouseOutHandler(this);
View Full Code Here


     * @see ApplicationConnection#getVTooltip()
     */
    public VTooltip() {
        super(false, false, true);
        setStyleName(CLASSNAME);
        FlowPanel layout = new FlowPanel();
        setWidget(layout);
        layout.add(em);
        DOM.setElementProperty(description, "className", CLASSNAME + "-text");
        DOM.appendChild(layout.getElement(), description);
        setSinkShadowEvents(true);

        // When a tooltip is shown, the content of the tooltip changes. With a
        // tooltip being a live-area, this change is notified to a assistive
        // device.
View Full Code Here

  panel.add(prevButton);
  panel.add(stateLabel);
  panel.add(nextButton);
  panel.add(zinButton);
  panel.add(zoutButton);
  FlowPanel main = new FlowPanel();
  main.add(panel);
  initWidget(main);
  setPage(0);
  }
View Full Code Here

  content = new VerticalPanel();
    content.setSize("100%", "100%");
    content.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    content.setStylePrimaryName("lab-Previewer");
  content.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
  FlowPanel panel = new FlowPanel();
  panel.setWidth("100%");
  Label msg = new Label("There's nothing to preview yet, click the compile button to get started.");
  msg.setStylePrimaryName("lab-Error");
  Anchor showLogs = new Anchor("Compile Current Document", "#");
  showLogs.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      event.preventDefault();
      event.stopPropagation();
          CommandEvent.fire(new CurrentDocumentCompileCommand());
    }
  });
  panel.add(msg);
  panel.add(showLogs);
  content.add(panel);
  initWidget(content);
  }
View Full Code Here

  public void setError(String msg) {
    currentImage = null;
    currentPage = 0;
  content.clear();
  content.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
  FlowPanel panel = new FlowPanel();
  panel.setWidth("100%");
  Label err = new Label(msg);
  err.setStylePrimaryName("lab-Error");
  Anchor showLogs = new Anchor("View Compiler Output", "#");
  showLogs.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      event.preventDefault();
      event.stopPropagation();
          CommandEvent.fire(new SystemSetPerspectiveCommand(SystemSetPerspectiveCommand.VIEW_OUTPUT));
    }
  });
  panel.add(err);
  panel.add(showLogs);
  content.add(panel);
  }
View Full Code Here

  public void showPageIndex() {
  content.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
  currentImage = null;
  content.clear();
  addMessage();
  FlowPanel panel = new FlowPanel();
  for (int i=0; i<pages.length; i++) {
    final int pageNumber = i;
      VerticalPanel box = new VerticalPanel();
      box.setPixelSize(200, 320);
      box.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    box.setStylePrimaryName("lab-Previewer-Page");
    box.getElement().getStyle().setOverflow(Overflow.HIDDEN);
    Image img = new Image();
    img.setUrl(pages[i].replace("?", "_tn?"));
    img.setStylePrimaryName("lab-Previewer-Page-Image");
    Anchor caption = new Anchor("Page " + (i + 1));
    caption.setHref("#");
    caption.setStylePrimaryName("lab-Previewer-Page-Caption");
    caption.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      event.preventDefault();
      event.stopPropagation();
      CommandEvent.fire(new SystemViewPageCommand(pageNumber));
    }
    });
    box.add(caption);
    box.add(img);
    panel.add(box);
  }
  content.add(panel);
  }
View Full Code Here

  /**
   * Resizes the toolbar window.
   */
  protected void resize() {
    int xcount = buttonsPerRow;
    FlowPanel panel = (FlowPanel) getContentWidget();
    if (xcount > panel.getWidgetCount()) {
      xcount = panel.getWidgetCount();
    }
    setContentSizeFinal();
  }
View Full Code Here

  /**
   * Sets the window's final content size.
   */
  @Override
  public void setContentSizeFinal() {
    FlowPanel panel = (FlowPanel) getContentWidget();
  int width = panel.getOffsetWidth();
  int height = panel.getOffsetHeight();
  if (width == 0) {
    width = buttonsPerRow * buttonWidth;
  }
  int count = panel.getWidgetCount();
  int xcount = (int) Math.ceil((float) width / (float) buttonWidth);
    int ycount = (int) Math.ceil((float) count / (float) xcount);
  if (xcount > count) {
    xcount = count;
    ycount = 1;
View Full Code Here

   
    /**
     * Constructs a new toolbar window contents.
     */
  public ToolbarWindowContents() {
      panel = new FlowPanel();
      panel.getElement().getStyle().setOverflow(Overflow.HIDDEN);
      setContentWidget(panel);
  }
View Full Code Here

    // set dealer's place
    int dealerNameTop = (int) (pokertable.getHeight() * 0.22);
    int dealerCardTop = dealerNameTop + NAME_HEIGHT;

    namePlaces.add(new Label(messages.setDealer()));
    cardPlaces.add(new FlowPanel());
    int left = (int) (0.5 * picWidth - 0.5 * CARD_WIDTH);
    backgroundArea.add(namePlaces.get(0));
    backgroundArea
        .setWidgetPosition(namePlaces.get(0), left, dealerNameTop);

    cardPlaces.get(0).setPixelSize(CARD_WIDTH * 3, CARD_HEIGHT);
    backgroundArea.add(cardPlaces.get(0));
    backgroundArea
        .setWidgetPosition(cardPlaces.get(0), left, dealerCardTop);

    // set the player place
    int playerNameTop = dealerCardTop + CARD_HEIGHT;
    int playerCardTop = playerNameTop + NAME_HEIGHT;
    for (int i = 0; i < numPlayer; i++) {
      namePlaces.add(new Label(messages.setID() + playerIds.get(i)));
      cardPlaces.add(new FlowPanel());
    }
    // set the player's place
    for (int i = 1; i < numPlayer + 1; i++) {
      backgroundArea.add(namePlaces.get(i));
      left = (int) (0.5 * (picWidth / numPlayer) - 0.5 * CARD_WIDTH + (i - 1)
View Full Code Here

TOP

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

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.