Search in sources :

Example 86 with ControlListener

use of org.eclipse.swt.events.ControlListener in project org.eclipse.rap by eclipse-rap.

the class TypedListener_Test method testHandleEventForControlMovedEvent.

@Test
public void testHandleEventForControlMovedEvent() {
    ControlListener controlListener = mock(ControlListener.class);
    TypedListener typedListener = new TypedListener(controlListener);
    Event event = createEvent(SWT.Move);
    typedListener.handleEvent(event);
    verify(controlListener).controlMoved(any(ControlEvent.class));
}
Also used : ControlListener(org.eclipse.swt.events.ControlListener) DisposeEvent(org.eclipse.swt.events.DisposeEvent) FocusEvent(org.eclipse.swt.events.FocusEvent) PaintEvent(org.eclipse.swt.events.PaintEvent) MenuEvent(org.eclipse.swt.events.MenuEvent) KeyEvent(org.eclipse.swt.events.KeyEvent) TraverseEvent(org.eclipse.swt.events.TraverseEvent) ModifyEvent(org.eclipse.swt.events.ModifyEvent) ArmEvent(org.eclipse.swt.events.ArmEvent) MouseEvent(org.eclipse.swt.events.MouseEvent) MenuDetectEvent(org.eclipse.swt.events.MenuDetectEvent) ExpandEvent(org.eclipse.swt.events.ExpandEvent) DragDetectEvent(org.eclipse.swt.events.DragDetectEvent) ControlEvent(org.eclipse.swt.events.ControlEvent) VerifyEvent(org.eclipse.swt.events.VerifyEvent) TreeEvent(org.eclipse.swt.events.TreeEvent) ShellEvent(org.eclipse.swt.events.ShellEvent) HelpEvent(org.eclipse.swt.events.HelpEvent) SelectionEvent(org.eclipse.swt.events.SelectionEvent) ControlEvent(org.eclipse.swt.events.ControlEvent) Test(org.junit.Test)

Example 87 with ControlListener

use of org.eclipse.swt.events.ControlListener in project org.eclipse.rap by eclipse-rap.

the class TypedListener_Test method testHandleEventForControlResizedEvent.

@Test
public void testHandleEventForControlResizedEvent() {
    ControlListener controlListener = mock(ControlListener.class);
    TypedListener typedListener = new TypedListener(controlListener);
    Event event = createEvent(SWT.Resize);
    typedListener.handleEvent(event);
    verify(controlListener).controlResized(any(ControlEvent.class));
}
Also used : ControlListener(org.eclipse.swt.events.ControlListener) DisposeEvent(org.eclipse.swt.events.DisposeEvent) FocusEvent(org.eclipse.swt.events.FocusEvent) PaintEvent(org.eclipse.swt.events.PaintEvent) MenuEvent(org.eclipse.swt.events.MenuEvent) KeyEvent(org.eclipse.swt.events.KeyEvent) TraverseEvent(org.eclipse.swt.events.TraverseEvent) ModifyEvent(org.eclipse.swt.events.ModifyEvent) ArmEvent(org.eclipse.swt.events.ArmEvent) MouseEvent(org.eclipse.swt.events.MouseEvent) MenuDetectEvent(org.eclipse.swt.events.MenuDetectEvent) ExpandEvent(org.eclipse.swt.events.ExpandEvent) DragDetectEvent(org.eclipse.swt.events.DragDetectEvent) ControlEvent(org.eclipse.swt.events.ControlEvent) VerifyEvent(org.eclipse.swt.events.VerifyEvent) TreeEvent(org.eclipse.swt.events.TreeEvent) ShellEvent(org.eclipse.swt.events.ShellEvent) HelpEvent(org.eclipse.swt.events.HelpEvent) SelectionEvent(org.eclipse.swt.events.SelectionEvent) ControlEvent(org.eclipse.swt.events.ControlEvent) Test(org.junit.Test)

Aggregations

ControlListener (org.eclipse.swt.events.ControlListener)87 ControlEvent (org.eclipse.swt.events.ControlEvent)82 GridData (org.eclipse.swt.layout.GridData)31 FocusEvent (org.eclipse.swt.events.FocusEvent)19 Composite (org.eclipse.swt.widgets.Composite)19 Test (org.junit.Test)19 MouseEvent (org.eclipse.swt.events.MouseEvent)18 Point (org.eclipse.swt.graphics.Point)17 GridLayout (org.eclipse.swt.layout.GridLayout)17 KeyEvent (org.eclipse.swt.events.KeyEvent)16 ArrayList (java.util.ArrayList)14 SelectionEvent (org.eclipse.swt.events.SelectionEvent)14 DisposeEvent (org.eclipse.swt.events.DisposeEvent)13 Control (org.eclipse.swt.widgets.Control)13 Event (org.eclipse.swt.widgets.Event)13 TableViewerColumn (org.eclipse.jface.viewers.TableViewerColumn)11 DisposeListener (org.eclipse.swt.events.DisposeListener)11 FocusListener (org.eclipse.swt.events.FocusListener)11 Listener (org.eclipse.swt.widgets.Listener)10 ModifyEvent (org.eclipse.swt.events.ModifyEvent)9