Package org.luwrain.controls
Interface ListArea.Transition
- All Known Implementing Classes:
ListUtils.DefaultTransition,ListUtils.DoubleLevelTransition,WebSearchPopup.Transition
public static interface ListArea.Transition
Defines how the hot point moves in response to navigation commands
(arrow keys, page up/down, home/end). The transition logic can be
customised by providing a different implementation.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classRepresents a possible state of the hot point: on an empty line (top or bottom), on a specific item index, or no transition possible.static enumTypes of navigation actions. -
Method Summary
Modifier and TypeMethodDescriptiontransition(ListArea.Transition.Type type, ListArea.Transition.State fromState, int itemCount, boolean hasEmptyLineTop, boolean hasEmptyLineBottom) Computes the new state after a navigation action.
-
Method Details
-
transition
ListArea.Transition.State transition(ListArea.Transition.Type type, ListArea.Transition.State fromState, int itemCount, boolean hasEmptyLineTop, boolean hasEmptyLineBottom) Computes the new state after a navigation action.- Parameters:
type- the type of navigation actionfromState- the current state of the hot pointitemCount- the total number of items in the modelhasEmptyLineTop- whether the list has a top empty linehasEmptyLineBottom- whether the list has a bottom empty line- Returns:
- the new state after the transition; never
null
-