bibliothek.gui.dock.common
Class DefaultCFocusHistory

java.lang.Object
  extended by bibliothek.gui.dock.common.DefaultCFocusHistory
All Implemented Interfaces:
CFocusHistory

public class DefaultCFocusHistory
extends Object
implements CFocusHistory

The default implementation of CFocusHistory does not offer any additional functionality.

Author:
Benjamin Sigg

Constructor Summary
DefaultCFocusHistory(CControl control)
          Creates a new history
 
Method Summary
 CDockable getFirst(Filter<CDockable> filter)
          Gets the first CDockable matching filter.
 CDockable[] getHistory()
          Gets the entire history of focused CDockables, the most recent focused dockable is at the beginning of the array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCFocusHistory

public DefaultCFocusHistory(CControl control)
Creates a new history

Parameters:
control - the source of all CDockables
Method Detail

getHistory

public CDockable[] getHistory()
Description copied from interface: CFocusHistory
Gets the entire history of focused CDockables, the most recent focused dockable is at the beginning of the array.

Specified by:
getHistory in interface CFocusHistory
Returns:
the history starting with the most resently focused CDockable

getFirst

public CDockable getFirst(Filter<CDockable> filter)
Description copied from interface: CFocusHistory
Gets the first CDockable matching filter. This method first searches through the history, and afterwards visits all CDockables that were not in the history.

Specified by:
getFirst in interface CFocusHistory
Parameters:
filter - the filter applied to all CDockables
Returns:
the first dockable matching filter