All Packages Class Hierarchy This Package Previous Next Index
Class com.trumphurst.controls.ContainerFocusTracker
java.lang.Object
|
+----com.trumphurst.controls.ContainerFocusTracker
- public class ContainerFocusTracker
- extends Object
- implements FocusListener, ContainerListener
Class for Containers which won't take the keyboard focus.
Because of what appears to be a bug in Java 1.1, when you move the
focus on to a Frame, or other Container, it keeps the focus, rather
than handing it on to an appropriate tabstop inside it.
This class collects all focus events for the Container and its contents,
and will correct the problem. It also monitors the Container, and keeps
track if the focussed component is removed from the container.
To use, just create a tracker, passing it the Container you want to
deal with.
-
container
-
-
focus
-
-
ContainerFocusTracker()
-
-
ContainerFocusTracker(Container)
-
-
addComponent(Component)
-
-
addContainer(Container)
-
-
componentAdded(ContainerEvent)
-
-
componentRemoved(ContainerEvent)
-
-
focusGained(FocusEvent)
-
-
focusLost(FocusEvent)
-
-
removeComponent(Component)
-
-
removeContainer(Container)
-
container
protected Container container
focus
protected Component focus
ContainerFocusTracker
protected ContainerFocusTracker()
ContainerFocusTracker
public ContainerFocusTracker(Container c)
componentAdded
public void componentAdded(ContainerEvent e)
componentRemoved
public void componentRemoved(ContainerEvent e)
focusGained
public void focusGained(FocusEvent e)
focusLost
public void focusLost(FocusEvent e)
addComponent
protected void addComponent(Component c)
addContainer
protected void addContainer(Container container)
removeComponent
protected void removeComponent(Component c)
removeContainer
protected void removeContainer(Container container)
All Packages Class Hierarchy This Package Previous Next Index