public class FieldLabel extends SimpleContainer implements HasText, HasHTML, HasSafeHtml
Modifier and Type | Class and Description |
---|---|
static interface |
FieldLabel.FieldLabelAppearance
Describes the appearance for a
FieldLabel object. |
class |
FieldLabel.FieldLabelOptions
A set of configuration parameters for a FieldLabel.
|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasWidgets.ForIsWidget
IndexedPanel.ForIsWidget
DEBUG_ID_PREFIX
Constructor and Description |
---|
FieldLabel()
Creates a field label with the default appearance.
|
FieldLabel(IsWidget widget)
Creates a field label with the default appearance for the specified widget.
|
FieldLabel(IsWidget widget,
FieldLabel.FieldLabelAppearance appearance)
Creates a field label with the specified the specified widget and
appearance.
|
FieldLabel(IsWidget widget,
String label)
Creates a field label with the default appearance and the specified widget
and label.
|
FieldLabel(IsWidget widget,
String label,
FieldLabel.FieldLabelAppearance appearance)
Creates a field label with the specified widget, label and appearance.
|
FieldLabel(Widget widget,
FieldLabel.FieldLabelAppearance appearance)
Creates a field label with the specified the specified widget and
appearance.
|
Modifier and Type | Method and Description |
---|---|
FieldLabel.FieldLabelAppearance |
getAppearance() |
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.
|
String |
getLabelSeparator()
Returns the label separator.
|
int |
getLabelWidth()
Returns the label width.
|
String |
getText() |
boolean |
isLabelWordWrap()
Returns true if the label should be allowed to word wrap.
|
void |
setHTML(SafeHtml html) |
void |
setHTML(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(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 |
setLabelWordWrap(boolean wordWrap)
Sets whether the label should be allowed to word wrap.
|
void |
setText(String text) |
void |
setWidget(Widget w) |
add, add, getWidget, isResize, setResize, setWidget
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize
add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, clear, disable, enable, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove
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, getShadowPosition, getStateId, getTabIndex, 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, setShadowPosition, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
public FieldLabel()
setWidget(Widget)
to set the widget and setText(String)
to set the label.public FieldLabel(IsWidget widget)
widget
- the widget to labelpublic FieldLabel(IsWidget widget, FieldLabel.FieldLabelAppearance appearance)
widget
- the widget to labelappearance
- the appearance of the field labelpublic FieldLabel(Widget widget, FieldLabel.FieldLabelAppearance appearance)
widget
- the widget to labelappearance
- the appearance of the field labelpublic FieldLabel(IsWidget widget, String label)
widget
- the widget to labellabel
- the text to use for the labelpublic FieldLabel(IsWidget widget, String label, FieldLabel.FieldLabelAppearance appearance)
widget
- the widget to labellabel
- the text to use for the labelappearance
- the appearance of the field labelpublic FieldLabel.FieldLabelAppearance getAppearance()
public FormPanel.LabelAlign getLabelAlign()
public int getLabelPad()
public String getLabelSeparator()
public int getLabelWidth()
public boolean isLabelWordWrap()
public void setHTML(SafeHtml html)
setHTML
in interface HasSafeHtml
public void setLabelAlign(FormPanel.LabelAlign labelAlign)
labelAlign
- the justification of a field label inside its available
spacepublic void setLabelPad(int labelPad)
labelPad
- the width of the padding between the label and the control
to which the label appliespublic void setLabelSeparator(String labelSeparator)
labelSeparator
- the label separator or "" for nonepublic void setLabelWidth(int labelWidth)
labelWidth
- the label widthpublic void setLabelWordWrap(boolean wordWrap)
wordWrap
- whether label should be allowed to word wrap.public void setWidget(Widget w)
setWidget
in interface HasOneWidget
setWidget
in class SimpleContainer
Copyright © 2015. All rights reserved.