本文整理匯總了TypeScript中ag-grid-community.Context類的典型用法代碼示例。如果您正苦於以下問題:TypeScript Context類的具體用法?TypeScript Context怎麽用?TypeScript Context使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Context類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: showMenu
public showMenu(node: RowNode, column: Column, value: any, mouseEvent: MouseEvent | Touch): void {
let menuItems = this.getMenuItems(node, column, value);
if (Utils.missingOrEmpty(menuItems)) { return; }
let menu = new ContextMenu(menuItems);
this.context.wireBean(menu);
let eMenuGui = menu.getGui();
// need to show filter before positioning, as only after filter
// is visible can we find out what the width of it is
let hidePopup = this.popupService.addAsModalPopup(
eMenuGui,
true,
()=> menu.destroy(),
mouseEvent
);
this.popupService.positionPopupUnderMouseEvent({
column: column,
rowNode: node,
type: 'contextMenu',
mouseEvent: mouseEvent,
ePopup: eMenuGui
});
menu.afterGuiAttached({
hidePopup: hidePopup
});
this.activeMenu = menu;
menu.addEventListener(BeanStub.EVENT_DESTROYED, ()=> {
if (this.activeMenu===menu) {
this.activeMenu = null;
}
});
}
示例2: create
public create(): Component {
let pivotComp = new PivotDropZonePanel(true);
this.context.wireBean(pivotComp);
return pivotComp;
}
示例3: create
public create(): Component {
let rowGroupComp = new RowGroupDropZonePanel(true);
this.context.wireBean(rowGroupComp);
return rowGroupComp;
}
示例4: addMenuItems
@PostConstruct
private addMenuItems(): void {
let menuList = new MenuList();
this.context.wireBean(menuList);
let menuItemsMapped = this.menuItemMapper.mapWithStockItems(this.menuItems, null);
menuList.addMenuItems(menuItemsMapped);
this.appendChild(menuList);
menuList.addEventListener(MenuItemComponent.EVENT_ITEM_SELECTED, this.destroy.bind(this));
}