public class FocusTraverseManager
extends java.lang.Object
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 and Description |
---|
FocusTraverseManager()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
IFigure |
getCurrentFocusOwner() |
IFigure |
getNextFocusableFigure(IFigure root,
IFigure prevFocus)
Returns the IFigure that will receive focus upon a 'tab' traverse event.
|
IFigure |
getPreviousFocusableFigure(IFigure root,
IFigure prevFocus)
Returns the IFigure that will receive focus upon a 'shift-tab' traverse
event.
|
void |
setCurrentFocusOwner(IFigure fig)
Sets the currently focused figure.
|
public IFigure getNextFocusableFigure(IFigure root, IFigure prevFocus)
root
- the LightweightSystem's
root figureprevFocus
- the IFigure who currently owns focuspublic IFigure getPreviousFocusableFigure(IFigure root, IFigure prevFocus)
root
- The LightweightSystem's
root figureprevFocus
- The IFigure who currently owns focuspublic IFigure getCurrentFocusOwner()
public void setCurrentFocusOwner(IFigure fig)
fig
- the figure to get focusCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.