|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Label
A label.
Field Summary |
---|
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Method Summary | |
---|---|
int |
getMaxlength()
Returns the maximal length of the label. |
java.lang.String |
getValue()
Returns the value. |
boolean |
isHyphen()
Returns whether to hyphenate a long word if maxlength is specified. |
boolean |
isMultiline()
Returns whether to preserve the new line and the white spaces at the begining of each line. |
boolean |
isPre()
Returns whether to preserve the white spaces, such as space, tab and new line. |
void |
setHyphen(boolean hyphen)
Sets whether to hyphen a long word if maxlength is specified. |
void |
setMaxlength(int maxlength)
Sets the maximal length of the label. |
void |
setMultiline(boolean multiline)
Sets whether to preserve the new line and the white spaces at the begining of each line. |
void |
setPre(boolean pre)
Sets whether to preserve the white spaces, such as space, tab and new line. |
void |
setValue(java.lang.String value)
Sets the value. |
Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
Methods inherited from interface org.zkoss.zk.ui.ext.Scope |
---|
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute |
Method Detail |
---|
java.lang.String getValue()
Default: "".
void setValue(java.lang.String value)
int getMaxlength()
Noteice:
Since 3.0.4, you can set the style class (@{link #setSclass}) to "word-wrap" to wrap a long word instead of using the hyphen and maxlength property. However, word-wrap is not applicable to Opera (it works fine with FF, IE and Safari).
void setMaxlength(int maxlength)
See getMaxlength()
for the relationship among pre, hyphen and
maxlength.
boolean isPre()
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 getMaxlength()
for the relationship among pre, hyphen and
maxlength.
Note: the new line is preserved either isPre()
or
isMultiline()
returns true. In other words, pre
implies multiline
void setPre(boolean pre)
See getMaxlength()
for the relationship among pre, hyphen and
maxlength.
boolean isMultiline()
Note: the new line is preserved either isPre()
or
isMultiline()
returns true. In other words, pre
implies multiline
void setMultiline(boolean multiline)
boolean isHyphen()
Since 3.0.4, you can set the style class (@{link #setSclass}) to "word-wrap" to wrap a long word instead of using the hyphen and maxlength property. However, word-wrap is not applicable to Opera (it works fine with FF, IE and Safari).
See getMaxlength()
for the relationship among pre, hyphen and
maxlength.
void setHyphen(boolean hyphen)
See getMaxlength()
for the relationship among pre, hyphen and
maxlength.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |