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

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


        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.addTab(tab4, 3);
            }
        });
        FlowPanel content5 = new FlowPanel();
        content5.add(button);

        button = new Button("Highlight 3");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.setTabHightlighted("Tab 3", true);
            }
        });
        content5.add(button);

        button = new Button("Rename 6", new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.renameTab("tab6", "Tab 6 *");
            }
        });
        content5.add(button);

        tabs.addTab("Tab 5", content5);
        TabSpec tab6 = new TabSpec("tab6", "Tab 6", null, new HTML("Tab 6 Content"), true);
        tabs.addTab(tab6);

View Full Code Here


            public void onClick(ClickEvent event) {
                formPanel.validate();
            }
        });

        FlowPanel main = new FlowPanel();
        main.add(formPanel);
        main.add(validateButton);

        initWidget(main);
    }
View Full Code Here

      this(visible, new FXOpen(DimensionConstant.Direction.VERTICAL));
  }
 
  public ShowAndHidePanelEx(boolean visible, FXShowAndHide effect) {
      super(visible, effect);
        wrapper = new FlowPanel();
        wrapper.setStyleName("wrapper");
        add(wrapper);
  }
View Full Code Here

        });
       
        int demo = parameters.get("demo", 1);
       
        if(demo==1) {
            FlowPanel slides = new FlowPanel();
            slides.getElement().setClassName("slides");
            slides.getElement().addClassName("accordion");
           
            slides.add(buttonA);
            slides.add(slideA);
            slides.add(buttonB);
            slides.add(slideB);
            slides.add(buttonC);
            slides.add(slideC);
           
            root.add(slides);
        }
        else
        if(demo==2) {
            FlowPanel slides = new FlowPanel();
            slides.getElement().setClassName("slides");
            slides.getElement().addClassName("flow");
           
            slides.add(buttonA);
            slides.add(slideA);
            slides.add(buttonB);
            slides.add(slideB);
            slides.add(buttonC);
            slides.add(slideC);
           
            root.add(slides);
        }
        else
        if(demo==3) {
            FlowPanel tabs = new FlowPanel();
            tabs.getElement().setClassName("tabs");
           
            tabs.add(buttonA);
            tabs.add(buttonB);
            tabs.add(buttonC);
           
            tabs.add(new HTML("<div class=\"clear\"></div>"));
           
            root.add(tabs);
           
            FlowPanel slides = new FlowPanel();
            slides.getElement().setClassName("slides");
            slides.getElement().addClassName("slide-panels");
           
            slides.add(slideA);
            slides.add(slideB);
            slides.add(slideC);
           
            root.add(slides);
        }
        else
        if(demo==4) {
            FlowPanel slides = new FlowPanel();
            slides.getElement().setClassName("slides-top");
            slides.getElement().addClassName("slide-panels");
           
            slides.add(slideA);
            slides.add(slideB);
            slides.add(slideC);
           
            root.add(slides);
           
            FlowPanel tabs = new FlowPanel();
            tabs.getElement().setClassName("tabs-bottom");
           
            tabs.add(buttonA);
            tabs.add(buttonB);
            tabs.add(buttonC);
           
            tabs.add(new HTML("<div class=\"clear\"></div>"));
           
            root.add(tabs);
        }
    }
View Full Code Here

    private List<FieldGroup> fieldGroups = new ArrayList<FieldGroup>();

    private Hints hints = new Hints().set(labelVisible(true), labelGap(10), labelOnTop(false));

    public Widget render(HasFields fields) {
        FlowPanel panel = new FlowPanel();
        panel.getElement().getStyle().setPosition(Style.Position.RELATIVE);
        boolean first = true;
        for (FieldGroup group : fieldGroups) {
            Widget groupWidget = renderFieldGroup(fields, group);
            if (!first) {
                groupWidget.getElement().getStyle().setMarginTop(groupGap, Style.Unit.PX);
            }
            panel.add(groupWidget);
            first = false;
        }
        return panel;
    }
View Full Code Here

    }

    //================================================ Helper Methods ==================================================

    private Widget renderFieldGroup(HasFields fields, FieldGroup group) {
        FlowPanel panel = new FlowPanel();
        boolean first = true;
        for (String fieldKey : group.getFields()) {
            Hints hints = resolveLayoutHints(group, fieldKey);
            Widget fieldRow = renderField(fields.getField(fieldKey), hints);
            if (!first) {
                fieldRow.getElement().getStyle().setMarginTop(lineGap, Style.Unit.PX);
            }
            panel.add(fieldRow);
            first = false;
        }
        String groupName = group.getName();
        return groupName == null ? panel : new FieldSet(groupName, panel);
    }
View Full Code Here

        String groupName = group.getName();
        return groupName == null ? panel : new FieldSet(groupName, panel);
    }

    private Widget renderField(FormField field, Hints hints) {
        FlowPanel panel = new FlowPanel();
        panel.getElement().getStyle().setProperty("clear", "both");
        Widget editor = field.getEditor().getWidget();
        Label label = new Label(field.getLabel());
        if (!hints.getValue(LabelVisibleHint.class)) {
            label.setText("");
        }
        panel.add(label);
        panel.add(editor);
        if (hints.getValue(LabelPositionHint.class) == LabelPositionHint.Value.SIDE) {
            boolean rtl = LocaleInfo.getCurrentLocale().isRTL();
            LayoutUtils.setCssFloat(label.getElement(), rtl ? CssFloat.RIGHT : CssFloat.LEFT);
            label.getElement().getStyle().setProperty("clear", "both");
            if (rtl) {
View Full Code Here

    private Offset offset;

    private final FlowPanel main;

    private TrayNotifier() {
        main = new FlowPanel();
        main.setStylePrimaryName("gtx-TrayNotifier");
        orientation = Orientation.BOTTOM_RIGHT;
        offset = Offset.create(10, 10);
        resetPosition();
        RootPanel.get().add(main);
View Full Code Here

 
  private FlowPanel content;
 
  // TODO ui binder?
  public SpacedPanel() {
    content = new FlowPanel();
    initWidget(content);
    content.getElement().getStyle().setProperty("display", "table");
    content.getElement().getStyle().setTextAlign(TextAlign.CENTER);
  }
View Full Code Here

        return property == true ? "Yes" : "No";
    }

    protected FlowPanel addTab(String label, Widget w)
    {
        FlowPanel detailPanel = new FlowPanel();
        panel.add(detailPanel, label);
        detailPanel.setWidth("100%");
        w.setWidth("100%");
        detailPanel.add(w);
        return detailPanel;
    }
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.