public abstract class KeybindedMasterDetailAction extends MasterDetailAction implements org.eclipse.swt.events.KeyListener, org.eclipse.jface.viewers.ISelectionChangedListener
MasterDetailAction to help introduce keybindings.| Constructor and Description |
|---|
KeybindedMasterDetailAction() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
executeOnKeyPressed(org.eclipse.jface.viewers.ISelection currentSelection)
This method is triggered by
isExecuteOnKeyPressed(KeyEvent) when a KeyEvent is triggered by a
key press. |
protected abstract void |
executeOnKeyRelease(org.eclipse.jface.viewers.ISelection currentSelection)
This method is triggered by
isExecuteOnKeyRelease(KeyEvent) when a KeyEvent is triggered by a
key release. |
protected org.eclipse.jface.viewers.ISelection |
getCurrentSelection()
Returns the current
ISelection. |
protected static boolean |
isActivated(org.eclipse.swt.events.KeyEvent event,
int swtMask,
char c)
Determines if the keys indicated by the SWT
swtMask and c are active. |
protected boolean |
isExecuteOnKeyPressed(org.eclipse.swt.events.KeyEvent event)
Determines if the
executeOnKeyPressed(ISelection) method shall be executed. |
protected boolean |
isExecuteOnKeyRelease() |
protected abstract boolean |
isExecuteOnKeyRelease(org.eclipse.swt.events.KeyEvent event)
Determines if the
executeOnKeyRelease(ISelection) method shall be executed. |
void |
keyPressed(org.eclipse.swt.events.KeyEvent event) |
void |
keyReleased(org.eclipse.swt.events.KeyEvent event) |
void |
selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event) |
protected void |
setExecuteOnKeyRelease(boolean executeOnKeyRelease) |
void |
setTreeViewer(org.eclipse.jface.viewers.TreeViewer treeviewer)
Sets the treeviewer of the tree master detail composite.
|
execute, getImagePath, getLabel, getTreeViewer, setImagePath, setLabel, shouldShowaddHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabledaddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic void setTreeViewer(org.eclipse.jface.viewers.TreeViewer treeviewer)
setTreeViewer in class MasterDetailActiontreeviewer - the treeMasterDetailAction.setTreeViewer(org.eclipse.jface.viewers.TreeViewer)public void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
selectionChanged in interface org.eclipse.jface.viewers.ISelectionChangedListenerISelectionChangedListener.selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)protected org.eclipse.jface.viewers.ISelection getCurrentSelection()
ISelection.ISelection if there is one, null otherwise.public void keyPressed(org.eclipse.swt.events.KeyEvent event)
keyPressed in interface org.eclipse.swt.events.KeyListenerKeyListener.keyPressed(org.eclipse.swt.events.KeyEvent)protected boolean isExecuteOnKeyPressed(org.eclipse.swt.events.KeyEvent event)
executeOnKeyPressed(ISelection) method shall be executed.event - The KeyEvent which triggers this method.true if executeOnKeyPressed(ISelection) method shall be called, false otherwise.protected void executeOnKeyPressed(org.eclipse.jface.viewers.ISelection currentSelection)
isExecuteOnKeyPressed(KeyEvent) when a KeyEvent is triggered by a
key press.currentSelection - The current ISelection.public void keyReleased(org.eclipse.swt.events.KeyEvent event)
keyReleased in interface org.eclipse.swt.events.KeyListenerKeyListener.keyReleased(org.eclipse.swt.events.KeyEvent)protected abstract boolean isExecuteOnKeyRelease(org.eclipse.swt.events.KeyEvent event)
executeOnKeyRelease(ISelection) method shall be executed.event - The KeyEvent on Keypress. This allows to react on key combinations even on key releasetrue if executeOnKeyRelease(ISelection) method shall be called, false otherwise.protected abstract void executeOnKeyRelease(org.eclipse.jface.viewers.ISelection currentSelection)
isExecuteOnKeyRelease(KeyEvent) when a KeyEvent is triggered by a
key release.currentSelection - The current ISelection.protected static boolean isActivated(org.eclipse.swt.events.KeyEvent event,
int swtMask,
char c)
swtMask and c are active.event - The KeyEvent to check.swtMask - SWT key event mask, e.g. SWT.CTRL,
SWT.ALT etc.c - The additional pressed char. Use KeyEvent.keyCode if you only want to check for
swtMask.true if the keys indicated by swtMask and c are active, false otherwise.protected boolean isExecuteOnKeyRelease()
protected void setExecuteOnKeyRelease(boolean executeOnKeyRelease)
executeOnKeyRelease - the executeOnKeyRelease to setCopyright © 2019. All rights reserved.