FlexGridLayout for version 5.3.0

The HorizontalLayout and VerticalLayout gets reinforcement with the new FlexGridLayout in the upcoming version 5.3.0.
More Examples and Documentations comes with the upcoming release.

topper


var PredefinedProcess = draw2d.shape.layout.FlexGridLayout.extend({

    /**
     *     10px       grow         10px
     *     
     *    -----+------------------+-----
     *    |    |  [LABEL]         |    |
     *    |    |                  |    |
     *    |    |                  |    |    grow
     *    |    |                  |    |
     *    |    |                  |    |
     *    -----+------------------+-----
     *    
     * @param attr
     */
    init : function(attr, setter, getter)
    {
        this._super($.extend({
            columns:"10px, grow, 10px",
            rows:   "grow",
            bgColor:"#FFFFFF",
            stroke:2
        },attr), 
        setter, 
        getter);
        
        
        this.label = new draw2d.shape.basic.Label({text:"Process Name", resizeable:true, stroke:2});
        this.label.installEditor(new draw2d.ui.LabelInplaceEditor());

        // add the label to the row:0, col:1 
        this.add(this.label, {row:0, col:1});
        
        this.setDimension(120,80);
    }
});