Class zebkit.ui.ArrowButton
mixed with <zebkit.ui.ButtonRepeatMix>
extends <zebkit.ui.EvStatePan>

Arrow button component. The component use arrow views as its icon.

zebkit.ui.ArrowButton (direction)

  • direction <String>

    an arrow icon direction. Use "left", "right", "top", "bottom" as the parameter value.

Inherited methods:
$setConstraints(c)    add(constr, d)    byConstraints([p], c)    byPath(path, [cb])    calcPreferredSize(t)    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( )    keyPressed(e)    keyReleased(e)    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)    pointerDragged(e)    pointerEntered(e)    pointerExited(e)    pointerPressed(e)    pointerReleased(e)    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)    setFireParams(b, firePeriod, [startIn])    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)    setState(s)    setTopPadding(top)    setView(v)    setVisible(b)    stateUpdated(o, n)    syncState( )    toBack( )    toFront( )    toPreferredHeight( )    toPreferredSize( )    toPreferredWidth( )    toView(target)    toViewId(s)    validate( )    validateMetric( )    vrp( )   

public chainable iterateArrowViews (callback)

Iterate button arrows views.

  • callback <Function>

    a callback that is called for every found arrow view. The method gets the view id and view itself as its arguments.

public chainable setArrowColors (pressedColor, overColor, outColor)

Set arrow views states colors.

  • pressedColor <String>

    a pressed state color

  • overColor <String>

    an over state color

  • outColor <String>

    an out state color

public chainable setArrowDirection (d)

Set arrow view orientation.

  • d <String>

    an orientation of triangle arrow

public chainable setArrowSize (w, h)

Set arrow view size.

  • w <Integer>

    an arrow view width

  • h <Integer>

    an arrow view height

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

public <String> direction

Arrow icon view direction


Fired when a button has been pressed

  var b = new zebkit.ui.ArrowButton("left");
  b.on(function (src) {

Button can be adjusted in respect how it generates the pressed event. Event can be triggered by pressed or clicked even. Also event can be generated periodically if the button is kept in pressed state.