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

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


   /**
     * Constructor.
     */
    public ExplorerPageTemplate() {
      // Setup the main layout widget
        FlowPanel layout = new FlowPanel();
        initWidget(layout);

        // Setup the top panel with the title and links
        createTopPanel();
        layout.add(topPanel);

        // Add the main menu
        mainPanel = new HorizontalPanel();
        mainPanel.setSize("100%","100%");

        mainPanel.setSpacing(0);
        mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
        layout.add(mainPanel);
    }
View Full Code Here


        public PostDisplay(ForumPost post) {

            HorizontalPanel mainP = new HorizontalPanel();

            FlowPanel authorSide = new FlowPanel();
            authorSide.setStylePrimaryName("AuthorSide");
            VerticalPanel postSide = new VerticalPanel();
            postSide.setStylePrimaryName("PostSide");

            authorSide.add(new Label("Author: "));
            UserLink author = new UserLink(post.getAuthor());
            authorSide.add(author);

            Label date = new Label(df.format(post.getDate()));
            date.addStyleDependentName("Date");
            authorSide.add(date);

            Label postT = new Label(post.getPostTitle());
            postT.addStyleDependentName("title");
            postSide.add(postT);
View Full Code Here

  /**
   * Sets up the date picker.
   */
  protected void setup() {
    FlowPanel panel = new FlowPanel();
    initWidget(panel);
    setStyleName(Styles.DEFAULT);
    panel.add(this.getMonthSelector());
    showDate(new Date());
    panel.add(this.getCalendarView());
  }
View Full Code Here

  private Panel createSchoolNavBar() {
    controlButton = createToggleButton();

    MyStackPanel wrapper = new MyStackPanel();
    FlowPanel navBar = new FlowPanel();
    navBar.setSize("200px", "100%");
    final HTML title = new HTML("School Directory");

    HorizontalPanel panel = new HorizontalPanel();
    panel.setWidth("100%");

    panel.setCellHorizontalAlignment(controlButton,
        HasHorizontalAlignment.ALIGN_LEFT);

    panel.add(title);
    panel.add(controlButton);
    panel.setCellWidth(controlButton, "1px");
    panel.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_CENTER);

    navBar.add(panel);

    panel.setStyleName("nav-Tree-title");
    wrapper = new MyStackPanel();
    wrapper.setHeight("250px");

    final FastTree contents = new FastTree();
    wrapper.add(contents, "<b>People</b>", true);

    wrapper.add(new Label("None"), "<b>Academics</b>", true);
    navBar.add(wrapper);

    FastTreeItem students = contents.addItem("Students");
    students.addItem("Jill");
    students.addItem("Jack");
    students.addItem("Molly");
View Full Code Here

   * Constructor.
   *
   * @param picker the picker to drop down
   */
  public DateBox(final DatePicker picker) {
    FlowPanel p = new FlowPanel();
    p.add(box);
    this.picker = picker;
    popup.setWidget(picker);
    initWidget(p);
    setStyleName(Styles.DEFAULT);
    picker.addChangeHandler(new ChangeHandler<Date>() {
View Full Code Here

        });

        popup = new VOverlay(true, false, true);
        popup.setOwner(this);

        FlowPanel wrapper = new FlowPanel();
        selectedDate = new Label();
        selectedDate.setStyleName(getStylePrimaryName() + "-selecteddate");
        AriaHelper.setVisibleForAssistiveDevicesOnly(selectedDate.getElement(),
                true);

        Roles.getTextboxRole().setAriaLiveProperty(selectedDate.getElement(),
                LiveValue.ASSERTIVE);
        Roles.getTextboxRole().setAriaAtomicProperty(selectedDate.getElement(),
                true);
        wrapper.add(selectedDate);
        wrapper.add(calendar);

        popup.setWidget(wrapper);
        popup.addCloseHandler(this);

        DOM.setElementProperty(calendar.getElement(), "id",
View Full Code Here

    }

    public VTwinColSelect() {
        super(CLASSNAME);

        captionWrapper = new FlowPanel();

        options = new DoubleClickListBox();
        options.addClickHandler(this);
        options.addDoubleClickHandler(this);
        options.setVisibleItemCount(VISIBLE_COUNT);
        options.setStyleName(CLASSNAME + "-options");

        selections = new DoubleClickListBox();
        selections.addClickHandler(this);
        selections.addDoubleClickHandler(this);
        selections.setVisibleItemCount(VISIBLE_COUNT);
        selections.setStyleName(CLASSNAME + "-selections");

        buttons = new FlowPanel();
        buttons.setStyleName(CLASSNAME + "-buttons");
        add = new VButton();
        add.setText(">>");
        add.addClickHandler(this);
        remove = new VButton();
View Full Code Here

    /** For internal use only. May be removed or replaced in the future. */
    public VNativeButton newItemButton;

    public VOptionGroupBase(String classname) {
        container = new FlowPanel();
        initWidget(container);
        optionsContainer = container;
        container.setStyleName(classname);
        immediate = false;
        multiselect = false;
View Full Code Here

                 * 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

            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

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.