Class zebkit.ui.design.ShaperPan
extends <zebkit.ui.Panel>
<zebkit.ui.design>

This is UI component class that implements possibility to embeds another UI components to control the component size and location visually.

  // create canvas
  var canvas = new zebkit.ui.zCanvas(300,300);

  // create two UI components
  var lab = new zebkit.ui.Label("Label");
  var but = new zebkit.ui.Button("Button");

  // add created before label component as target of the shaper
  // component and than add the shaper component into root panel
  canvas.root.add(new zebkit.ui.design.ShaperPan(lab).properties({
      bounds: [ 30,30,100,40]
  }));

  // add created before button component as target of the shaper
  // component and than add the shaper component into root panel
  canvas.root.add(new zebkit.ui.design.ShaperPan(but).properties({
      bounds: [ 130,130,100,50]
  }));
Constructor:
zebkit.ui.design.ShaperPan ([target])

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

    a target UI component whose size and location has to be controlled




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 void keyPressed (e)

Define key pressed events handler


Parameters:
public void pointerDragged (e)

Define pointer dragged events handler


Parameters:
public void pointerDragStarted (e)

Define pointer drag started events handler


Parameters:
public chainable setBorderColor (id, color)

Set the border color for the given focus state.


Parameters:
  • id <String>

    a focus state. Use "focuson" or "focusoff" as the parameter value

  • color <String>

    a border color

public chainable setBorderColors (col1, [col2])

Set the border colors.


Parameters:
  • col1 <String>

    a color the border has to have when the component doesn't hold focus.

  • [col2] <String>

    a color the border has to have if the component is focus owner.



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 <Boolean> isMoveEnabled

Indicates if controlled component can be moved

public <Boolean> isResizeEnabled

Indicates if controlled component can be sized

public <Integer> minHeight

Minimal possible height or controlled component

public <Integer> minWidth

Minimal possible width or controlled component