org.zkoss.zul.api
Interface Toolbarbutton

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

public interface Toolbarbutton
extends LabelImageElement

A tool button.

The default CSS class is "button".

Non-xul extension: Toolbarbutton supports getHref(). If getHref() is not null, the onClick handler is ignored and this element is degenerated to HTML's A tag.

Default HtmlBasedComponent.getZclass(): z-toolbar-button.(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
 java.lang.String getDir()
          Returns the direction.
 java.lang.String getHref()
          Returns the href.
 java.lang.String getOrient()
          Returns the orient.
 int getTabindex()
          Returns the tab order of this component.
 java.lang.String getTarget()
          Returns the target frame or window.
 boolean isDisabled()
          Returns whether it is disabled.
 void setDir(java.lang.String dir)
          Sets the direction.
 void setDisabled(boolean disabled)
          Sets whether it is disabled.
 void setHref(java.lang.String href)
          Sets the href.
 void setOrient(java.lang.String orient)
          Sets the orient.
 void setTabindex(int tabindex)
          Sets the tab order of this component.
 void setTarget(java.lang.String target)
          Sets the target frame or window.
 
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, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, unsetVariable
 

Method Detail

setDisabled

void setDisabled(boolean disabled)
Sets whether it is disabled.


isDisabled

boolean isDisabled()
Returns whether it is disabled.

Default: false.


getDir

java.lang.String getDir()
Returns the direction.

Default: "normal".


setDir

void setDir(java.lang.String dir)
            throws WrongValueException
Sets the direction.

Parameters:
dir - either "normal" or "reverse".
Throws:
WrongValueException

getHref

java.lang.String getHref()
Returns the href.

Default: null. If null, the button has no function unless you specify the onClick handler.


setHref

void setHref(java.lang.String href)
             throws WrongValueException
Sets the href.

Throws:
WrongValueException

getOrient

java.lang.String getOrient()
Returns the orient.

Default: "horizontal".


setOrient

void setOrient(java.lang.String orient)
               throws WrongValueException
Sets the orient.

Parameters:
orient - either "horizontal" or "vertical".
Throws:
WrongValueException

getTarget

java.lang.String getTarget()
Returns the target frame or window.

Note: it is useful only if href (setHref(java.lang.String)) is specified (i.e., use the onClick listener).

Default: null.


setTarget

void setTarget(java.lang.String target)
Sets the target frame or window.

Parameters:
target - the name of the frame or window to hyperlink.

getTabindex

int getTabindex()
Returns the tab order of this component.

Default: -1 (means the same as browser's default).


setTabindex

void setTabindex(int tabindex)
                 throws WrongValueException
Sets the tab order of this component.

Throws:
WrongValueException


Copyright © 2005-2009 Potix Corporation. All Rights Reserved.