public class DefaultFocusHistory extends Object implements FocusHistory
FocusHistory adds listeners to a
DockController to keep the history up to date. Only Dockables that
are actually registered at the controller are reported in the history| Constructor and Description |
|---|
DefaultFocusHistory() |
| Modifier and Type | Method and Description |
|---|---|
Dockable |
getFirst(Filter<Dockable> 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. |
void |
setController(DockController controller) |
public void setController(DockController controller)
public Dockable[] getHistory()
FocusHistoryDockables 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.Dockables that were never focused, these items will always be at the beginning of
the array.getHistory in interface FocusHistorypublic Dockable getNewestOn(DockStation... parents)
FocusHistoryDockable that had the focus lately, and that is a child of one
of parent.getNewestOn in interface FocusHistoryparents - the stations whose child is searchedDockable that had the focus and which is a child of one of the parents, or
null if no such Dockable can be foundpublic Dockable getFirst(Filter<Dockable> filter)
FocusHistorygetFirst in interface FocusHistoryfilter - the filter to apply, not nullDockable having focus and matching filter, or nullCopyright © 2017 Docking Frames. All rights reserved.