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

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.FieldLabel
All Implemented Interfaces:
HasAttachHandlers, HasResizeHandlers, HasHandlers, HasSafeHtml, EventListener, AcceptsOneWidget, HasEnabled, HasHTML, HasOneWidget, HasText, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, ProvidesResize, RequiresResize, HasLayout, AddEvent.HasAddHandlers, BeforeAddEvent.HasBeforeAddHandlers, BeforeHideEvent.HasBeforeHideHandlers, BeforeRemoveEvent.HasBeforeRemoveHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, ContainerHandler.HasContainerHandlers, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MoveEvent.HasMoveHandlers, RemoveEvent.HasRemoveHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasItemId, java.lang.Iterable<Widget>

public class FieldLabel
extends SimpleContainer
implements HasText, HasHTML, HasSafeHtml

Form field wrapper to add a label and validation error text.


Nested Class Summary
static interface FieldLabel.FieldLabelAppearance
          Describes the appearance for a FieldLabel object.
 class FieldLabel.FieldLabelOptions
          A set of configuration parameters for a FieldLabel.
 
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
FieldLabel()
          Creates a field label with the default appearance.
FieldLabel(Widget widget)
          Creates a field label with the default appearance for the specified widget.
FieldLabel(Widget widget, FieldLabel.FieldLabelAppearance appearance)
          Creates a field label with the specified the specified widget and appearance.
FieldLabel(Widget widget, java.lang.String label)
          Creates a field label with the default appearance and the specified widget and label.
FieldLabel(Widget widget, java.lang.String label, FieldLabel.FieldLabelAppearance appearance)
          Creates a field label with the specified widget, label and appearance.
 
Method Summary
 java.lang.String getHTML()
           
 FormPanel.LabelAlign getLabelAlign()
          Returns the justification of a field label inside its available space.
 int getLabelPad()
          Returns the width of the padding between the label and the control to which the label applies.
 java.lang.String getLabelSeparator()
          Returns the label separator.
 int getLabelWidth()
          Returns the label width.
 java.lang.String getText()
           
 void setHTML(SafeHtml html)
           
 void setHTML(java.lang.String html)
           
 void setLabelAlign(FormPanel.LabelAlign labelAlign)
          Sets the justification of a field label inside its available space.
 void setLabelPad(int labelPad)
          Sets the width of the padding between the label and the control to which the label applies.
 void setLabelSeparator(java.lang.String labelSeparator)
          The standard separator to display after the text of each form label (defaults to colon ':').
 void setLabelWidth(int labelWidth)
          Sets the label width (defaults to 100).
 void setText(java.lang.String text)
           
 void setWidget(Widget w)
           
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.SimpleContainer
add, add, getWidget, isResize, setResize, 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

FieldLabel

public FieldLabel()
Creates a field label with the default appearance. To be useful, use setWidget(Widget) to set the widget and setText(String) to set the label.


FieldLabel

public FieldLabel(Widget widget)
Creates a field label with the default appearance for the specified widget.

Parameters:
widget - the widget to label

FieldLabel

public FieldLabel(Widget widget,
                  FieldLabel.FieldLabelAppearance appearance)
Creates a field label with the specified the specified widget and appearance.

Parameters:
widget - the widget to label
appearance - the appearance of the field label

FieldLabel

public FieldLabel(Widget widget,
                  java.lang.String label)
Creates a field label with the default appearance and the specified widget and label.

Parameters:
widget - the widget to label
label - the text to use for the label

FieldLabel

public FieldLabel(Widget widget,
                  java.lang.String label,
                  FieldLabel.FieldLabelAppearance appearance)
Creates a field label with the specified widget, label and appearance.

Parameters:
widget - the widget to label
label - the text to use for the label
appearance - the appearance of the field label
Method Detail

getHTML

public java.lang.String getHTML()
Specified by:
getHTML in interface HasHTML

getLabelAlign

public FormPanel.LabelAlign getLabelAlign()
Returns the justification of a field label inside its available space.

Returns:
the justification of a field label inside its available space

getLabelPad

public int getLabelPad()
Returns the width of the padding between the label and the control to which the label applies.

Returns:
the width of the padding between the label and the control to which the label applies

getLabelSeparator

public java.lang.String getLabelSeparator()
Returns the label separator.

Returns:
the label separator

getLabelWidth

public int getLabelWidth()
Returns the label width.

Returns:
the label width

getText

public java.lang.String getText()
Specified by:
getText in interface HasText

setHTML

public void setHTML(SafeHtml html)
Specified by:
setHTML in interface HasSafeHtml

setHTML

public void setHTML(java.lang.String html)
Specified by:
setHTML in interface HasHTML

setLabelAlign

public void setLabelAlign(FormPanel.LabelAlign labelAlign)
Sets the justification of a field label inside its available space.

Parameters:
labelAlign - the justification of a field label inside its available space

setLabelPad

public void setLabelPad(int labelPad)
Sets the width of the padding between the label and the control to which the label applies.

Parameters:
labelPad - the width of the padding between the label and the control to which the label applies

setLabelSeparator

public void setLabelSeparator(java.lang.String labelSeparator)
The standard separator to display after the text of each form label (defaults to colon ':').

Parameters:
labelSeparator - the label separator or "" for none

setLabelWidth

public void setLabelWidth(int labelWidth)
Sets the label width (defaults to 100).

Parameters:
labelWidth - the label width

setText

public void setText(java.lang.String text)
Specified by:
setText in interface HasText

setWidget

public void setWidget(Widget w)
Specified by:
setWidget in interface HasOneWidget
Overrides:
setWidget in class SimpleContainer


Copyright © 2012. All Rights Reserved.