com.sencha.gxt.widget.core.client.form
Class FieldSet

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.container.Container
                  extended by com.sencha.gxt.widget.core.client.container.ResizeContainer
                      extended by com.sencha.gxt.widget.core.client.container.SimpleContainer
                          extended by com.sencha.gxt.widget.core.client.form.FieldSet
All Implemented Interfaces:
HasAttachHandlers, HasResizeHandlers, HasHandlers, EventListener, AcceptsOneWidget, HasEnabled, HasOneWidget, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, ProvidesResize, RequiresResize, Collapsible, HasLayout, AddEvent.HasAddHandlers, BeforeAddEvent.HasBeforeAddHandlers, BeforeCollapseEvent.HasBeforeCollapseHandlers, BeforeExpandEvent.HasBeforeExpandHandlers, BeforeHideEvent.HasBeforeHideHandlers, BeforeRemoveEvent.HasBeforeRemoveHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, CollapseEvent.HasCollapseHandlers, ContainerHandler.HasContainerHandlers, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, ExpandEvent.HasExpandHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MoveEvent.HasMoveHandlers, RemoveEvent.HasRemoveHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasItemId, java.lang.Iterable<Widget>

public class FieldSet
extends SimpleContainer
implements BeforeExpandEvent.HasBeforeExpandHandlers, ExpandEvent.HasExpandHandlers, BeforeCollapseEvent.HasBeforeCollapseHandlers, CollapseEvent.HasCollapseHandlers, Collapsible

A simple container that wraps its content in a HTML fieldset. FieldSet support collapsing which can be enabled using setCollapsible(boolean).


Nested Class Summary
static interface FieldSet.FieldSetAppearance
           
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
IndexedPanel.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
FieldSet()
          Creates a new field set.
FieldSet(FieldSet.FieldSetAppearance appearance)
          Creates a new field set.
 
Method Summary
 HandlerRegistration addBeforeCollapseHandler(BeforeCollapseEvent.BeforeCollapseHandler handler)
          Adds a BeforeCollapseEvent.BeforeCollapseHandler handler for BeforeCollapseEvent events.
 HandlerRegistration addBeforeExpandHandler(BeforeExpandEvent.BeforeExpandHandler handler)
          Adds a BeforeExpandEvent.BeforeExpandHandler handler for BeforeExpandEvent events.
 HandlerRegistration addCollapseHandler(CollapseEvent.CollapseHandler handler)
          Adds a CollapseEvent.CollapseHandler handler for CollapseEvent events.
 HandlerRegistration addExpandHandler(ExpandEvent.ExpandHandler handler)
          Adds a ExpandEvent.ExpandHandler handler for ExpandEvent events.
 void collapse()
          Collapses the widget.
 void expand()
          Expands the widget.
 ToolButton getCollapseButton()
          Returns the collapse button.
 java.lang.String getHeadingHtml()
          Returns the heading.
 java.lang.String getHeadingText()
          Returns the heading.
 boolean isCollapsible()
          Returns true if the fieldset is collapsible.
 boolean isExpanded()
          Returns true if the widget is expanded.
 void setCollapsible(boolean collapsible)
          Sets whether the fieldset is collapsible (defaults to false, pre-render).
 void setExpanded(boolean expand)
          Convenience method to expand / collapse the field set by invoking expand() or collapse().
 void setHeadingHtml(java.lang.String heading)
          Sets the heading.
 void setHeadingText(java.lang.String heading)
          Sets the heading.
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.SimpleContainer
add, add, getWidget, isResize, setResize, setWidget, setWidget
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.ResizeContainer
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.Container
add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, clear, disable, enable, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disableEvents, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getStateId, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, onBrowserEvent, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldSet

public FieldSet()
Creates a new field set.


FieldSet

public FieldSet(FieldSet.FieldSetAppearance appearance)
Creates a new field set.

Parameters:
appearance - the field set appearance
Method Detail

addBeforeCollapseHandler

public HandlerRegistration addBeforeCollapseHandler(BeforeCollapseEvent.BeforeCollapseHandler handler)
Description copied from interface: BeforeCollapseEvent.HasBeforeCollapseHandlers
Adds a BeforeCollapseEvent.BeforeCollapseHandler handler for BeforeCollapseEvent events.

Specified by:
addBeforeCollapseHandler in interface BeforeCollapseEvent.HasBeforeCollapseHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

addBeforeExpandHandler

public HandlerRegistration addBeforeExpandHandler(BeforeExpandEvent.BeforeExpandHandler handler)
Description copied from interface: BeforeExpandEvent.HasBeforeExpandHandlers
Adds a BeforeExpandEvent.BeforeExpandHandler handler for BeforeExpandEvent events.

Specified by:
addBeforeExpandHandler in interface BeforeExpandEvent.HasBeforeExpandHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

addCollapseHandler

public HandlerRegistration addCollapseHandler(CollapseEvent.CollapseHandler handler)
Description copied from interface: CollapseEvent.HasCollapseHandlers
Adds a CollapseEvent.CollapseHandler handler for CollapseEvent events.

Specified by:
addCollapseHandler in interface CollapseEvent.HasCollapseHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

addExpandHandler

public HandlerRegistration addExpandHandler(ExpandEvent.ExpandHandler handler)
Description copied from interface: ExpandEvent.HasExpandHandlers
Adds a ExpandEvent.ExpandHandler handler for ExpandEvent events.

Specified by:
addExpandHandler in interface ExpandEvent.HasExpandHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

collapse

public void collapse()
Description copied from interface: Collapsible
Collapses the widget.

Specified by:
collapse in interface Collapsible

expand

public void expand()
Description copied from interface: Collapsible
Expands the widget.

Specified by:
expand in interface Collapsible

getCollapseButton

public ToolButton getCollapseButton()
Returns the collapse button.

Returns:
the collapse button or null if field set not collapsible

getHeadingHtml

public java.lang.String getHeadingHtml()
Returns the heading.

Returns:
the heading HTML

getHeadingText

public java.lang.String getHeadingText()
Returns the heading.

Returns:
the heading text

isCollapsible

public boolean isCollapsible()
Returns true if the fieldset is collapsible.

Returns:
true if collapsible

isExpanded

public boolean isExpanded()
Description copied from interface: Collapsible
Returns true if the widget is expanded.

Specified by:
isExpanded in interface Collapsible
Returns:
true for expanded

setCollapsible

public void setCollapsible(boolean collapsible)
Sets whether the fieldset is collapsible (defaults to false, pre-render). This method only configures the field set to be collapsible and does not change the expand / collapse state. Use setExpanded(boolean), expand(), and collapse() to expand and collapse the field set.

Parameters:
collapsible - true to enable collapsing

setExpanded

public void setExpanded(boolean expand)
Convenience method to expand / collapse the field set by invoking expand() or collapse().

Parameters:
expand - true to expand the field set, otherwise collapse

setHeadingHtml

public void setHeadingHtml(java.lang.String heading)
Sets the heading.

Parameters:
heading - the heading HTML

setHeadingText

public void setHeadingText(java.lang.String heading)
Sets the heading.

Parameters:
heading - the heading text


Copyright © 2012. All Rights Reserved.