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

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


      FlowPanel contents = ((FlowPanel)((FlowPanel)getWidget()).getWidget(1));
      contents.add(w);
    }
   
    public void setCaption(String caption) {
      FlowPanel contents = ((FlowPanel)((FlowPanel)getWidget()).getWidget(1));
      contents.clear();
      contents.add(new HTML(caption));
    }
View Full Code Here


      contents.clear();
      contents.add(new HTML(caption));
    }
   
    public String getCaption() {
      FlowPanel contents = ((FlowPanel)((FlowPanel)getWidget()).getWidget(1));
      if (contents.getWidgetCount() > 0) {
          HTML w = (HTML) contents.getWidget(0);
          return w.getHTML();
      }
      return "";
    }
View Full Code Here

    initDoc();
  }

  @SuppressWarnings("static")
  private FlowPanel createComplexWidget() {
    FlowPanel panel = new FlowPanel();
    FlowPanel child = new FlowPanel();
    panel.add(child);
    return panel;
  }
View Full Code Here

      toggleEditCheck1 = createEditToggleCheckBox(editor1);
      toggleEditCheck2 = createEditToggleCheckBox(editor2);

      operationOutput.setStyleName("operation");

      final FlowPanel editMain = new FlowPanel();
      editMain.setStyleName("main");
      HorizontalPanel editors = new HorizontalPanel();
      FlowPanel editorStack1 = new FlowPanel();
      FlowPanel editorStack2 = new FlowPanel();

      editorStack1.add(editor1.getWidget());
      editorStack1.add(displayDoc1);
      editorStack1.add(toggleEditCheck1);
      editorStack1.add(disabledCheck);
      editorStack1.add(documentModeSelect);
//      xx editorStack1.add(disabledCheck);
      if (LogLevel.showDebug()) {
        editorStack1.add(prettyContent1);
      }

      editorStack2.add(editor2.getWidget());
      editorStack2.add(toggleEditCheck2);
      editorStack2.add(diffCheck);
      editorStack2.add(createEditor2DocDetached);
      if (LogLevel.showDebug()) {
        editorStack2.add(prettyContent2);
      }

      editors.add(editorStack1);
      if (LogLevel.showDebug()) {
        editors.add(prettyHtml1);
      }
      editors.add(editorStack2);
      if (LogLevel.showDebug()) {
        editors.add(prettyHtml2);
      }

      HorizontalPanel operations = new HorizontalPanel();
      operations.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
      queuingCheck.addClickHandler(queuingCheckHandler);
      disabledCheck.addClickHandler(disabledCheckHandler);
      diffCheck.addClickHandler(diffCheckHandler);
      setPlayButtonState();
      operations.add(clearAnnotationsButton);
      operations.add(queuingCheck);
      operations.add(playButton);
      operations.add(new Label("Operation:"));
      operations.add(operationOutput);

      editMain.add(operations);
      editMain.add(editors);

      // Exactly one of these methods should be uncommented.
//      initContentText();
      initContentOracle();

      widgetRow = new FlowPanel();

      widgetRow.add(clearEditorsButton);
      widgetRow.add(setContentButton);

      widgetRow.add(new InlineLabel("<body><line/>"));
      widgetRow.add(contentBox != null ? contentBox : contentSuggestBox);
      widgetRow.add(new InlineLabel("</body>"));

      Button clearContentBoxButton = new Button("Clear text", new ClickHandler() {
        public void onClick(ClickEvent e) {
          if (contentBox != null) {
            contentBox.setValue("");
          } else {
            contentSuggestBox.setValue("");
          }
        }
      });
      clearContentBoxButton.getElement().setId("clear-content-box");
      widgetRow.add(clearContentBoxButton);
      // Hide it, only really used for webdriver tests
      clearContentBoxButton.setVisible(false);

      if (LogLevel.showDebug()) {
        widgetRow.add(new FlowPanel());
        widgetRow.add(clearLogButton);
        widgetRow.add(quietButton);
        widgetRow.add(loudButton);
      }
View Full Code Here

    };
    final SignalEventHarness eventHarness = new SignalEventHarness();

    // Poor man's tab panel. Use a tab panel once OOPHM is fixed to not break with it,
    // in the same way as the oracle box.
    FlowPanel topLevel = new FlowPanel();
    final ListBox selector = new ListBox();
    selector.addItem("edit");
    selector.addItem("event");
    selector.getElement().setId(TestConstants.PAGE_MODE_SELECTOR);
    selector.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent e) {
        if (selector.isItemSelected(0)) {
          editorHarness.getElement().getStyle().setDisplay(Display.BLOCK);
          eventHarness.getElement().getStyle().setDisplay(Display.NONE);
        } else {
          editorHarness.getElement().getStyle().setDisplay(Display.NONE);
          eventHarness.getElement().getStyle().setDisplay(Display.BLOCK);
        }
      }
    });
    topLevel.add(selector);
    topLevel.add(editorHarness);
    topLevel.add(eventHarness);

    RootPanel.get().add(topLevel);

    editorHarness.getEditor1().focus(true);
  }
View Full Code Here

      public void onClick(ClickEvent e) {
        eventTestLog.setInnerHTML("");
      }
    });
    clearButton.getElement().setId(TestConstants.CLEAR_EVENT_LOG);
    FlowPanel eventMain = new FlowPanel();
    TextArea eventText = new TextArea();
    eventText.getElement().setId(TestConstants.EVENT_INPUT);
    eventTestLog.setId(TestConstants.EVENT_SIGNAL_LOG);
    eventTestLog.getStyle().setBorderColor("black");
    eventTestLog.getStyle().setBorderWidth(1, Unit.PX);
    eventTestLog.getStyle().setBorderStyle(BorderStyle.SOLID);
    for (String event : new String[] {"keydown", "keypress", "keyup"}) {
      DomHelper.registerEventHandler(eventText.getElement(), event, new JavaScriptEventListener() {
        public void onJavaScriptEvent(String name, Event event) {
          SignalEvent signal = SignalEventImpl.create(event, true);
          if (signal == null) {
            return;
          }

          addInfo(EventInfo.TYPE, name);
          addInfo(EventInfo.KEYSIGNAL, signal.getKeySignalType().toString());
          addInfo(EventInfo.KEYCODE, Integer.toString(signal.getKeyCode()));
          addInfo(EventInfo.GETSHIFT, signal.getShiftKey() + "");
          addInfo(EventInfo.GETALT, signal.getAltKey() + "");
          addInfo(EventInfo.GETCTRL, signal.getCtrlKey() + "");
          addInfo(EventInfo.GETMETA, signal.getMetaKey() + "");
          addInfo(EventInfo.GETCOMMAND, signal.getCommandKey() + "");

          eventTestLog.appendChild(Document.get().createBRElement());
        }

        private void addInfo(EventInfo info, String value) {
          SpanElement el = Document.get().createSpanElement();
          el.addClassName(info.className());
          el.setInnerText(value);
          eventTestLog.appendChild(Document.get().createTextNode(" " + info + ":"));
          eventTestLog.appendChild(el);
        }
      });
    }
    eventMain.add(eventText);
    eventMain.add(clearButton);
    eventMain.getElement().appendChild(eventTestLog);

    initWidget(eventMain);
  }
View Full Code Here

  private AnimationEndCallback lastCallback;

  public AnimationWidgetKeyFrameImpl() {

    main = new FlowPanel() {
      protected void onDetach() {
        super.onDetach();

        if (animationRunning) {
          onAnimationEnd(currentAnimation);
View Full Code Here

    display.addStyleName(appearance.dialogCss().animationContainerShadow());
    display.addStyleName(appearance.dialogCss().z_index());

    touchDelegate = new TouchDelegate(display);

    container = new FlowPanel();

    container.addStyleName(appearance.dialogCss().animationContainer());

    Element shadow = container.getElement();
View Full Code Here

     * Construct an {@link IpadMenu} with a given css
     *
     * @param css the css to use
     */
    public IpadMenu(Object css) {
      main = new FlowPanel();
      //css.ensureInjected();
      initWidget(main);

      //setStylePrimaryName(css.main());

      // arrow
      menuArrow = new FlowPanel();
      //menuArrow.setStylePrimaryName(css.arrow());
      main.add(menuArrow);

      content = new FlowPanel();
      //content.addStyleName(css.content());

      main.add(content);

    }
View Full Code Here

    scrollPanel = new ScrollPanel();
    scrollPanel.addStyleName(this.appearance.css().carouselScroller());

    main.add(scrollPanel);

    container = new FlowPanel();
    container.addStyleName(this.appearance.css().carouselContainer());

    scrollPanel.setWidget(container);

    scrollPanel.setSnap(true);
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.