Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.FieldSetElement


    public FieldSet(String label, Widget widget) {
        this(label, false, widget);
    }

    public FieldSet(String label, boolean collapsible, Widget widget) {
        FieldSetElement fieldSetElement = FieldSetElement.as(DOM.createFieldSet());
        setElement(fieldSetElement);
        legendElement = LegendElement.as(DOM.createLegend());
        legendElement.setClassName("Legend");
        fieldSetElement.appendChild(legendElement);

        setCollapser(new DefaultCollapser());

        labelElement = DOM.createSpan();
        labelElement.setClassName("Label");
        legendElement.appendChild(labelElement);


        widgetContainerElement = preventBoxStyles(DOM.createDiv());
        fieldSetElement.appendChild(widgetContainerElement);

        setLabel(label);
        setCollapsable(collapsible);
        if (widget != null) {
            setWidget(widget);
View Full Code Here


   }

   @Test
   public void createFieldSet() {
      // Act
      FieldSetElement elem = FieldSetElement.as(DOM.createFieldSet());

      // Assert
      assertEquals("fieldset", elem.getTagName());
   }
View Full Code Here

   * @param asHTML if <code>true</code>, the <code>caption</code> param is
   *            interpreted as HTML; otherwise, <code>caption</code> is
   *            treated as text and automatically escaped
   */
  public CaptionPanel(String caption, boolean asHTML) {
    FieldSetElement fieldSet = Document.get().createFieldSetElement();
    initWidget(new SimplePanel(fieldSet));
    legend = Document.get().createLegendElement();
    fieldSet.appendChild(legend);
    if (asHTML) {
      setCaptionHTML(caption);
    } else {
      setCaptionText(caption);
    }
View Full Code Here

   * @param asHTML if <code>true</code>, the <code>caption</code> param is
   *            interpreted as HTML; otherwise, <code>caption</code> is
   *            treated as text and automatically escaped
   */
  public CaptionPanel(String caption, boolean asHTML) {
    FieldSetElement fieldSet = Document.get().createFieldSetElement();
    initWidget(new SimplePanel(fieldSet));
    legend = Document.get().createLegendElement();
    fieldSet.appendChild(legend);
    if (asHTML) {
      setCaptionHTML(caption);
    } else {
      setCaptionText(caption);
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.FieldSetElement

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.