Class XulElement
- All Implemented Interfaces:
Serializable,Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl
- Direct Known Subclasses:
Absolutechildren,Absolutelayout,Anchorchildren,Anchorlayout,Audio,Auxhead,Avatargroup,Badge,Bandpopup,Borderlayout,Box,Breadcrumb,Calendar,Carousel,Cell,Codeeditor,Detail,Div,Foot,Frozen,Groupbox,HeadersElement,Html,Image,Include,InputElement,Inputgroup,Label,LabelElement,Layout,LayoutRegion,Listfoot,Listitem,Menubar,Menuseparator,MeshElement,Paging,Panel,Panelchildren,Popup,Progressmeter,Radiogroup,Row,Rows,Separator,Slider,Span,Splitter,Tabbox,Tabpanel,Tabpanels,Tabs,Toolbar,Track,Treechildren,Treefoot,Treeitem,Treerow,Window
- Author:
- tomyeh
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrlNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo -
Field Summary
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns the ID of the popup (Popup) that should appear when the user right-clicks on the element (a.k.a., context menu).Returns what keystrokes to intercept.getPopup()Returns the ID of the popup (Popup) that should appear when the user clicks on the element.org.zkoss.zk.ui.sys.PropertyAccessgetPropertyAccess(String prop) 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 voidrenderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) voidsetContext(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).voidsetContext(Popup popup) Sets the UUID of the popup that should appear when the user right-clicks on the element (a.k.a., context menu).voidSets the Attributes for the Context Popup Note that position will be ignored if coordinates are set.voidsetCtrlKeys(String ctrlKeys) Sets what keystrokes to intercept.voidSets the ID of the popup (Popup) that should appear when the user clicks on the element.voidSets the UUID of the popup that should appear when the user clicks on the element.voidSets the Attributes for the Popup Note that position will be ignored if coordinates are set.voidsetTooltip(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.voidsetTooltip(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.voidSets the Attributes for the Tooltip Popup Note that position will be ignored if coordinates are set.Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setSkeleton, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyMethods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, 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, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, 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, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Constructor Details
-
XulElement
public XulElement()
-
-
Method Details
-
getCtrlKeys
Returns what keystrokes to intercept.Default: null.
- Since:
- 3.0.6
-
setCtrlKeys
Sets what keystrokes to intercept.The string could be a combination of the following:
- ^k
- A control key, i.e., Ctrl+k, where k could be a~z, 0~9, #n
- @k
- A alt key, i.e., Alt+k, where k could be a~z, 0~9, #n
- $n
- A shift key, i.e., Shift+n, where n could be #n. Note: $a ~ $z are not supported.
- #home
- Home
- #end
- End
- #ins
- Insert
- #del
- Delete
- #bak
- Backspace
- #left
- Left arrow
- #right
- Right arrow
- #up
- Up arrow
- #down
- Down arrow
- #pgup
- PageUp
- #pgdn
- PageDn
- #f1 #f2 ... #f12
- Function keys representing F1, F2, ... F12
- %[?]
- Mac command(⌘), [?] can be
a~z, 0~9, #[?]. (since 8.5.0) - #tab
- Tab (since 9.5.1)
For example,
- ^a^d@c#f10#left#right
- It means you want to intercept Ctrl+A, Ctrl+D, Alt+C, F10, Left and Right.
- ^#left
- It means Ctrl+Left.
- ^#f1
- It means Ctrl+F1.
- @#f3
- It means Alt+F3.
Note: it doesn't support Ctrl+Alt, Shift+Ctrl, Shift+Alt or Shift+Ctrl+Alt.
- Throws:
org.zkoss.zk.ui.UiException- Since:
- 3.0.6
-
getContext
Returns the ID of the popup (Popup) that should appear when the user right-clicks on the element (a.k.a., context menu).Default: null (no context menu).
-
setContext
Sets the ID of the popup (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:
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).<label context="some"> <label context="uuid(${some.uuid})"/>(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 ofxandy, you can specify the following format:id, positionid, position=before_startid, x=15, y=20uuid(comp_uuid), positionuuid(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
xandyby adding parentheses"()", for example,<button label="show" context="id, x=(zk.currentPointer[0] + 10), y=(zk.currentPointer[1] - 10)"/>
- See Also:
-
setContext
Sets the UUID of the popup that should appear when the user right-clicks on the element (a.k.a., context menu).Note: it actually invokes
setContext("uuid(" + popup.getUuid() + ")")- Since:
- 3.0.2
- See Also:
-
setContextAttributes
Sets the Attributes for the Context Popup Note that position will be ignored if coordinates are set.- Parameters:
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 null- Since:
- 8.5.0
-
getPopup
Returns the ID of the popup (Popup) that should appear when the user clicks on the element.Default: null (no popup).
-
setPopup
Sets the ID of the 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 ofxandy, you can specify the following format:id, positionid, position=before_startid, x=15, y=20uuid(comp_uuid), positionuuid(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
xandyby adding parentheses"()", for example,<button label="show" popup="id, x=(zk.currentPointer[0] + 10), y=(zk.currentPointer[1] - 10)"/>
-
setPopup
Sets the UUID of the popup that should appear when the user clicks on the element.Note: it actually invokes
setPopup("uuid(" + popup.getUuid() + ")")- Since:
- 3.0.2
- See Also:
-
setPopupAttributes
Sets the Attributes for the Popup Note that position will be ignored if coordinates are set.- Parameters:
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 null- Since:
- 8.5.0
-
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. The tooltip will automatically disappear when the mouse is moved away.Default: null (no tooltip).
-
setTooltip
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.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 ofxandy, and can be specified with a delay time (in millisecond), you can specify the following format:id, positionid, position=before_start, delay=500id, x=15, y=20uuid(comp_uuid2), positionuuid(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
xandyby adding parentheses"()", for example,<button label="show" tooltip="id, x=(zk.currentPointer[0] + 10), y=(zk.currentPointer[1] - 10)"/>
-
setTooltip
Sets the UUID of the popup that should be used as a tooltip window when the mouse hovers over the element for a moment.Note: it actually invokes
setTooltip("uuid(" + popup.getUuid() + ")")- Since:
- 3.0.2
- See Also:
-
setTooltipAttributes
Sets the Attributes for the Tooltip Popup Note that position will be ignored if coordinates are set.- Parameters:
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 null- Since:
- 8.5.0
-
renderProperties
- Overrides:
renderPropertiesin classorg.zkoss.zk.ui.HtmlBasedComponent- Throws:
IOException
-
getPropertyAccess
- Specified by:
getPropertyAccessin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
getPropertyAccessin classorg.zkoss.zk.ui.HtmlBasedComponent
-
clone
- Specified by:
clonein interfaceorg.zkoss.zk.ui.Component- Overrides:
clonein classorg.zkoss.zk.ui.HtmlBasedComponent
-