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>
Immutable
Label component
A label component represents a piece of text.
- Author:
- jumperchen
- See Also:
-
Label
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeILabel.static classBuilds an updater of typeILabelforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault intReturns the maximal length of the label.default StringgetValue()Returns the value.default StringReturns the client widget class.default booleanReturns 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 ILabelReturns the instance with the given value.static ILabelReturns the instance with the given id.withMaxlength(int maxlength) Returns a copy ofthisimmutable component with the specifiedmaxlength.withMultiline(boolean multiline) Returns a copy ofthisimmutable component with the specifiedmultiline.withPre(boolean pre) Returns a copy ofthisimmutable component with the specifiedpre.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, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zul.wgt.Label"- Specified by:
getWidgetClassin interfaceIComponent<ILabel>
-
getValue
Returns the value.Default:
"". -
withValue
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
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
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
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
Returns the instance with the given value.- Parameters:
value- The value of the component.
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-