public abstract class DefaultFocusTracker extends java.lang.Object implements FocusTracker
FocusTracker that simplifies its creation.| Constructor and Description |
|---|
DefaultFocusTracker()
Constructs new tracker with the specified tracked component.
|
DefaultFocusTracker(boolean uniteWithChildren)
Constructs new tracker with the specified tracked component.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomChild(java.awt.Component customChild)
Adds new custom child.
|
java.util.List<java.awt.Component> |
getCustomChildren()
Returns custom children which should be tracked together with this component.
|
java.util.List<java.lang.ref.WeakReference<java.awt.Component>> |
getWeakCustomChildren()
Returns weakly-referenced custom children.
|
boolean |
isInvolved(java.awt.Component component,
java.awt.Component tracked)
Returns whether specified component is involved with this tracker or not.
|
boolean |
isTrackingEnabled()
Returns whether tracking is currently enabled or not.
|
boolean |
isUniteWithChildren()
Returns whether component and its children in components tree should be counted as a single component or not.
|
void |
removeCustomChild(java.awt.Component customChild)
Removes custom child.
|
void |
setCustomChildren(java.util.List<java.awt.Component> customChildren)
Sets custom children which should be tracked together with this component.
|
void |
setTrackingEnabled(boolean enabled)
Sets whether tracking is currently enabled or not.
|
void |
setUniteWithChildren(boolean uniteWithChildren)
Sets whether component and its children in components tree should be counted as a single component or not.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfocusChangedpublic DefaultFocusTracker()
public DefaultFocusTracker(boolean uniteWithChildren)
uniteWithChildren - whether component and its children in components tree should be counted as a single component or notpublic boolean isTrackingEnabled()
FocusTrackerisTrackingEnabled in interface FocusTrackerpublic void setTrackingEnabled(boolean enabled)
enabled - whether tracking is currently enabled or notpublic boolean isInvolved(java.awt.Component component,
java.awt.Component tracked)
FocusTrackerisInvolved in interface FocusTrackercomponent - component to check for involvementtracked - tracked componentpublic boolean isUniteWithChildren()
public void setUniteWithChildren(boolean uniteWithChildren)
uniteWithChildren - whether component and its children in components tree should be counted as a single component or notpublic java.util.List<java.awt.Component> getCustomChildren()
public java.util.List<java.lang.ref.WeakReference<java.awt.Component>> getWeakCustomChildren()
public void setCustomChildren(java.util.List<java.awt.Component> customChildren)
customChildren - custom children which should be tracked together with this componentpublic void addCustomChild(java.awt.Component customChild)
customChild - custom child to addpublic void removeCustomChild(java.awt.Component customChild)
customChild - custom child to remove