Examples of FlowPanel


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

                 * to work without scrolling up or down when focusing a node.
                 */
                nodeCaptionDiv.setTabIndex(-1);
            }

            childNodeContainer = new FlowPanel();
            childNodeContainer.setStyleName(CLASSNAME + "-children");
            Roles.getGroupRole().set(childNodeContainer.getElement());
            setWidget(childNodeContainer);
        }
View Full Code Here

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

            setWidget(content);

            setStylePrimaryName(STYLENAME + "-menu");
            content.setStylePrimaryName(STYLENAME + "-menu-content");

            FlowPanel size = new FlowPanel();
            content.add(size);

            final ClickHandler sizeHandler = new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    for (int i = 0; i < sizes.length; i++) {
                        Button b = sizes[i];
                        if (b == event.getSource()) {
                            setSize(i);
                        }
                    }
                    hide();
                }
            };
            for (int i = 0; i < sizes.length; i++) {
                Button b = sizes[i];
                b.setStyleDependentName("size" + i, true);
                b.addClickHandler(sizeHandler);
                size.add(b);
            }

            FlowPanel mode = new FlowPanel();
            content.add(mode);
            final ClickHandler modeHandler = new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    for (int i = 0; i < modes.length; i++) {
                        Button b = modes[i];
                        if (b == event.getSource()) {
                            setDevMode(i);
                        }
                    }
                    hide();
                }
            };
            modes[getDevMode()].setActive(true);
            for (int i = 0; i < modes.length; i++) {
                Button b = modes[i];
                b.addClickHandler(modeHandler);
                mode.add(b);
            }

            Button reset = new DebugButton(Icon.RESET, "Restore defaults.",
                    " Reset");
            reset.addClickHandler(new ClickHandler() {
View Full Code Here

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

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

     * @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

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

  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

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

  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

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

  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

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

  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

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

  /**
   * 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

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

  /**
   * 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
TOP
Copyright © 2018 www.massapi.com. 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.