Package org.eclipse.nebula.widgets.nattable.ui.menu

Examples of org.eclipse.nebula.widgets.nattable.ui.menu.PopupMenuBuilder


                        new HSSFExcelExporter());
            }
        });

        // Column group header menu
        final Menu columnGroupHeaderMenu = new PopupMenuBuilder(natTable)
                .withMenuItemProvider(
                        ColumnGroupMenuItemProviders
                                .renameColumnGroupMenuItemProvider())
                .withMenuItemProvider(
                        ColumnGroupMenuItemProviders
View Full Code Here


     *            The NatTable where the menu should be attached.
     * @return The {@link PopupMenuBuilder} that is used to build the groupBy
     *         header menu.
     */
    protected PopupMenuBuilder createGroupByHeaderMenu(NatTable natTable) {
        return new PopupMenuBuilder(natTable)
                .withMenuItemProvider(new IMenuItemProvider() {
                    @Override
                    public void addMenuItem(final NatTable natTable,
                            Menu popupMenu) {
                        MenuItem menuItem = new MenuItem(popupMenu, SWT.PUSH);
View Full Code Here

        // with hide/show actions
        natTable.addConfiguration(new AbstractHeaderMenuConfiguration(natTable) {

            @Override
            protected PopupMenuBuilder createRowHeaderMenu(NatTable natTable) {
                return new PopupMenuBuilder(natTable).withHideRowMenuItem()
                        .withShowAllRowsMenuItem();
            }

            @Override
            protected PopupMenuBuilder createCornerMenu(NatTable natTable) {
View Full Code Here

    private final Menu colHeaderMenu;

    public RightClickColumnHeaderMenuConfiguration(NatTable natTable,
            TableModel tableModel) {

        PopupMenuBuilder builder = new PopupMenuBuilder(natTable)
                .withHideColumnMenuItem().withShowAllColumnsMenuItem()
                .withAutoResizeSelectedColumnsMenuItem()
                .withColumnStyleEditor().withColumnRenameDialog();

        if (tableModel.enableColumnCategories) {
            builder.withSeparator();
            builder.withCategoriesBasedColumnChooser("Select columns");
        }
        if (tableModel.enableColumnGroups) {
            builder.withSeparator();
            builder.withColumnChooserMenuItem();
        }

        if (tableModel.enableFilterRow) {
            builder.withSeparator();
            builder.withClearAllFilters();
            builder.withToggleFilterRow();
        }

        colHeaderMenu = builder.build();
        addDisposeListeners(natTable);
    }
View Full Code Here

        // with hide/show actions
        natTable.addConfiguration(new AbstractHeaderMenuConfiguration(natTable) {

            @Override
            protected PopupMenuBuilder createRowHeaderMenu(NatTable natTable) {
                return new PopupMenuBuilder(natTable).withHideRowMenuItem()
                        .withShowAllRowsMenuItem();
            }

            @Override
            protected PopupMenuBuilder createCornerMenu(NatTable natTable) {
View Full Code Here

                        .withColumnChooserMenuItem();
            }
        });

        // Column group header menu
        final Menu columnGroupHeaderMenu = new PopupMenuBuilder(natTable)
                .withMenuItemProvider(
                        ColumnGroupMenuItemProviders
                                .renameColumnGroupMenuItemProvider())
                .withMenuItemProvider(
                        ColumnGroupMenuItemProviders
View Full Code Here

                        .withColumnChooserMenuItem();
            }
        });

        // Column group header menu
        final Menu columnGroupHeaderMenu = new PopupMenuBuilder(natTable)
                .withMenuItemProvider(
                        ColumnGroupMenuItemProviders
                                .renameColumnGroupMenuItemProvider())
                .withMenuItemProvider(
                        ColumnGroupMenuItemProviders
View Full Code Here

            });
        }

        protected PopupMenuBuilder createBodyMenu(final NatTable natTable) {
            return new PopupMenuBuilder(natTable).withMenuItemProvider(
                    new IMenuItemProvider() {
                        @Override
                        public void addMenuItem(final NatTable natTable,
                                Menu popupMenu) {
                            MenuItem menuItem = new MenuItem(popupMenu,
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.ui.menu.PopupMenuBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.