public class FocusTracker extends Object
| Constructor and Description |
|---|
FocusTracker(Component root)
Creates a new focus tracker.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(Component component)
Adds listeners to
component and its children to track the focus. |
void |
destroy()
Removes any listeners this
FocusTracker added anywhere allowing this FocusTracker
to be collected by the garbage collector. |
Component |
getLastFocused()
Gets the last component that was focused
|
protected void |
remove(Component component)
Removes listeners from
component and its children. |
public FocusTracker(Component root)
root - the root container whose children can be focusedpublic void destroy()
FocusTracker added anywhere allowing this FocusTracker
to be collected by the garbage collector.public Component getLastFocused()
null, will be a child of the root container or the root
container itselfprotected void add(Component component)
component and its children to track the focus.component - the component and its children to trackprotected void remove(Component component)
component and its children.component - the component to removeCopyright © 2017 Docking Frames. All rights reserved.