Class ContainerTracker
- java.lang.Object
-
- io.github.jonestimd.swing.validation.ContainerTracker
-
- Direct Known Subclasses:
FieldChangeTracker
,ValidationTracker
public abstract class ContainerTracker extends java.lang.Object
Base class for tracking changes to a component hierarchy. AftertrackFieldChanges(Container)
is called for a root container,componentAdded(Component)
andcomponentRemoved(Component)
will be called for anyComponent
that is added or removed within the hierarchy of the the root container. Children of the following components are excluded from the tracking:JComboBox
JList
JTable
-
-
Constructor Summary
Constructors Constructor Description ContainerTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
componentAdded(java.awt.Component component)
Adds theContainerListener
to thecomponent
.protected void
componentRemoved(java.awt.Component component)
Removes theContainerListener
to thecomponent
.void
trackFieldChanges(java.awt.Container container)
Adds theContainerListener
to thecontainer
and any of its nested containers.void
untrackFieldChanges(java.awt.Container container)
Removes theContainerListener
from thecontainer
and any of its nested containers.
-
-
-
Method Detail
-
trackFieldChanges
public void trackFieldChanges(java.awt.Container container)
Adds theContainerListener
to thecontainer
and any of its nested containers.
-
untrackFieldChanges
public void untrackFieldChanges(java.awt.Container container)
Removes theContainerListener
from thecontainer
and any of its nested containers.
-
componentAdded
protected void componentAdded(java.awt.Component component)
Adds theContainerListener
to thecomponent
.
-
componentRemoved
protected void componentRemoved(java.awt.Component component)
Removes theContainerListener
to thecomponent
.
-
-