|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
public abstract class XulElement
The fundamental class for XUL elements.
Events:
onOK, onCacnel and onCtrlKey.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
HtmlBasedComponent.ExtraCtrl |
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
AbstractComponent.Children |
Field Summary |
---|
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
_height, _left, _top, _width, _zclass |
Fields inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
_visible |
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl |
---|
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE |
Constructor Summary | |
---|---|
XulElement()
|
Method Summary | |
---|---|
java.lang.String |
getAction()
Deprecated. since 5.0.0, use client-side event listener instead. |
java.lang.String |
getContext()
Returns the ID of the popup ( Popup ) that should appear
when the user right-clicks on the element (aka., context menu). |
java.lang.String |
getCtrlKeys()
Returns what keystrokes to intercept. |
java.lang.String |
getPopup()
Returns the ID of the popup ( Popup ) that should appear
when the user clicks on the element. |
java.lang.String |
getTooltip()
Returns the ID of the popup ( Popup ) that should be used
as a tooltip window when the mouse hovers over the element for a moment. |
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing tags and children. |
void |
setAction(java.lang.String action)
Deprecated. since 5.0.0, use client-side event listener instead. |
void |
setContext(Popup popup)
Sets the UUID of the popup that should appear when the user right-clicks on the element (aka., context menu). |
void |
setContext(java.lang.String context)
Sets the ID of the popup ( Popup ) that should appear
when the user right-clicks on the element (aka., context menu). |
void |
setCtrlKeys(java.lang.String ctrlKeys)
Sets what keystrokes to intercept. |
void |
setPopup(Popup popup)
Sets the UUID of the popup that should appear when the user clicks on the element. |
void |
setPopup(java.lang.String popup)
Sets the ID of the popup ( Popup ) that should appear
when the user clicks on the element. |
void |
setTooltip(Popup popup)
Sets the UUID of the popup that should be used as a tooltip window when the mouse hovers over the element for a moment. |
void |
setTooltip(java.lang.String tooltip)
Sets the ID of the popup ( Popup ) that should be used
as a tooltip window when the mouse hovers over the element for a moment. |
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
focus, getDraggable, getDroppable, getHeight, getHflex, getLeft, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, newExtraCtrl, service, setClass, setDraggable, setDroppable, setFocus, setHeight, setHflex, setLeft, setSclass, setStyle, setTooltiptext, setTop, setVflex, setWidth, setZclass, setZindex, setZIndex |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 |
Constructor Detail |
---|
public XulElement()
Method Detail |
---|
public java.lang.String getCtrlKeys()
Default: null.
getCtrlKeys
in interface XulElement
public void setCtrlKeys(java.lang.String ctrlKeys) throws UiException
The string could be a combination of the following:
For example,
Note: it doesn't support Ctrl+Alt, Shift+Ctrl, Shift+Alt or Shift+Ctrl+Alt.
setCtrlKeys
in interface XulElement
UiException
public java.lang.String getContext()
Popup
) that should appear
when the user right-clicks on the element (aka., context menu).
Default: null (no context menu).
getContext
in interface XulElement
public void setContext(java.lang.String context)
Popup
) that should appear
when the user right-clicks on the element (aka., context menu).
An onOpen event is sent to the context menu if it is going to appear. Therefore, developers can manipulate it dynamically (perhaps based on OpenEvent.getReference) by listening to the onOpen event.
Note: To simplify the use, it not only searches its ID space, but also all ID spaces in the desktop. It first searches its own ID space, and then the other Id spaces in the same browser window (might have one or multiple desktops).
(since 3.0.2) If there are two components with the same ID (of course, in
different ID spaces), you can specify the UUID with the following
format:
uuid(comp_uuid)
Example:
<label context="some">
<label context="uuid(${some.uuid})"/>
Both reference a component whose ID is "some".
But, if there are several components with the same ID,
the first one can reference to any of them.
And, the second one reference to the component in the same ID space
(of the label component).
(since 3.6.3) the context menu can be shown by a position from Popup.open(org.zkoss.zk.ui.Component, String)
or the location of x
and y
, you can specify the following format:
id, position
id, position=before_start
id, x=15, y=20
uuid(comp_uuid), position
uuid(comp_uuid), x=15, y=20
<button label="show" context="id, start_before"/>
setContext
in interface XulElement
setContext(Popup)
public void setContext(Popup popup)
Note: it actually invokes
setContext("uuid(" + popup.getUuid() + ")")
setContext
in interface XulElement
setContext(String)
,
Popup.open(org.zkoss.zk.ui.Component, String)
public java.lang.String getPopup()
Popup
) that should appear
when the user clicks on the element.
Default: null (no popup).
getPopup
in interface XulElement
public void setPopup(java.lang.String popup)
Popup
) that should appear
when the user clicks on the element.
An onOpen event is sent to the popup menu if it is going to appear. Therefore, developers can manipulate it dynamically (perhaps based on OpenEvent.getReference) by listening to the onOpen event.
Note: To simplify the use, it not only searches its ID space, but also all ID spaces in the desktop. It first searches its own ID space, and then the other Id spaces in the same browser window (might have one or multiple desktops).
(since 3.0.2) If there are two components with the same ID (of course, in
different ID spaces), you can specify the UUID with the following
format:
uuid(comp_uuid)
(since 3.6.3) the popup can be shown by a position from Popup.open(org.zkoss.zk.ui.Component, String)
or the location of x
and y
, you can specify the following format:
id, position
id, position=before_start
id, x=15, y=20
uuid(comp_uuid), position
uuid(comp_uuid), x=15, y=20
<button label="show" popup="id, start_before"/>
setPopup
in interface XulElement
setPopup(Popup)
,
Popup.open(org.zkoss.zk.ui.Component, String)
public void setPopup(Popup popup)
Note: it actually invokes
setPopup("uuid(" + popup.getUuid() + ")")
setPopup
in interface XulElement
setPopup(String)
public java.lang.String getTooltip()
Popup
) that should be used
as a tooltip window when the mouse hovers over the element for a moment.
The tooltip will automatically disappear when the mouse is moved away.
Default: null (no tooltip).
getTooltip
in interface XulElement
public void setTooltip(java.lang.String tooltip)
Popup
) that should be used
as a tooltip window when the mouse hovers over the element for a moment.
An onOpen event is sent to the tooltip if it is going to appear. Therefore, developers can manipulate it dynamically (perhaps based on OpenEvent.getReference) by listening to the onOpen event.
Note: To simplify the use, it not only searches its ID space, but also all ID spaces in the desktop. It first searches its own ID space, and then the other Id spaces in the same browser window (might have one or multiple desktops).
(since 3.0.2) If there are two components with the same ID (of course, in
different ID spaces), you can specify the UUID with the following
format:
uuid(comp_uuid)
(since 3.6.3) the tooltip can be shown by a position from
Popup.open(org.zkoss.zk.ui.Component, String)
or the location of x
and y
, and can be specified
with a delay time (in millisecond), you can specify the following format:
id, position
id, position=before_start, delay=500
id, x=15, y=20
uuid(comp_uuid2), position
uuid(comp_uuid), x=15, y=20
<button label="show" tooltip="id, start_before"/>
setTooltip
in interface XulElement
setTooltip(Popup)
,
Popup.open(org.zkoss.zk.ui.Component, String)
public void setTooltip(Popup popup)
Note: it actually invokes
setTooltip("uuid(" + popup.getUuid() + ")")
setTooltip
in interface XulElement
setTooltip(String)
public java.lang.String getAction()
getAction
in interface XulElement
public void setAction(java.lang.String action)
setAction
in interface XulElement
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
See also Render Special Properties
renderProperties
in class HtmlBasedComponent
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |