@eclipse-scout/core
Version:
Eclipse Scout runtime
169 lines • 7.61 kB
TypeScript
/// <reference types="jquery" />
import { AbstractLayout, Action, Button, CloneOptions, CompositeField, EnumObject, FormField, FormFieldStatusPosition, GroupBoxEventMap, GroupBoxModel, GroupBoxResponsiveHandler, HtmlComponent, InitModelOf, LogicalGrid, LogicalGridLayout, LogicalGridLayoutConfig, Menu, MenuBar, MenuBarEllipsisPosition, Notification, ObjectOrChildModel, ObjectOrModel } from '../../../index';
export declare class GroupBox extends CompositeField implements GroupBoxModel {
model: GroupBoxModel;
eventMap: GroupBoxEventMap;
self: GroupBox;
fields: FormField[];
menuBarVisible: boolean;
menuBarPosition: GroupBoxMenuBarPosition;
menuBarEllipsisPosition: MenuBarEllipsisPosition;
notification: Notification;
bodyLayoutConfig: LogicalGridLayoutConfig;
borderDecoration: GroupBoxBorderDecoration;
borderVisible: boolean;
mainBox: boolean;
menuBar: MenuBar;
subLabel: string;
scrollable: boolean;
expandable: boolean;
expanded: boolean;
gridColumnCount: number;
controls: FormField[];
systemButtons: Button[];
customButtons: Button[];
processButtons: Button[];
processMenus: Menu[];
staticMenus: Menu[];
responsive: boolean;
responsiveHandler?: GroupBoxResponsiveHandler;
htmlBody: HtmlComponent;
$header: JQuery;
$body: JQuery;
$title: JQuery;
$borderBottom: JQuery;
$subLabel: JQuery;
protected _statusPositionOrig: FormFieldStatusPosition;
protected _collapsedWeightY: number;
constructor();
static BorderDecoration: {
/**
* Makes {@link borderVisible} to be computed automatically which means top and bottom paddings are invisible if it is a {@link mainBox}.
* @see _computeBorderVisible
*/
readonly AUTO: "auto";
/**
* The top and bottom paddings are always visible, even if it is a {@link mainBox}.
*/
readonly EMPTY: "empty";
/**
* Currently has no effect.
*/
readonly LINE: "line";
};
static MenuBarPosition: {
readonly AUTO: "auto";
readonly TOP: "top";
readonly BOTTOM: "bottom";
readonly TITLE: "title";
};
protected _init(model: InitModelOf<this>): void;
protected _destroy(): void;
getFields(): FormField[];
insertField(field: ObjectOrChildModel<FormField>, index?: number): void;
insertFieldBefore(field: ObjectOrChildModel<FormField>, sibling: FormField): void;
insertFieldAfter(field: ObjectOrChildModel<FormField>, sibling: FormField): void;
deleteField(field: FormField): void;
/** @see GroupBoxModel.fields */
setFields(fields: ObjectOrChildModel<FormField>[]): void;
protected _setFields(fields: FormField[]): void;
protected _renderFields(fields: FormField[]): void;
protected _initKeyStrokeContext(): void;
protected _setKeyStrokes(keyStrokes: Action | Action[]): void;
/**
* Returns a $container used as a bind target for the keystroke context of the group-box.
* By default, this function returns the container of the form, or when group-box is has no
* form as a parent the container of the group-box.
*/
protected _keyStrokeBindTarget(): JQuery;
protected _render(): void;
protected _remove(): void;
protected _renderProperties(): void;
protected _createLayout(): AbstractLayout;
protected _createBodyLayout(): LogicalGridLayout;
setBodyLayoutConfig(bodyLayoutConfig: ObjectOrModel<LogicalGridLayoutConfig>): void;
protected _setBodyLayoutConfig(bodyLayoutConfig: ObjectOrModel<LogicalGridLayoutConfig>): void;
protected _renderBodyLayoutConfig(): void;
/**
* Redraws the group box body by removing and re-rendering every control.
* This may be necessary if a field does not support a dynamic property change and therefore needs to be redrawn completely to reflect the change.
*/
rerenderControls(): void;
protected _removeControls(): void;
protected _renderControls(): void;
addSubLabel(): void;
protected _removeSubLabel(): void;
/** @see GroupBoxModel.subLabel */
setSubLabel(subLabel: string): void;
protected _renderSubLabel(): void;
/** @see GroupBoxModel.scrollable */
setScrollable(scrollable: boolean): void;
protected _renderScrollable(): void;
get$Scrollable(): JQuery;
protected _onScroll(event: JQuery.ScrollEvent): void;
protected _updateScrollShadow(): void;
setMainBox(mainBox: boolean): void;
protected _setMainBox(mainBox: boolean): void;
addLabel(): void;
protected _renderLabel(): void;
addStatus(): void;
protected _renderStatusPosition(): void;
protected _updateStatusPosition(): void;
/** @see GroupBoxModel.notification */
setNotification(notification: ObjectOrChildModel<Notification>): void;
protected _renderNotification(): void;
/** @internal */
_prepareFields(): void;
protected _unregisterButtonKeyStrokes(button: Button): void;
protected _registerButtonKeyStrokes(button: Button): void;
/** @see GroupBoxModel.borderVisible */
setBorderVisible(borderVisible: boolean): void;
protected _renderBorderVisible(): void;
/** @see GroupBoxModel.borderDecoration */
setBorderDecoration(borderDecoration: GroupBoxBorderDecoration): void;
protected _renderBorderDecoration(): void;
getContextMenuItems(onlyVisible?: boolean): Menu[];
/** @see GroupBoxModel.menuBarVisible */
setMenuBarVisible(visible: boolean): void;
protected _setMenuBarVisible(visible: boolean): void;
protected _renderMenuBarVisible(): void;
protected _renderMenuBar(): void;
/** @see GroupBoxModel.menuBarPosition */
setMenuBarPosition(menuBarPosition: GroupBoxMenuBarPosition): void;
protected _renderMenuBarPosition(): void;
/** @see GroupBoxModel.menuBarEllipsisPosition */
setMenuBarEllipsisPosition(menuBarEllipsisPosition: MenuBarEllipsisPosition): void;
protected _renderMenuBarEllipsisPosition(): void;
protected _updateMenuBarStyle(): void;
protected _renderMenuBarStyle(): void;
protected _computeBorderVisible(borderVisible: boolean): boolean;
/** @see GroupBoxModel.expandable */
setExpandable(expandable: boolean): void;
protected _renderExpandable(): void;
/** @see GroupBoxModel.expanded */
setExpanded(expanded: boolean): void;
protected _renderExpanded(): void;
/** @see GroupBoxModel.gridColumnCount */
setGridColumnCount(gridColumnCount: number): void;
invalidateLogicalGrid(invalidateLayout?: boolean): void;
protected _setLogicalGrid(logicalGrid: LogicalGrid | string): void;
protected _renderLabelVisible(): void;
protected _computeTitleVisible(labelVisible?: boolean): boolean;
/**
* Only show the group box status if title is visible.
*/
protected _computeStatusVisible(): boolean;
protected _setMenus(menus: Menu | Menu[]): void;
/** @internal */
_updateMenuBar(): void;
protected _removeMenus(): void;
setStaticMenus(staticMenus: ObjectOrChildModel<Menu>[]): void;
protected _onControlClick(event: JQuery.ClickEvent): void;
/** @see GroupBoxModel.responsive */
setResponsive(responsive: boolean): void;
protected _setResponsive(responsive: boolean): void;
clone(model: GroupBoxModel, options?: CloneOptions): this;
}
export type GroupBoxBorderDecoration = EnumObject<typeof GroupBox.BorderDecoration>;
export type GroupBoxMenuBarPosition = EnumObject<typeof GroupBox.MenuBarPosition>;
//# sourceMappingURL=GroupBox.d.ts.map