@eclipse-scout/core
Version:
Eclipse Scout runtime
38 lines • 2.3 kB
TypeScript
import { AbstractLayout, Dimension, EventHandler, HtmlComponent, HtmlCompPrefSizeOptions, Insets, LogicalGridLayoutConfig, LogicalGridLayoutInfo, LogicalGridLayoutSpy, ObjectOrModel, Rectangle, Widget } from '../../index';
/**
* The logical grid layout arranges the elements in a container automatically based on the {@link LogicalGridData}.
* The {@link LogicalGridData} is typically initialized from a {@link GridData}, and a {@link GridData} is calculated by a {@link LogicalGrid} derived from {@link LogicalGridWidget.gridDataHints}.
*
* This may sound a bit confusing at first. The important part is:
* based on the order of the widgets (e.g. the order of {@link GroupBoxModel.fields}) and the {@link LogicalGridWidget.gridDataHints} (e.g. {@link FormField.gridDataHints}),
* the widgets will be arranged automatically by the logical grid layout. So you only need to take care of the order and of configuring the hints.
*
* The width, height and margin of a grid cell is pre-defined, but you can adjust it using {@link LogicalGridLayoutConfig}, e.g. by configuring {@link GroupBoxModel.bodyLayoutConfig}.
*/
export declare class LogicalGridLayout extends AbstractLayout {
validityBasedOnContainerSize: Dimension;
valid: boolean;
widget: Widget;
info: LogicalGridLayoutInfo;
layoutConfig: LogicalGridLayoutConfig;
htmlPropertyChangeHandler: EventHandler;
hgap: number;
vgap: number;
columnWidth: number;
rowHeight: number;
minWidth: number;
spyEnabled: boolean;
protected _spy: LogicalGridLayoutSpy;
constructor(widget: Widget, layoutConfig: ObjectOrModel<LogicalGridLayoutConfig>);
validateLayout($container: JQuery, options: HtmlCompPrefSizeOptions): void;
protected _validateGridData(htmlComp: HtmlComponent): boolean;
layout($container: JQuery): void;
protected _layout($container: JQuery): void;
protected _layoutCellBounds(containerSize: Dimension, containerInsets: Insets): Rectangle[][];
preferredLayoutSize($container: JQuery, options: HtmlCompPrefSizeOptions): Dimension;
/**
* Enables or disables the layout spy that visualizes the cell bounds of the logical grid for debugging purposes.
*/
setSpyEnabled(spyEnabled: boolean): void;
}
//# sourceMappingURL=LogicalGridLayout.d.ts.map