public class FieldLabel extends SimpleContainer
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.
|
resize, widget
forceLayoutCommand, forceLayoutOnResize, hadLayoutRunning, layoutCommand, layoutRequiredThisEventLoop, layoutRunning
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
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,
SafeHtml html)
Creates a field label with the default appearance and the specified widget
and label html.
|
FieldLabel(IsWidget widget,
SafeHtml html,
FieldLabel.FieldLabelAppearance appearance)
Creates a field label with the specified widget, label html and appearance.
|
FieldLabel(IsWidget widget,
String text)
Creates a field label with the default appearance and the specified widget
and label text.
|
FieldLabel(IsWidget widget,
String text,
FieldLabel.FieldLabelAppearance appearance)
Creates a field label with the specified widget, label text 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 |
---|---|
protected void |
doLayout() |
FieldLabel.FieldLabelAppearance |
getAppearance() |
protected XElement |
getContainerTarget() |
SafeHtml |
getContent()
Returns the content of the label.
|
String |
getHTML()
Returns the content of the label as html.
|
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()
Returns the content of the label as text.
|
boolean |
isLabelWordWrap()
Returns true if the label should be allowed to word wrap.
|
protected void |
onAfterFirstAttach()
Called immediately after the first time the widget becomes attached to the browser's document only the first time.
|
void |
setContent(SafeHtml html)
Sets the content of the label as html.
|
void |
setHTML(SafeHtml html)
Sets the content of the label as 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)
Sets the content of the label as text.
|
void |
setWidget(Widget w) |
add, add, getWidget, isResize, onRemove, setElement, setResize
applyLayout, applyLayout, forceLayout, forceLayoutOnChildren, forceLayoutOnChildren, getLeftRightMargins, getParentLayoutWidget, getSideMargins, getTopBottomMargins, isLayoutRunning, isOrWasLayoutRunning, isWidgetVisible, onBeforeDoLayout, onLoad, onResize, onResize
addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, adjustIndex, adopt, checkIndexBoundsForInsertion, clear, disable, doAttachChildren, doDetachChildren, doPhysicalAttach, doPhysicalDetach, enable, ensureGroupingHandlerRegistration, findWidget, getChildren, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, onInsert, onWidgetHide, onWidgetShow, orphan, remove, remove, remove
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disableContextMenu, disableEvents, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAttach, onBlur, onBrowserEvent, onDetach, onDisable, onEnable, onFocus, onHide, onHideContextMenu, onPosition, onRightClick, onShow, onShowContextMenu, onTouch, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
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, SafeHtml html)
widget
- the widget to labelhtml
- the html to use for the labelpublic FieldLabel(IsWidget widget, String text)
widget
- the widget to labeltext
- the text to use for the labelpublic FieldLabel(IsWidget widget, SafeHtml html, FieldLabel.FieldLabelAppearance appearance)
widget
- the widget to labelhtml
- the html to use for the labelappearance
- the appearance of the field labelpublic FieldLabel(IsWidget widget, String text, FieldLabel.FieldLabelAppearance appearance)
widget
- the widget to labeltext
- the text to use for the labelappearance
- the appearance of the field labelpublic FieldLabel.FieldLabelAppearance getAppearance()
public SafeHtml getContent()
public void setContent(SafeHtml html)
html
- the label content htmlpublic String getText()
getHTML()
public void setText(String text)
text
- the textpublic String getHTML()
public void setHTML(SafeHtml html)
html
- the htmlpublic FormPanel.LabelAlign getLabelAlign()
public int getLabelPad()
public String getLabelSeparator()
public int getLabelWidth()
public boolean isLabelWordWrap()
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 class SimpleContainer
protected void doLayout()
doLayout
in class SimpleContainer
protected XElement getContainerTarget()
getContainerTarget
in class Container
protected void onAfterFirstAttach()
Component
onAfterFirstAttach
in class Component
Copyright © 2018. All rights reserved.