| org.zkoss.zul.impl.XulElement org.zkoss.zul.Label
Method Summary | |
public String | getEncodedText() Returns the text for generating HTML tags (Internal Use Only).
Used only for component generation. | public int | getMaxlength() Returns the maximal length of the label.
Noteice:
- hyphen="false" and pre="false"
- maxlength is the maximal length to display.
| public String | getOuterAttrs() | public String | getValue() Returns the value. | public void | invalidate() | public boolean | isChildable() No child is allowed. | public boolean | isHyphen() Returns whether to hyphen a long word if maxlength is specified. | public boolean | isIdRequired() Whether to generate the value directly without ID.
Used only for component generated. | public boolean | isMultiline() Returns whether to preserve the new line and the white spaces at the
begining of each line. | public 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". | public void | setHyphen(boolean hyphen) Sets whether to hyphen a long word if maxlength is specified. | public void | setMaxlength(int maxlength) Sets the maximal length of the label. | public void | setMultiline(boolean multiline) Sets whether to preserve the new line and the white spaces at the
begining of each line. | public void | setPre(boolean pre) Sets whether to preserve the white spaces, such as space,
tab and new line. | public void | setValue(String value) Sets the value. |
getEncodedText | public String getEncodedText()(Code) | | Returns the text for generating HTML tags (Internal Use Only).
Used only for component generation. Not for applications.
|
getMaxlength | public int getMaxlength()(Code) | | Returns the maximal length of the label.
Noteice:
- hyphen="false" and pre="false"
- maxlength is the maximal length to display. Exceeding part is truncated.
- hyphen="true"
- maxlength is the maximal length of each line, and hyphenation is added
if a line exceeds maxlength.
- hyphen="false" and pre="true"
- maxlength has no effect.
- maxlength=0
- hyphen has no effect
|
getValue | public String getValue()(Code) | | Returns the value.
Default: "".
|
invalidate | public void invalidate()(Code) | | |
isChildable | public boolean isChildable()(Code) | | No child is allowed.
|
isHyphen | public boolean isHyphen()(Code) | | Returns whether to hyphen a long word if maxlength is specified.
See
Label.getMaxlength for the relationship among pre, hyphen and
maxlength.
|
isIdRequired | public boolean isIdRequired()(Code) | | Whether to generate the value directly without ID.
Used only for component generated. Not for applications.
since: 3.0.0 |
isMultiline | public boolean isMultiline()(Code) | | Returns whether to preserve the new line and the white spaces at the
begining of each line.
Note: the new line is preserved either
Label.isPre or
Label.isMultiline returns true.
In other words, pre implies multiline
|
isPre | public boolean isPre()(Code) | | Returns whether to preserve the white spaces, such as space,
tab and new line.
It is the same as style="white-space:pre". However, IE has a bug when
handling such style if the content is updated dynamically.
Refer to Bug 1455584.
See
Label.getMaxlength for the relationship among pre, hyphen and
maxlength.
Note: the new line is preserved either
Label.isPre or
Label.isMultiline returns true.
In other words, pre implies multiline
|
setHyphen | public void setHyphen(boolean hyphen)(Code) | | Sets whether to hyphen a long word if maxlength is specified.
See
Label.getMaxlength for the relationship among pre, hyphen and
maxlength.
|
setMaxlength | public void setMaxlength(int maxlength)(Code) | | Sets the maximal length of the label.
See
Label.getMaxlength for the relationship among pre, hyphen and
maxlength.
|
setMultiline | public void setMultiline(boolean multiline)(Code) | | Sets whether to preserve the new line and the white spaces at the
begining of each line.
|
setPre | public void setPre(boolean pre)(Code) | | Sets whether to preserve the white spaces, such as space,
tab and new line.
See
Label.getMaxlength for the relationship among pre, hyphen and
maxlength.
|
setValue | public void setValue(String value)(Code) | | Sets the value.
|
|
|