Java Code Examples for org.eclipse.swt.SWT#INSERT

The following examples show how to use org.eclipse.swt.SWT#INSERT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InternalCompositeTable.java    From nebula with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Handle a keyPressed event on any row control.
 * 
 * @param sender
 *            The row that is sending the event
 * @param e
 *            the actual KeyEvent
 */
public void keyPressed(TableRow sender, KeyEvent e) {
	if (doMakeFocusedRowVisible()) return;
	
	if ((e.stateMask & SWT.CONTROL) != 0) {
		switch (e.keyCode) {
		case SWT.HOME:
               doFocusInitialRow();
			return;
		case SWT.END:
               doFocusLastRow();
			return;
		case SWT.INSERT:
               doInsertRow();
			return;
		case SWT.DEL:
               doDeleteRow();
			return;
		default:
			return;
		}
	}
	switch (e.keyCode) {
	case SWT.ARROW_UP:
           doRowUp();
		return;
	case SWT.ARROW_DOWN:
           doRowDown();
		return;
	case SWT.PAGE_UP:
           doPageUp();
		return;
	case SWT.PAGE_DOWN:
           doPageDown();
		return;
	}
}
 
Example 2
Source File: EmptyTablePlaceholder.java    From nebula with Eclipse Public License 2.0 4 votes vote down vote up
public void keyPressed(KeyEvent e) {
	if (e.keyCode == SWT.INSERT)
		parentTable.keyPressed(null, e);
}