Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Text.notifyListeners()


       
        Text text=editor.testingGetNameText();
        text.setText("newName"); //$NON-NLS-1$
        Event event = new Event();
        event.character=SWT.Selection;
        text.notifyListeners(SWT.KeyDown, event);

        assertEquals("newName", builder.getName()); //$NON-NLS-1$
       
        text.setText("newName"); //$NON-NLS-1$
        event = new Event();
View Full Code Here


        assertEquals("newName", builder.getName()); //$NON-NLS-1$
       
        text.setText("newName"); //$NON-NLS-1$
        event = new Event();
        event.character=SWT.ESC;
        text.notifyListeners(SWT.KeyDown, event);
       
        assertEquals("newName", builder.getName()); //$NON-NLS-1$
       
        text.setSelection(0,0);
        event = new Event();
View Full Code Here

       
        assertEquals("newName", builder.getName()); //$NON-NLS-1$
       
        text.setSelection(0,0);
        event = new Event();
        text.notifyListeners(SWT.FocusIn, event);
        assertEquals(new Point(0,text.getText().length()), text.getSelection());
    }
   
    @Ignore
    @Test
View Full Code Here

        assertEquals(9, this.natTable.getActiveCellEditor().getRowIndex());
    }

    private void processTab() {
        Text textControl = ((Text) this.natTable.getActiveCellEditor().getEditorControl());
        textControl.notifyListeners(SWT.Traverse, SWTUtils.keyEvent(SWT.TAB));
    }

    private void processShiftTab() {
        Text textControl = ((Text) this.natTable.getActiveCellEditor().getEditorControl());
        textControl.notifyListeners(SWT.Traverse, SWTUtils.keyEventWithModifier(SWT.TAB, SWT.SHIFT));
View Full Code Here

        textControl.notifyListeners(SWT.Traverse, SWTUtils.keyEvent(SWT.TAB));
    }

    private void processShiftTab() {
        Text textControl = ((Text) this.natTable.getActiveCellEditor().getEditorControl());
        textControl.notifyListeners(SWT.Traverse, SWTUtils.keyEventWithModifier(SWT.TAB, SWT.SHIFT));
    }
}
View Full Code Here

                .getConfigRegistry(), cell));

        // Press tab - 3 times
        Text textControl = ((Text) natTable.getActiveCellEditor()
                .getEditorControl());
        textControl.notifyListeners(SWT.Traverse, SWTUtils.keyEvent(SWT.TAB));

        natTable.notifyListeners(SWT.KeyDown, SWTUtils.keyEvent(SWT.TAB));
        natTable.notifyListeners(SWT.KeyDown, SWTUtils.keyEvent(SWT.TAB));
        natTable.notifyListeners(SWT.KeyDown, SWTUtils.keyEvent(SWT.TAB));
View Full Code Here

        assertEquals("AA", natTable.getActiveCellEditor().getCanonicalValue());
        assertFalse(natTable.getActiveCellEditor().validateCanonicalValue(
                natTable.getActiveCellEditor().getCanonicalValue()));

        // Press tab
        textControl.notifyListeners(SWT.Traverse, SWTUtils.keyEvent(SWT.TAB));
        assertEquals(textControl, natTable.getActiveCellEditor()
                .getEditorControl());
        assertEquals("AA", natTable.getActiveCellEditor().getCanonicalValue());
        assertEquals(textControl, ActiveCellEditorRegistry
                .getActiveCellEditor().getEditorControl());
View Full Code Here

        UIText.RefSpecDialog_DestinationPushLabel).widget;
    shell.display.syncExec(new Runnable() {

      public void run() {
        text.setFocus();
        text.notifyListeners(SWT.Modify, new Event());
      }
    });
    shell.bot().button(IDialogConstants.OK_LABEL).click();
    shell = bot.shell(UIText.SimpleConfigurePushDialog_WindowTitle);
    shell.bot().button(UIText.SimpleConfigurePushDialog_SaveButton).click();
View Full Code Here

    shell.display.syncExec(new Runnable() {

      public void run() {
        // focus for update of other fields
        text2.setFocus();
        text2.notifyListeners(SWT.Modify, new Event());
      }
    });

    shell.bot().button(IDialogConstants.OK_LABEL).click();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.