bibliothek.gui.dock.control.focus
Interface FocusHistory

All Known Implementing Classes:
DefaultFocusHistory

public interface FocusHistory

This interface tells the order in which the Dockables got the focus.

Author:
Benjamin Sigg

Method Summary
 Dockable getFirst(Filter<Dockable> filter)
          Traverses the history in reverse and returns the first Dockable matching filter.
 Dockable[] getHistory()
          Gets an array containing all known Dockables which may have had the focus.
 Dockable getNewestOn(DockStation... parents)
          Searches the one Dockable that had the focus lately, and that is a child of one of parent.
 

Method Detail

getHistory

Dockable[] getHistory()
Gets an array containing all known Dockables which may have had the focus. The first element in the array did not have the focus for the longest time, while the last element in the array is the element that may have the focus right now.
The result may contain Dockables that were never focused, these items will always be at the beginning of the array.

Returns:
a copy of the history

getNewestOn

Dockable getNewestOn(DockStation... parents)
Searches the one Dockable that had the focus lately, and that is a child of one of parent.

Parameters:
parents - the stations whose child is searched
Returns:
a Dockable that had the focus and which is a child of one of the parents, or null if no such Dockable can be found

getFirst

Dockable getFirst(Filter<Dockable> filter)
Traverses the history in reverse and returns the first Dockable matching filter.

Parameters:
filter - the filter to apply, not null
Returns:
the newest Dockable having focus and matching filter, or null