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>
ImmutableLabelcomponentA label component represents a piece of text.
- Author:
- jumperchen
- See Also:
Label
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classILabel.BuilderBuilds instances of typeILabel.static classILabel.UpdaterBuilds an updater of typeILabelforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetMaxlength()Returns the maximal length of the label.default java.lang.StringgetValue()Returns the value.default java.lang.StringgetWidgetClass()Returns the client widget class.default booleanisMultiline()Returns whether to preserve the new line and the white spaces at the beginning of each line.default booleanisPre()Returns whether to preserve the white spaces, such as space, tab and new line.static ILabelof(java.lang.String value)Returns the instance with the given value.static ILabelofId(java.lang.String id)Returns the instance with the given id.ILabelwithMaxlength(int maxlength)Returns a copy ofthisimmutable component with the specifiedmaxlength.ILabelwithMultiline(boolean multiline)Returns a copy ofthisimmutable component with the specifiedmultiline.ILabelwithPre(boolean pre)Returns a copy ofthisimmutable component with the specifiedpre.ILabelwithValue(java.lang.String value)Returns a copy ofthisimmutable 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:
getWidgetClassin interfaceIComponent<ILabel>
-
getValue
default java.lang.String getValue()
Returns the value.Default:
"".
-
withValue
ILabel withValue(java.lang.String value)
Returns a copy ofthisimmutable component with the specifiedvalue.Sets the value of the component
- Parameters:
value- The value of the componentDefault:
"".- Returns:
- A modified copy of the
thisobject
-
getMaxlength
default int getMaxlength()
Returns the maximal length of the label.Default:
0(means no limitation)
-
withMaxlength
ILabel withMaxlength(int maxlength)
Returns a copy ofthisimmutable 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
thisobject
-
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 ofthisimmutable 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
thisobject
-
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 ofthisimmutable 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
thisobject
-
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
-
-