Package org.zkoss.stateless.sul
Interface ILabel
-
- All Superinterfaces:
IAnyGroup<ILabel>
,IChildrenOfInputgroup<ILabel>
,IComponent<ILabel>
,IHtmlBasedComponent<ILabel>
,IXulElement<ILabel>
public interface ILabel extends IXulElement<ILabel>, IAnyGroup<ILabel>, IChildrenOfInputgroup<ILabel>
ImmutableLabel
componentA label component represents a piece of text.
- Author:
- jumperchen
- See Also:
Label
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ILabel.Builder
Builds instances of typeILabel
.static class
ILabel.Updater
Builds an updater of typeILabel
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getMaxlength()
Returns the maximal length of the label.default java.lang.String
getValue()
Returns the value.default java.lang.String
getWidgetClass()
Returns the client widget class.default boolean
isMultiline()
Returns whether to preserve the new line and the white spaces at the beginning of each line.default boolean
isPre()
Returns whether to preserve the white spaces, such as space, tab and new line.static ILabel
of(java.lang.String value)
Returns the instance with the given value.static ILabel
ofId(java.lang.String id)
Returns the instance with the given id.ILabel
withMaxlength(int maxlength)
Returns a copy ofthis
immutable component with the specifiedmaxlength
.ILabel
withMultiline(boolean multiline)
Returns a copy ofthis
immutable component with the specifiedmultiline
.ILabel
withPre(boolean pre)
Returns a copy ofthis
immutable component with the specifiedpre
.ILabel
withValue(java.lang.String value)
Returns a copy ofthis
immutable component with the specifiedvalue
.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final ILabel DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.wgt.Label"
- Specified by:
getWidgetClass
in interfaceIComponent<ILabel>
-
getValue
default java.lang.String getValue()
Returns the value.Default:
""
.
-
withValue
ILabel withValue(java.lang.String value)
Returns a copy ofthis
immutable component with the specifiedvalue
.Sets the value of the component
- Parameters:
value
- The value of the componentDefault:
""
.- Returns:
- A modified copy of the
this
object
-
getMaxlength
default int getMaxlength()
Returns the maximal length of the label.Default:
0
(means no limitation)
-
withMaxlength
ILabel withMaxlength(int maxlength)
Returns a copy ofthis
immutable component with the specifiedmaxlength
.Sets the maximal length of the label.
- Parameters:
maxlength
- The maximal length of the label.Default:
0
.- Returns:
- A modified copy of the
this
object
-
isMultiline
default boolean isMultiline()
Returns whether to preserve the new line and the white spaces at the beginning of each line.Default:
false
-
withMultiline
ILabel withMultiline(boolean multiline)
Returns a copy ofthis
immutable component with the specifiedmultiline
.Sets whether to preserve the new line and the white spaces at the beginning of each line.
- Parameters:
multiline
- Whether to preserve the new line and the white spaces at the beginning of each line.Default:
false
.- Returns:
- A modified copy of the
this
object
-
isPre
default boolean isPre()
Returns whether to preserve the white spaces, such as space, tab and new line.It is the same as style="white-space:pre".
Note: the new line is preserved either
isPre()
orisMultiline()
returns true.
-
withPre
ILabel withPre(boolean pre)
Returns a copy ofthis
immutable component with the specifiedpre
.Sets whether to preserve the white spaces, such as space, tab and new line.
- Parameters:
pre
- Whether to preserve the white spaces, such as space, tab and new line.Default:
false
.- Returns:
- A modified copy of the
this
object
-
of
static ILabel of(java.lang.String value)
Returns the instance with the given value.- Parameters:
value
- The value of the component.
-
ofId
static ILabel ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id
- The id to identify this component
-
-