public abstract class XulElement extends HtmlBasedComponent
HtmlBasedComponent.ExtraCtrl
AbstractComponent.Children
_zclass
AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Constructor and Description |
---|
XulElement() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones the component.
|
java.lang.String |
getContext()
Returns the ID of the popup (
Popup ) that should appear
when the user right-clicks on the element (a.k.a., 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. |
PropertyAccess |
getPropertyAccess(java.lang.String prop)
Returns the corresponding property access object from the given property
name, if any.
|
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 |
setContext(Popup popup)
Sets the UUID of the popup that should appear
when the user right-clicks on the element (a.k.a., 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 (a.k.a., context menu). |
void |
setContextAttributes(Popup popup,
java.lang.String position,
java.lang.String x,
java.lang.String y,
java.lang.String type)
Sets the Attributes for the Context Popup
Note that position will be ignored if coordinates are set.
|
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 |
setPopupAttributes(Popup popup,
java.lang.String position,
java.lang.String x,
java.lang.String y,
java.lang.String type)
Sets the Attributes for the Popup
Note that position will be ignored if coordinates are set.
|
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. |
void |
setTooltipAttributes(Popup popup,
java.lang.String position,
java.lang.String x,
java.lang.String y,
java.lang.Integer delay)
Sets the Attributes for the Tooltip Popup
Note that position will be ignored if coordinates are set.
|
focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
public java.lang.String getCtrlKeys()
Default: null.
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.
UiException
public java.lang.String getContext()
Popup
) that should appear
when the user right-clicks on the element (a.k.a., context menu).
Default: null (no context menu).
public void setContext(java.lang.String context)
Popup
) that should appear
when the user right-clicks on the element (a.k.a., 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"/>
(since 6.5.2) the context menu can also be shown on customized location of x
and y
by adding parentheses"()", for example,
<button label="show" context="id, x=(zk.currentPointer[0] + 10), y=(zk.currentPointer[1] - 10)"/>
setContext(Popup)
public void setContext(Popup popup)
Note: it actually invokes
setContext("uuid(" + popup.getUuid() + ")")
setContext(String)
,
Popup.open(org.zkoss.zk.ui.Component, String)
public void setContextAttributes(Popup popup, java.lang.String position, java.lang.String x, java.lang.String y, java.lang.String type)
popup
- the Context popup component, can be nullposition
- e.g. "after_start", can be nullx
- e.g. "50" or "(zk.currentPointer[0] + 10)", can be nully
- e.g. "50" or "(zk.currentPointer[0] + 10)", can be nulltype
- e.g. "toggle", can be nullpublic java.lang.String getPopup()
Popup
) that should appear
when the user clicks on the element.
Default: null (no popup).
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"/>
(since 6.5.2) the popup can also be shown on customized location of x
and y
by adding parentheses"()", for example,
<button label="show" context="id, x=(zk.currentPointer[0] + 10), y=(zk.currentPointer[1] - 10)"/>
public void setPopup(Popup popup)
Note: it actually invokes
setPopup("uuid(" + popup.getUuid() + ")")
setPopup(String)
public void setPopupAttributes(Popup popup, java.lang.String position, java.lang.String x, java.lang.String y, java.lang.String type)
popup
- the popup component, can be nullposition
- e.g. "after_start", can be nullx
- e.g. "50" or "(zk.currentPointer[0] + 10)", can be nully
- e.g. "50" or "(zk.currentPointer[0] + 10)", can be nulltype
- e.g. "toggle", can be nullpublic 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).
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"/>
(since 6.5.2) the tooltip can also be shown on customized location of x
and y
by adding parentheses"()", for example,
<button label="show" context="id, x=(zk.currentPointer[0] + 10), y=(zk.currentPointer[1] - 10)"/>
public void setTooltip(Popup popup)
Note: it actually invokes
setTooltip("uuid(" + popup.getUuid() + ")")
setTooltip(String)
public void setTooltipAttributes(Popup popup, java.lang.String position, java.lang.String x, java.lang.String y, java.lang.Integer delay)
popup
- the tooltip popup component, can be nullposition
- e.g. "after_start", can be nullx
- e.g. "50" or "(zk.currentPointer[0] + 10)", can be nully
- e.g. "50" or "(zk.currentPointer[0] + 10)", can be nulldelay
- in milliseconds, can be nullprotected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
renderProperties
in class HtmlBasedComponent
java.io.IOException
public PropertyAccess getPropertyAccess(java.lang.String prop)
ComponentCtrl
getPropertyAccess
in interface ComponentCtrl
getPropertyAccess
in class HtmlBasedComponent
prop
- the name of the propertypublic java.lang.Object clone()
Component
clone
in interface Component
clone
in class HtmlBasedComponent
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.