Class zebkit.ui.SplitPan
extends <zebkit.ui.Panel>
<zebkit.ui>

Splitter panel UI component class. The component splits its area horizontally or vertically into two areas. Every area hosts an UI component. A size of the parts can be controlled by pointer cursor dragging. Gripper element is children UI component that can be customized. For instance:

     // create split panel
     var sp = new zebkit.ui.SplitPan(new zebkit.ui.Label("Left panel"),
                                     new zebkit.ui.Label("Right panel"));

     // customize gripper background color depending on its state
     sp.gripper.setBackground(new zebkit.draw.ViewSet({
          "over" : "yellow"
          "out" : null,
          "pressed.over" : "red"
     }));
Constructor:
zebkit.ui.SplitPan ([first], [second], [o])

Parameters:
  • [first] <zebkit.ui.Panel>

    a first UI component in splitter panel

  • [second] <zebkit.ui.Panel>

    a second UI component in splitter panel

  • [o] <String>

    an orientation of splitter element: "vertical" or "horizontal"




public void setGap (g)
public void setGripperLoc (l)
public void setGripperMovable (b)
public void setLeftMinSize (m)
public void setOrientation (o)
public void setRightMinSize (m)


Inherited methods:
$setConstraints(c)    add(constr, d)    byConstraints([p], c)    byPath(path, [cb])    calcPreferredSize(target)    doLayout( )    fire(event, [path], [params])    focused( )    getBottom( )    getCanvas( )    getComponentAt(x, y)    getHorPadding( )    getLeft( )    getPreferredSize( )    getRight( )    getTop( )    getVerPadding( )    hasFocus( )    indexOf(c)    insert(i, constr, d)    invalidate( )    invalidateLayout( )    kidAdded(index, constr, l)    kidRemoved(i, l)    laidout( )    load(JSON)    off([eventName], [path], [cb])    on([eventName], [path], cb)    paintComponent(g)    paintViewAt(g, ax, ay, v)    properties([path], props)    property([path], name, value)    recalc( )    relocated(px, py)    remove(c)    removeAll( )    removeAt(i)    removeByConstraints(ctr)    removeMe([after])    repaint([x], [y], [w], [h])    requestFocus( )    requestFocusIn([timeout])    resized(pw, ph)    setAt(i, d)    setBackground(v)    setBorder([v])    setBottomPadding(bottom)    setBounds(x, y, w, h)    setByConstraints(constr, c)    setConstraints(ctr)    setEnabled(b)    setId(id)    setKids(a)    setLayout(m)    setLeftPadding(left)    setLocation(xx, yy)    setPadding(v)    setParent(o)    setPreferredSize(w, h)    setProperties([path], props)    setRightPadding(right)    setSize(w, h)    setTopPadding(top)    setVisible(b)    toBack( )    toFront( )    toPreferredHeight( )    toPreferredSize( )    toPreferredWidth( )    toView(target)    validate( )    validateMetric( )    vrp( )   


public chainable setGap (g)

Set gap between gripper element and sizable panels


Parameters:
  • g <Integer>

    a gap

public chainable setGripperLoc (l)

Set gripper element location


Parameters:
  • l <Integer>

    a location of the gripper element

public void setGripperMovable (b)

Set the given gripper movable state


Parameters:
  • b <Boolean>

    the gripper movable state.

public chainable setLeftMinSize (m)

Set the minimal size of the left (or top) sizeable panel


Parameters:
  • m <Integer>

    a minimal possible size

public chainable setOrientation (o)

Set split panel orientation.


Parameters:
  • o <String>

    an orientation ("horizontal" or "vertical")

public chainable setRightMinSize (m)

Set the minimal size of the right (or bottom) sizeable panel


Parameters:
  • m <Integer>

    a minimal possible size



Inherited attributes:
public zebkit.draw.View bg    public zebkit.draw.View border    public Boolean canHaveFocus    public Object constraints    public Integer height    public Boolean isEnabled    public Boolean isValid    public Boolean isVisible    public Array kids    public zebkit.layout.Layout layout    public zebkit.layout.Layoutable parent    public Integer width    public Integer x    public Integer y   



public <Integer> gap

A gap between gripper element and first and second UI components

public <zebkit.ui.Panel> gripper

A reference to gripper UI component

public <Boolean> isMoveable

Indicates if the splitter bar can be moved

public <zebkit.ui.Panel> leftComp

A reference to left (top) sizable UI component

public <Integer> leftMinSize

A minimal size of the left (or top) sizable panel

public <zebkit.ui.Panel> rightComp

A reference to right (bottom) sizable UI component

public <Integer> rightMinSize

A minimal size of right (or bottom) sizable panel