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.


Variable Index

 o container
 o focus

Constructor Index

 o ContainerFocusTracker()
 o ContainerFocusTracker(Container)

Method Index

 o addComponent(Component)
 o addContainer(Container)
 o componentAdded(ContainerEvent)
 o componentRemoved(ContainerEvent)
 o focusGained(FocusEvent)
 o focusLost(FocusEvent)
 o removeComponent(Component)
 o removeContainer(Container)

Variables

 o container
 protected Container container
 o focus
 protected Component focus

Constructors

 o ContainerFocusTracker
 protected ContainerFocusTracker()
 o ContainerFocusTracker
 public ContainerFocusTracker(Container c)

Methods

 o componentAdded
 public void componentAdded(ContainerEvent e)
 o componentRemoved
 public void componentRemoved(ContainerEvent e)
 o focusGained
 public void focusGained(FocusEvent e)
 o focusLost
 public void focusLost(FocusEvent e)
 o addComponent
 protected void addComponent(Component c)
 o addContainer
 protected void addContainer(Container container)
 o removeComponent
 protected void removeComponent(Component c)
 o removeContainer
 protected void removeContainer(Container container)

All Packages  Class Hierarchy  This Package  Previous  Next  Index