org.zkoss.zul.api
Interface Tab

All Superinterfaces:
java.lang.Cloneable, Component, HtmlBasedComponent, LabelElement, LabelImageElement, Scope, java.io.Serializable, XulElement
All Known Implementing Classes:
Tab

public interface Tab
extends LabelImageElement

A tab.

Default HtmlBasedComponent.getZclass(): z-tab. (since 3.5.0)

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
 int getIndex()
          Returns the index of this panel, or -1 if it doesn't belong to any tabs.
 Tabpanel getLinkedPanelApi()
          Returns the panel associated with this tab.
 Tabbox getTabboxApi()
          Returns the tabbox owns this component.
 boolean isClosable()
          Returns whether this tab is closable.
 void setClosable(boolean closable)
          Sets whether this tab is closable.
 void setDisabled(boolean disabled)
          Sets whether this tab is disabled.
 void setSelected(boolean selected)
          Sets whether this tab is selected.
 
Methods inherited from interface org.zkoss.zul.impl.api.LabelImageElement
getHoverImage, getImage, getImageContent, setHoverImage, setHoverImageContent, setHoverImageContent, setImage, setImageContent, setImageContent
 
Methods inherited from interface org.zkoss.zul.impl.api.LabelElement
getLabel, setLabel
 
Methods inherited from interface org.zkoss.zul.impl.api.XulElement
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
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

isClosable

boolean isClosable()
Returns whether this tab is closable. If closable, a button is displayed and the onClose event is sent if an user clicks the button.

Default: false.


setClosable

void setClosable(boolean closable)
Sets whether this tab is closable. If closable, a button is displayed and the onClose event is sent if an user clicks the button.

Default: false.

You can intercept the default behavior by either overriding Tab.onClose(), or listening the onClose event.


getTabboxApi

Tabbox getTabboxApi()
Returns the tabbox owns this component.


getLinkedPanelApi

Tabpanel getLinkedPanelApi()
Returns the panel associated with this tab.


setSelected

void setSelected(boolean selected)
Sets whether this tab is selected.


setDisabled

void setDisabled(boolean disabled)
Sets whether this tab is disabled. If a tab is disabled, then it cann't be selected or closed by user, but it still can be controlled by server side program.


getIndex

int getIndex()
Returns the index of this panel, or -1 if it doesn't belong to any tabs.



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