org.zkoss.zul.impl.api
Interface XulElement

All Superinterfaces:
java.lang.Cloneable, Component, HtmlBasedComponent, Scope, java.io.Serializable
All Known Subinterfaces:
A, Audio, Auxhead, Auxheader, Bandbox, Bandpopup, Box, Button, Calendar, Captcha, Caption, Cell, Center, Center, Chart, Checkbox, Colorbox, Column, Columnchildren, Columnlayout, Columns, Combobox, Comboitem, Datebox, Decimalbox, Detail, Div, Doublebox, East, East, Fisheye, Fisheyebar, Foot, Footer, FormatInputElement, Frozen, Grid, Group, Groupbox, Groupfoot, Hbox, HeaderElement, HeadersElement, Html, Image, Imagemap, Include, InputElement, Intbox, Label, LabelElement, LabelImageElement, LayoutRegion, LayoutRegion, Listbox, Listcell, Listfoot, Listfooter, Listgroup, Listgroupfoot, Listhead, Listheader, Listitem, Longbox, Menu, Menubar, Menuitem, Menupopup, Menuseparator, North, North, NumberInputElement, Paging, Panel, Panelchildren, Popup, Portalchildren, Portallayout, Progressmeter, Radio, Radiogroup, Row, Rows, Separator, Slider, South, South, Space, Span, Spinner, Splitter, Tab, Tabbox, Tablechildren, Tablelayout, Tabpanel, Tabpanels, Tabs, Textbox, Timebox, Toolbar, Toolbarbutton, Tree, Treecell, Treechildren, Treecol, Treecols, Treefoot, Treefooter, Treeitem, Treerow, Vbox, West, West, Window
All Known Implementing Classes:
A, Audio, Auxhead, Auxheader, Bandbox, Bandpopup, Box, Button, Calendar, Captcha, Caption, Cell, Center, Center, Chart, Checkbox, Colorbox, Column, Columnchildren, Columnlayout, Columns, Combobox, Comboitem, Datebox, Decimalbox, Detail, Div, Doublebox, East, East, Fileupload, Fileupload, FileuploadDlg, Fisheye, Fisheyebar, Foot, Footer, FormatInputElement, Frozen, Grid, Group, Groupbox, Groupfoot, Hbox, HeaderElement, HeadersElement, Html, Image, Imagemap, Include, InputElement, Intbox, Label, LabelElement, LabelImageElement, LayoutRegion, LayoutRegion, Listbox, Listcell, Listfoot, Listfooter, Listgroup, Listgroupfoot, Listhead, Listheader, Listitem, Longbox, Menu, Menubar, Menuitem, Menupopup, Menuseparator, MessageboxDlg, MessageboxDlg.Button, North, North, NumberInputElement, Paging, Panel, Panelchildren, Popup, Portalchildren, Portallayout, Progressmeter, Radio, Radiogroup, Row, Rows, Separator, Slider, South, South, Space, Span, Spinner, Splitter, Tab, Tabbox, Tablechildren, Tablelayout, Tabpanel, Tabpanels, Tabs, Textbox, Timebox, Toolbar, Toolbarbutton, Tree, Treecell, Treechildren, Treecol, Treecols, Treefoot, Treefooter, Treeitem, Treerow, Vbox, West, West, Window, XulElement

public interface XulElement
extends HtmlBasedComponent

The fundamental class for XUL elements.

Events:
onOK, onCacnel and onCtrlKey.

Since:
3.5.2
Author:
tomyeh

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
 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.
 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 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.Component
addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getChildren, getDefinition, getDesktop, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, setWidgetListener, setWidgetOverride, unsetVariable
 
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
 

Method Detail

getCtrlKeys

java.lang.String getCtrlKeys()
Returns what keystrokes to intercept.

Default: null.


setCtrlKeys

void setCtrlKeys(java.lang.String ctrlKeys)
                 throws UiException
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
#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

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:
UiException

getContext

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).

Default: null (no context menu).


setContext

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).

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:

 <code>
 <label context="some">
 <label context="uuid(${some.uuid})"/>
 </code>
 
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).

See Also:
setContext(Popup)

setContext

void setContext(Popup popup)
Sets the UUID of the popup that should appear when the user right-clicks on the element (aka., context menu).

Note: it actually invokes setContext("uuid(" + popup.getUuid() + ")")

See Also:
setContext(String)

getPopup

java.lang.String getPopup()
Returns the ID of the popup (Popup) that should appear when the user clicks on the element.

Default: null (no poppup).


setPopup

void setPopup(java.lang.String popup)
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)

See Also:
setPopup(Popup)

setPopup

void setPopup(Popup popup)
Sets the UUID of the popup that should appear when the user clicks on the element.

Note: it actually invokes setPopup("uuid(" + popup.getUuid() + ")")

See Also:
setPopup(String)

getTooltip

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. The tooltip will automatically disappear when the mouse is moved.

Default: null (no tooltip).


setTooltip

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.

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)

See Also:
setTooltip(Popup)

setTooltip

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.

Note: it actually invokes setTooltip("uuid(" + popup.getUuid() + ")")

See Also:
setTooltip(String)

getAction

java.lang.String getAction()
Deprecated. since 5.0.0, use client-side event listener instead.


setAction

void setAction(java.lang.String action)
Deprecated. since 5.0.0, use client-side event listener instead.



Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo