當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ag-grid-community.Context類代碼示例

本文整理匯總了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;
            }
        });
    }
開發者ID:Hyeong-jin,項目名稱:ag-grid,代碼行數:39,代碼來源:contextMenu.ts

示例2: create

    public create(): Component {

        let pivotComp = new PivotDropZonePanel(true);
        this.context.wireBean(pivotComp);

        return pivotComp;
    }
開發者ID:Hyeong-jin,項目名稱:ag-grid,代碼行數:7,代碼來源:pivotCompFactory.ts

示例3: create

    public create(): Component {

        let rowGroupComp = new RowGroupDropZonePanel(true);
        this.context.wireBean(rowGroupComp);

        return rowGroupComp;
    }
開發者ID:Hyeong-jin,項目名稱:ag-grid,代碼行數:7,代碼來源:rowGroupCompFactory.ts

示例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));
    }
開發者ID:Hyeong-jin,項目名稱:ag-grid,代碼行數:14,代碼來源:contextMenu.ts


注:本文中的ag-grid-community.Context類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。