Search in sources :

Example 1 with ModeSupport

use of org.eclipse.nebula.widgets.nattable.ui.mode.ModeSupport in project nebula.widgets.nattable by eclipse.

the class NatTable method initInternalListener.

protected void initInternalListener() {
    this.modeSupport = new ModeSupport(this);
    this.modeSupport.registerModeEventHandler(Mode.NORMAL_MODE, new ConfigurableModeEventHandler(this.modeSupport, this));
    this.modeSupport.switchMode(Mode.NORMAL_MODE);
    addPaintListener(this);
    addFocusListener(new FocusListener() {

        @Override
        public void focusLost(final FocusEvent arg0) {
            redraw();
        }

        @Override
        public void focusGained(final FocusEvent arg0) {
            redraw();
        }
    });
    addListener(SWT.Resize, new Listener() {

        @Override
        public void handleEvent(final Event e) {
            doCommand(new ClientAreaResizeCommand(NatTable.this));
            redraw();
        }
    });
}
Also used : ModeSupport(org.eclipse.nebula.widgets.nattable.ui.mode.ModeSupport) DisposeListener(org.eclipse.swt.events.DisposeListener) PaintListener(org.eclipse.swt.events.PaintListener) DragSourceListener(org.eclipse.swt.dnd.DragSourceListener) FocusListener(org.eclipse.swt.events.FocusListener) Listener(org.eclipse.swt.widgets.Listener) DropTargetListener(org.eclipse.swt.dnd.DropTargetListener) ILayerListener(org.eclipse.nebula.widgets.nattable.layer.ILayerListener) ClientAreaResizeCommand(org.eclipse.nebula.widgets.nattable.grid.command.ClientAreaResizeCommand) ConfigurableModeEventHandler(org.eclipse.nebula.widgets.nattable.ui.mode.ConfigurableModeEventHandler) DisposeEvent(org.eclipse.swt.events.DisposeEvent) FocusEvent(org.eclipse.swt.events.FocusEvent) PaintEvent(org.eclipse.swt.events.PaintEvent) CellVisualUpdateEvent(org.eclipse.nebula.widgets.nattable.layer.event.CellVisualUpdateEvent) CellEditorCreatedEvent(org.eclipse.nebula.widgets.nattable.edit.CellEditorCreatedEvent) DragSourceEvent(org.eclipse.swt.dnd.DragSourceEvent) CellSelectionEvent(org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent) ColumnVisualUpdateEvent(org.eclipse.nebula.widgets.nattable.layer.event.ColumnVisualUpdateEvent) IVisualChangeEvent(org.eclipse.nebula.widgets.nattable.layer.event.IVisualChangeEvent) Event(org.eclipse.swt.widgets.Event) RowVisualUpdateEvent(org.eclipse.nebula.widgets.nattable.layer.event.RowVisualUpdateEvent) RowSelectionEvent(org.eclipse.nebula.widgets.nattable.selection.event.RowSelectionEvent) ISelectionEvent(org.eclipse.nebula.widgets.nattable.selection.event.ISelectionEvent) ILayerEvent(org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent) FocusListener(org.eclipse.swt.events.FocusListener) FocusEvent(org.eclipse.swt.events.FocusEvent)

Aggregations

CellEditorCreatedEvent (org.eclipse.nebula.widgets.nattable.edit.CellEditorCreatedEvent)1 ClientAreaResizeCommand (org.eclipse.nebula.widgets.nattable.grid.command.ClientAreaResizeCommand)1 ILayerListener (org.eclipse.nebula.widgets.nattable.layer.ILayerListener)1 CellVisualUpdateEvent (org.eclipse.nebula.widgets.nattable.layer.event.CellVisualUpdateEvent)1 ColumnVisualUpdateEvent (org.eclipse.nebula.widgets.nattable.layer.event.ColumnVisualUpdateEvent)1 ILayerEvent (org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent)1 IVisualChangeEvent (org.eclipse.nebula.widgets.nattable.layer.event.IVisualChangeEvent)1 RowVisualUpdateEvent (org.eclipse.nebula.widgets.nattable.layer.event.RowVisualUpdateEvent)1 CellSelectionEvent (org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent)1 ISelectionEvent (org.eclipse.nebula.widgets.nattable.selection.event.ISelectionEvent)1 RowSelectionEvent (org.eclipse.nebula.widgets.nattable.selection.event.RowSelectionEvent)1 ConfigurableModeEventHandler (org.eclipse.nebula.widgets.nattable.ui.mode.ConfigurableModeEventHandler)1 ModeSupport (org.eclipse.nebula.widgets.nattable.ui.mode.ModeSupport)1 DragSourceEvent (org.eclipse.swt.dnd.DragSourceEvent)1 DragSourceListener (org.eclipse.swt.dnd.DragSourceListener)1 DropTargetListener (org.eclipse.swt.dnd.DropTargetListener)1 DisposeEvent (org.eclipse.swt.events.DisposeEvent)1 DisposeListener (org.eclipse.swt.events.DisposeListener)1 FocusEvent (org.eclipse.swt.events.FocusEvent)1 FocusListener (org.eclipse.swt.events.FocusListener)1