org.zkoss.zk.ui.api
Interface HtmlBasedComponent

All Superinterfaces:
java.lang.Cloneable, Component, Scope, java.io.Serializable
All Known Subinterfaces:
A, Applet, Audio, Auxhead, Auxheader, Bandbox, Bandpopup, Borderlayout, Borderlayout, 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, Fisheye, Fisheyebar, Flash, Flashchart, Foot, Footer, FormatInputElement, Frozen, Grid, Group, Groupbox, Groupfoot, Hbox, HeaderElement, HeadersElement, Html, Iframe, Image, Imagemap, Include, InputElement, Intbox, Jasperreport, 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, Timer, Toolbar, Toolbarbutton, Tree, Treecell, Treechildren, Treecol, Treecols, Treefoot, Treefooter, Treeitem, Treerow, Vbox, West, West, Window, XulElement
All Known Implementing Classes:
A, Applet, Audio, Auxhead, Auxheader, Bandbox, Bandpopup, Borderlayout, Borderlayout, 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, Flash, Flashchart, Foot, Footer, FormatInputElement, Frozen, Grid, Group, Groupbox, Groupfoot, Hbox, HeaderElement, HeadersElement, Html, HtmlBasedComponent, HtmlMacroComponent, Iframe, Image, Imagemap, Include, InputElement, Intbox, Jasperreport, 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, Timer, Toolbar, Toolbarbutton, Tree, Treecell, Treechildren, Treecol, Treecols, Treefoot, Treefooter, Treeitem, Treerow, Vbox, West, West, Window, XulElement

public interface HtmlBasedComponent
extends Component

A skeletal implementation for HTML based components. It simplifies to implement methods common to HTML based components.

It supports

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

getLeft

java.lang.String getLeft()
Returns the left position.


setLeft

void setLeft(java.lang.String left)
Sets the left position.


getTop

java.lang.String getTop()
Returns the top position.


setTop

void setTop(java.lang.String top)
Sets the top position.


getZIndex

int getZIndex()
Returns the Z index.

Default: -1 (means system default;


setZIndex

void setZIndex(int zIndex)
Sets the Z index.


getZindex

int getZindex()
Returns the Z index. It is the same as getZIndex().

Since:
3.5.2

setZindex

void setZindex(int zIndex)
Sets the Z index. It is the same as setZIndex(int).

Since:
3.5.2

getHeight

java.lang.String getHeight()
Returns the height. If null, the best fit is used.

Default: null.


setHeight

void setHeight(java.lang.String height)
Sets the height. If null, the best fit is used.


getWidth

java.lang.String getWidth()
Returns the width. If null, the best fit is used.

Default: null.


setWidth

void setWidth(java.lang.String width)
Sets the width. If null, the best fit is used.


getTooltiptext

java.lang.String getTooltiptext()
Returns the text as the tooltip.

Default: null.


setTooltiptext

void setTooltiptext(java.lang.String tooltiptext)
Sets the text as the tooltip.


getZclass

java.lang.String getZclass()
Returns the ZK Cascading Style class(es) for this component. It usually depends on the implementation of the mold (@{link #getMold}).

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.

See Also:
HtmlBasedComponent.getSclass()

setZclass

void setZclass(java.lang.String zclass)
Sets the ZK Cascading Style class(es) for this component. It usually depends on the implementation of the mold (@{link #getMold}).

See Also:
HtmlBasedComponent.setSclass(java.lang.String), HtmlBasedComponent.getZclass()

getSclass

java.lang.String getSclass()
Returns the CSS class.

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.

See Also:
HtmlBasedComponent.getZclass()

setSclass

void setSclass(java.lang.String sclass)
Sets the CSS class.

See Also:
HtmlBasedComponent.setZclass(java.lang.String)

getStyle

java.lang.String getStyle()
Returns the CSS style.

Default: null.


setStyle

void setStyle(java.lang.String style)
Sets the CSS style.


setDraggable

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.

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.

Parameters:
draggable - "false", null or "" to denote non-draggable; "true" for draggable with anonymous identifier; others for an identifier of draggable.

setDroppable

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.

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.

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

focus

void focus()
Sets focus to this element. If an element does not accept focus, this method has no effect.


setFocus

void setFocus(boolean focus)
Sets focus to this element. It is same as focus(), but used to allow ZUML to set focus to particular component.
 <code><textbox focus="true"/></code>
 

Parameters:
focus - whether to set focus. If false, this method has no effect.


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