org.zkoss.zul
Class Splitter

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Splitter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class 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

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
protected  class Splitter.ExtraCtrl
          A utility class to implement AbstractComponent.getExtraCtrl().
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Splitter()
           
 
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.
 java.lang.String getOuterAttrs()
           
 boolean isChildable()
          Not allow any children.
 boolean isOpen()
          Returns whether it is opne (i.e., not collapsed.
protected  java.lang.Object newExtraCtrl()
           
 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.
 void setParent(org.zkoss.zk.ui.Component parent)
           
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getAllOnClickAttrs, getContext, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addEventListener, appendAsapAttr, focus, getDraggable, getDroppable, getHeight, getLeft, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, isAsapRequired, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Splitter

public Splitter()
Method Detail

getOrient

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


getCollapse

public 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

public void setCollapse(java.lang.String collapse)
                 throws org.zkoss.zk.ui.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:
org.zkoss.zk.ui.WrongValueException
See Also:
getCollapse()

isOpen

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


setOpen

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


getOuterAttrs

public java.lang.String getOuterAttrs()
Overrides:
getOuterAttrs in class XulElement

setParent

public void setParent(org.zkoss.zk.ui.Component parent)
Specified by:
setParent in interface org.zkoss.zk.ui.Component
Overrides:
setParent in class org.zkoss.zk.ui.AbstractComponent

isChildable

public boolean isChildable()
Not allow any children.

Specified by:
isChildable in interface org.zkoss.zk.ui.Component
Overrides:
isChildable in class org.zkoss.zk.ui.AbstractComponent

newExtraCtrl

protected java.lang.Object newExtraCtrl()
Overrides:
newExtraCtrl in class org.zkoss.zk.ui.HtmlBasedComponent


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