|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HtmlBasedComponent
A skeletal implementation for HTML based components. It simplifies to implement methods common to HTML based components.
It supports
getSclass()
, getZclass()
, and getStyle()
.getWidth()
, getHeight()
, getLeft()
, getTop()
,
getZIndex()
focus()
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 | |
---|---|
void |
focus()
Sets focus to this element. |
java.lang.String |
getHeight()
Returns the height. |
java.lang.String |
getLeft()
Returns the left position. |
java.lang.String |
getSclass()
Returns the CSS class. |
java.lang.String |
getStyle()
Returns the CSS style. |
java.lang.String |
getTooltiptext()
Returns the text as the tooltip. |
java.lang.String |
getTop()
Returns the top position. |
java.lang.String |
getWidth()
Returns the width. |
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component. |
int |
getZindex()
Returns the Z index. |
int |
getZIndex()
Returns the Z index. |
void |
setDraggable(java.lang.String draggable)
Sets "true" or "false" to denote whether a component is draggable, or an identifier of a draggable type of objects. |
void |
setDroppable(java.lang.String droppable)
Sets "true" or "false" to denote whether a component is droppable, or a list of identifiers of draggable types of objects that could be droped to this component. |
void |
setFocus(boolean focus)
Sets focus to this element. |
void |
setHeight(java.lang.String height)
Sets the height. |
void |
setLeft(java.lang.String left)
Sets the left position. |
void |
setSclass(java.lang.String sclass)
Sets the CSS class. |
void |
setStyle(java.lang.String style)
Sets the CSS style. |
void |
setTooltiptext(java.lang.String tooltiptext)
Sets the text as the tooltip. |
void |
setTop(java.lang.String top)
Sets the top position. |
void |
setWidth(java.lang.String width)
Sets the width. |
void |
setZclass(java.lang.String zclass)
Sets the ZK Cascading Style class(es) for this component. |
void |
setZindex(int zIndex)
Sets the Z index. |
void |
setZIndex(int zIndex)
Sets the Z index. |
Methods inherited from interface org.zkoss.zk.ui.ext.Scope |
---|
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute |
Method Detail |
---|
java.lang.String getLeft()
void setLeft(java.lang.String left)
java.lang.String getTop()
void setTop(java.lang.String top)
int getZIndex()
Default: -1 (means system default;
void setZIndex(int zIndex)
int getZindex()
getZIndex()
.
void setZindex(int zIndex)
setZIndex(int)
.
java.lang.String getHeight()
Default: null.
void setHeight(java.lang.String height)
java.lang.String getWidth()
Default: null.
void setWidth(java.lang.String width)
java.lang.String getTooltiptext()
Default: null.
void setTooltiptext(java.lang.String tooltiptext)
java.lang.String getZclass()
Default: null (the default value depends on element).
setZclass(java.lang.String)
) will completely replace the default style of a
component. In other words, the default style of a component is associated
with the default value of getZclass()
. Once it is changed, the
default style won't be applied at all. If you want to perform small
adjustments, use setSclass(java.lang.String)
instead.
HtmlBasedComponent.getSclass()
void setZclass(java.lang.String zclass)
HtmlBasedComponent.setSclass(java.lang.String)
,
HtmlBasedComponent.getZclass()
java.lang.String getSclass()
Default: null.
The default styles of ZK components doesn't depend on the value of
getSclass()
. Rather, setSclass(java.lang.String)
is provided to perform
small adjustment, e.g., only changing the font size. In other words, the
default style is still applied if you change the value of
getSclass()
, unless you override it. To replace the default style
completely, use setZclass(java.lang.String)
instead.
HtmlBasedComponent.getZclass()
void setSclass(java.lang.String sclass)
HtmlBasedComponent.setZclass(java.lang.String)
java.lang.String getStyle()
Default: null.
void setStyle(java.lang.String style)
void setDraggable(java.lang.String draggable)
The simplest way to make a component draggable is to set this attribute to true. To disable it, set this to false.
If there are several types of draggable objects, you could assign an identifier for each type of draggable object. The identifier could be anything but empty.
draggable
- "false", null or "" to denote non-draggable; "true" for
draggable with anonymous identifier; others for an identifier
of draggable.void setDroppable(java.lang.String droppable)
The simplest way to make a component droppable is to set this attribute to true. To disable it, set this to false.
If there are several types of draggable objects and this component accepts only some of them, you could assign a list of identifiers that this component accepts, separated by comma. For example, if this component accpets dg1 and dg2, then assign "dg1, dg2" to this attribute.
droppable
- "false", null or "" to denote not-droppable; "true" for
accepting any draggable types; a list of identifiers,
separated by comma for identifiers of draggables this compoent
accept (to be dropped in).void focus()
void setFocus(boolean focus)
focus()
, but used to
allow ZUML to set focus to particular component.
<code><textbox focus="true"/></code>
focus
- whether to set focus. If false, this method has no effect.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |