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

Examples of org.eclipse.nebula.widgets.nattable.ui.NatEventData


                        menuItem.setEnabled(true);

                        menuItem.addSelectionListener(new SelectionAdapter() {
                            @Override
                            public void widgetSelected(SelectionEvent event) {
                                NatEventData natEventData = MenuItemProviders
                                        .getNatEventData(event);
                                MouseEvent originalEvent = natEventData
                                        .getOriginalEvent();

                                int groupByColumnIndex = groupByHeaderLayer
                                        .getGroupByColumnIndexAtXY(
                                                originalEvent.x,
View Full Code Here


     * Sample action to execute when the button is clicked.
     */
    class MyMouseAction implements IMouseAction {

        public void run(NatTable natTable, MouseEvent event) {
            NatEventData eventData = NatEventData
                    .createInstanceFromEvent(event);
            int rowIndex = natTable.getRowIndexByPosition(eventData
                    .getRowPosition());
            int columnIndex = natTable.getColumnIndexByPosition(eventData
                    .getColumnPosition());

            ListDataProvider<RowDataFixture> dataProvider = gridLayer
                    .getBodyDataProvider();

View Full Code Here

    /**
     * Respond to mouse click. Simulate button press.
     */
    public void run(final NatTable natTable, MouseEvent event) {
        NatEventData eventData = (NatEventData) event.data;
        columnPosClicked = eventData.getColumnPosition();
        rowPosClicked = eventData.getRowPosition();
        recentlyClicked = true;

        new Timer()
                .schedule(getButtonFlashTimerTask(natTable), buttonFlashTime);
        natTable.fireLayerEvent(new CellVisualChangeEvent(natTable,
View Full Code Here

    }

    @Override
    public boolean matches(NatTable natTable, MouseEvent event,
            LabelStack regionLabels) {
        NatEventData eventData = NatEventData.createInstanceFromEvent(event);
        LabelStack customLabels = natTable.getConfigLabelsByPosition(
                eventData.getColumnPosition(), eventData.getRowPosition());

        return super.matches(natTable, event, regionLabels)
                && customLabels.getLabels().contains(labelToMatch);
    }
View Full Code Here

import org.eclipse.swt.events.MouseEvent;

public class ClearAllFiltersAction implements IMouseAction {

    public void run(NatTable natTable, MouseEvent event) {
        NatEventData natEventData = (NatEventData) event.data;

        natTable.doCommand(new ClearFilterCommand(natTable, natEventData
                .getColumnPosition()));

    }
View Full Code Here

import org.eclipse.swt.events.MouseEvent;

public class ClearFilterAction implements IMouseAction {

    public void run(NatTable natTable, MouseEvent event) {
        NatEventData natEventData = (NatEventData) event.data;

        natTable.doCommand(new ClearFilterCommand(natTable, natEventData
                .getColumnPosition()));
    }
View Full Code Here

                inspectLabelsMenuItem
                        .addSelectionListener(new SelectionAdapter() {
                            @Override
                            public void widgetSelected(SelectionEvent e) {
                                NatEventData natEventData = getNatEventData(e);
                                NatTable natTable = natEventData.getNatTable();
                                int columnPosition = natEventData
                                        .getColumnPosition();
                                int rowPosition = natEventData.getRowPosition();

                                String msg = "Display mode: " + natTable.getDisplayModeByPosition(columnPosition, rowPosition) + "\nConfig labels: " //$NON-NLS-1$ //$NON-NLS-2$
                                        + natTable.getConfigLabelsByPosition(
                                                columnPosition, rowPosition)
                                        + "\nData value: " //$NON-NLS-1$
View Full Code Here

public class FilterRowMouseEventMatcher implements IMouseEventMatcher {

    public boolean matches(NatTable natTable, MouseEvent event,
            LabelStack regionLabels) {
        NatEventData eventData = NatEventData.createInstanceFromEvent(event);
        LabelStack labels = eventData.getRegionLabels();

        if (isNotNull(labels)) {
            return labels.getLabels().contains(GridRegion.FILTER_ROW);
        }
        return false;
View Full Code Here

                columnStyleEditor.setEnabled(true);

                columnStyleEditor.addSelectionListener(new SelectionAdapter() {
                    @Override
                    public void widgetSelected(SelectionEvent e) {
                        NatEventData natEventData = MenuItemProviders
                                .getNatEventData(e);
                        int columnPosition = natEventData.getColumnPosition();
                        natTable.doCommand(new DisplayColumnGroupRenameDialogCommand(
                                natTable, columnPosition));
                    }
                });
            }
View Full Code Here

                columnStyleEditor.setEnabled(true);

                columnStyleEditor.addSelectionListener(new SelectionAdapter() {
                    @Override
                    public void widgetSelected(SelectionEvent e) {
                        NatEventData natEventData = MenuItemProviders
                                .getNatEventData(e);
                        int columnPosition = natEventData.getColumnPosition();
                        int columnIndex = natEventData.getNatTable()
                                .getColumnIndexByPosition(columnPosition);
                        natTable.doCommand(new RemoveColumnGroupCommand(
                                columnIndex));
                    }
                });
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.ui.NatEventData

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.