Package org.eclipse.gef.ui.parts
Class GraphicalViewerKeyHandler
java.lang.Object
org.eclipse.gef.KeyHandler
org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler
- Direct Known Subclasses:
- PaletteViewerKeyHandler
An extended KeyHandler which processes default keystrokes for common
 navigation in a GraphicalViewer. This class can be used as a KeyHandler too;
 Unrecognized keystrokes are sent to the super's implementation. This class
 will process key events containing the following:
 
- Arrow Keys (UP, DOWN, LEFT, RIGHT) with optional SHIFT and CTRL modifiers to navigate between siblings.
- Arrow Keys (UP, DOWN) same as above, but with ALT modifier to navigate into or out of a container.
- '\'Backslash and '/' Slash keys with optional SHIFT and CTRL modifiers to traverse connections.
All processed key events will do nothing other than change the selection and/or focus editpart for the viewer.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a key handler for the given viewer.
- 
Method SummaryModifier and TypeMethodDescriptionprotected GraphicalEditPartprotected List<? extends GraphicalEditPart> Returns the list of editparts which are conceptually at the same level of navigation as the currently focused editpart.protected GraphicalViewerReturns the viewer on which this key handler was created.protected booleanbooleankeyPressed(KeyEvent event) Extended to process key events described above.protected voidnavigateTo(EditPart part, KeyEvent event) Navigates to the given EditPartprotected voidprocessSelect(KeyEvent event) This method is invoked when the user presses the space bar.Methods inherited from class org.eclipse.gef.KeyHandlerkeyReleased, put, remove, setParent
- 
Constructor Details- 
GraphicalViewerKeyHandlerConstructs a key handler for the given viewer.- Parameters:
- viewer- the viewer
 
 
- 
- 
Method Details- 
getFocusEditPart- Returns:
- the EditPart that has focus
 
- 
getViewerReturns the viewer on which this key handler was created.- Returns:
- the viewer
 
- 
isViewerMirroredprotected boolean isViewerMirrored()- Returns:
- trueif the viewer is mirrored
- Since:
- 3.4
 
- 
keyPressedExtended to process key events described above.- Overrides:
- keyPressedin class- KeyHandler
- Parameters:
- event- the KeyEvent
- Returns:
- trueif KeyEvent was handled in some way
- See Also:
 
- 
processSelectThis method is invoked when the user presses the space bar. It toggles the selection of the EditPart that currently has focus.- Parameters:
- event- the key event received
 
 
-