org.zkoss.zul.api
Interface Splitter

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

public interface Splitter
extends XulElement

An element which should appear before or after an element inside a box ( Box, Vbox and Hbox).

When the splitter is dragged, the sibling elements of the splitter are resized. If getCollapse() is true, a grippy in placed inside the splitter, and one sibling element of the splitter is collapsed when the grippy is clicked.

Events: onOpen

Default HtmlBasedComponent.getZclass() as follows: (since 3.5.0)

  1. Case 1: If getOrient() is vertical, "z-splitter-ver" is assumed
  2. Case 2: If getOrient() is horizontal, "z-splitter-hor" is assumed

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 getCollapse()
          Returns which side of the splitter is collapsed when its grippy is clicked.
 java.lang.String getOrient()
          Returns the orientation of the splitter.
 boolean isOpen()
          Returns whether it is opne (i.e., not collapsed.
 void setCollapse(java.lang.String collapse)
          Sets which side of the splitter is collapsed when its grippy is clicked.
 void setOpen(boolean open)
          Opens or collapses the splitter.
 
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

getOrient

java.lang.String getOrient()
Returns the orientation of the splitter. It is the same as the parent's orientation (Box.getOrient().


getCollapse

java.lang.String getCollapse()
Returns which side of the splitter is collapsed when its grippy is clicked. If this attribute is not specified, the splitter will not cause a collapse. If it is collapsed, isOpen() returns false.

Default: none.

The returned value can be one ofthe following.

none
No collpasing occurs.
before
When the grippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
after
When the grippy is clicked, the element immediately after the splitter in the same parent is collapsed so that its width or height is 0.

Unlike XUL, you don't have to put a so-called grippy component as a child of the spiltter.


setCollapse

void setCollapse(java.lang.String collapse)
                 throws WrongValueException
Sets which side of the splitter is collapsed when its grippy is clicked. If this attribute is not specified, the splitter will not cause a collapse.

Parameters:
collapse - one of none, before and after. If null or empty is specified, none is assumed.
Throws:
WrongValueException
See Also:
getCollapse()

isOpen

boolean isOpen()
Returns whether it is opne (i.e., not collapsed. Meaningful only if getCollapse() is not "none".


setOpen

void setOpen(boolean open)
Opens or collapses the splitter. Meaningful only if getCollapse() is not "none".



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