Zebra API Doc

zebra.ui.designer.ShaperPan Class

Extends zebra.ui.Panel

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 zebra.ui.zCanvas(300,300);

   // create two UI components
   var lab = new zebra.ui.Label("Label");
   var but = new zebra.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 zebra.ui.designer.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 zebra.ui.designer.ShaperPan(but).properties({
       bounds: [ 130,130,100,50]
   }));

Constructor

zebra.ui.designer.ShaperPan

(
  • target
)

Parameters:

  • target zebra.ui.Panel

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

Methods

catchInput

(
  • c
)
Boolean

Inherited from zebra.ui.Composite:

The method is called to ask if the given children UI component has to be input events transparent

Parameters:


Return: Boolean

true if the given children component has to be input events transparent

keyPressed

(
  • e
)

Define key pressed events handler

Parameters:

mouseDragged

(
  • e
)

Define mouse dragged events handler

Parameters:

mouseDragStarted

(
  • e
)

Define mouse drag started events handler

Parameters:

Attributes

isMoveEnabled

Boolean

Indicates if controlled component can be moved

Default: true

isResizeEnabled

Boolean

Indicates if controlled component can be sized

Default: true

minHeight

Integer

Minimal possible height or controlled component

Default: 12

minWidth

Integer

Minimal possible width or controlled component

Default: 12