Package org.eclipse.draw2d
Class FocusTraverseManager
java.lang.Object
org.eclipse.draw2d.FocusTraverseManager
This class is a helper to the
SWTEventDispatcher
. It handles the task
of determining which Figure will gain focus upon a tab/shift-tab. It also
keeps track of the Figure with current focus.
Note: When a Canvas with a LightweightSystem
gains focus, it gives
focus to the child Figure who had focus when this Canvas lost focus. If the
canvas is gaining focus for the first time, focus is given to its first child
Figure.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetNextFocusableFigure
(IFigure root, IFigure prevFocus) Returns the IFigure that will receive focus upon a 'tab' traverse event.getPreviousFocusableFigure
(IFigure root, IFigure prevFocus) Returns the IFigure that will receive focus upon a 'shift-tab' traverse event.void
Sets the currently focused figure.
-
Constructor Details
-
FocusTraverseManager
public FocusTraverseManager()Default constructor.
-
-
Method Details
-
getNextFocusableFigure
Returns the IFigure that will receive focus upon a 'tab' traverse event.- Parameters:
root
- theLightweightSystem's
root figureprevFocus
- the IFigure who currently owns focus- Returns:
- the next focusable figure
-
getPreviousFocusableFigure
Returns the IFigure that will receive focus upon a 'shift-tab' traverse event.- Parameters:
root
- TheLightweightSystem's
root figureprevFocus
- The IFigure who currently owns focus- Returns:
- the previous focusable figure
-
getCurrentFocusOwner
- Returns:
- the figure that currently has focus
-
setCurrentFocusOwner
Sets the currently focused figure.- Parameters:
fig
- the figure to get focus
-