<@doc alias="layout" hierarchy="GMLDOM"> StateOR Layout Aspect (c) SAP AG 2003-2006. All rights reserved. Aspect StateOrLayout for core.lyt:Layout; inherit core.lyt:ContainerLayout; override virtual method paint(parentElement) this.supercall(); this.selector.htmlObject.draggable = !base.layoutReadonly; end override virtual method repaint(attr) this.supercall(); // TODO: Make use of getWidgetRepaintParts instead of having it hard-coded here if (!attr || attr == 'childIndex') { this.selector.htmlObject.reorder(); } end /* override virtual method getRepaintRect() // // If we are inside TemporalContainerLayout, then we should occupy entire parent client area. // Otherwise 'base' should have a concrete size and position (e.g. when we're child of Scenario). // var useParent = (this.parent && this.parent.isa('core.lyt:TemporalContainerLayout')); return (useParent) ? this.parent.getContentRect() : this.getBaseRect(); end */ override virtual method setSize() this.supercall(); this.selector.htmlObject.resize(); end override virtual method applyLayout(focus) var rect = this.getContentRect(); var size = {w: rect.w, h: rect.h}; for (var iter in this.children) { var child = this.children[iter]; child.setResizePolicy({moveH: false, moveV: false, resizeH: false, resizeV: false}); // // This setBaseSize is only necessary for child's applyLayout to work correctly, // because it needs updated child size to perform layout calculations. // child.setBaseSize(size); child.applyLayout(focus); } end override virtual method getContentRect() return {x: 0, y: this.contents.offsetTop, w: this.elem.clientWidth, h: this.contents.offsetHeight}; end