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,
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 |
---|---|
protected void |
doLayout() |
FieldLabel.FieldLabelAppearance |
getAppearance() |
protected XElement |
getContainerTarget() |
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.
|
protected void |
onAfterFirstAttach()
Called immediately after the first time the widget becomes attached to the browser's document only the first time.
|
void |
setHTML(SafeHtml 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, 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, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disableContextMenu, disableEvents, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, 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, 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, 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 String getHTML()
public FormPanel.LabelAlign getLabelAlign()
public int getLabelPad()
public String getLabelSeparator()
public int getLabelWidth()
public boolean isLabelWordWrap()
public String getText()
public void setHTML(SafeHtml html)
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 setText(String text)
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.