com.alee.managers.focus
Class DefaultFocusTracker

java.lang.Object
  extended by com.alee.managers.focus.DefaultFocusTracker
All Implemented Interfaces:
FocusTracker

public abstract class DefaultFocusTracker
extends java.lang.Object
implements FocusTracker

Small extension class for FocusTracker that simplifies its creation.

Author:
Mikle Garin

Constructor Summary
DefaultFocusTracker()
          Constructs new tracker with the specified tracked component.
DefaultFocusTracker(boolean uniteWithChilds)
          Constructs new tracker with the specified tracked component.
 
Method Summary
 boolean isTrackingEnabled()
          Returns whether tracking is currently enabled or not.
 boolean isUniteWithChilds()
          Returns whether component and its childs in components tree should be counted as a single component or not.
 void setTrackingEnabled(boolean enabled)
          Sets whether tracking is currently enabled or not.
 void setUniteWithChilds(boolean uniteWithChilds)
          Sets whether component and its childs in components tree should be counted as a single component or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.alee.managers.focus.FocusTracker
focusChanged
 

Constructor Detail

DefaultFocusTracker

public DefaultFocusTracker()
Constructs new tracker with the specified tracked component.


DefaultFocusTracker

public DefaultFocusTracker(boolean uniteWithChilds)
Constructs new tracker with the specified tracked component.

Parameters:
uniteWithChilds - whether component and its childs in components tree should be counted as a single component or not
Method Detail

isTrackingEnabled

public boolean isTrackingEnabled()
Returns whether tracking is currently enabled or not.

Specified by:
isTrackingEnabled in interface FocusTracker
Returns:
true if tracking is currently enabled, false otherwise

setTrackingEnabled

public void setTrackingEnabled(boolean enabled)
Sets whether tracking is currently enabled or not.

Parameters:
enabled - whether tracking is currently enabled or not

isUniteWithChilds

public boolean isUniteWithChilds()
Returns whether component and its childs in components tree should be counted as a single component or not. In case component and its childs are counted as one focus changes within them will be ignored by tracker.

Specified by:
isUniteWithChilds in interface FocusTracker
Returns:
true if component and its childs in components tree should be counted as a single component, false otherwise

setUniteWithChilds

public void setUniteWithChilds(boolean uniteWithChilds)
Sets whether component and its childs in components tree should be counted as a single component or not.

Parameters:
uniteWithChilds - whether component and its childs in components tree should be counted as a single component or not