Class FocusOrderGroup
java.lang.Object
com.blackrook.gui.group.FocusOrderGroup
A group that binds a series of actions to a set of focusable objects,
in such that if one presses certain buttons or keys, they will go forward or
back in focus.
If the object receives a GUIInputConstants.KEY_LEFT or GUIInputConstants.KEY_DOWN key or a positive GAMEPAD_TAP AXIS_POV.
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumprotected classAction added to objects for advancing focus. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FocusOrderGroup.DirectionDirectionality.protected GUIObject[]Object order list. -
Constructor Summary
ConstructorsConstructorDescriptionFocusOrderGroup(FocusOrderGroup.Direction direction, boolean loopOrder, GUIObject... objects) Creates a newFocusOrderGroupand binds the required actions to the objects provided.FocusOrderGroup(FocusOrderGroup.Direction direction, boolean loopOrder, Iterable<GUIObject> objects) Creates a newFocusOrderGroupand binds the required actions to the objects provided.FocusOrderGroup(FocusOrderGroup.Direction direction, GUIObject... objects) Creates a newFocusOrderGroupand binds the required actions to the objects provided.FocusOrderGroup(FocusOrderGroup.Direction direction, Iterable<GUIObject> objects) Creates a newFocusOrderGroupand binds the required actions to the objects provided. -
Method Summary
-
Field Details
-
direction
Directionality. -
order
Object order list.
-
-
Constructor Details
-
FocusOrderGroup
Creates a newFocusOrderGroupand binds the required actions to the objects provided.- Parameters:
direction- the directionality of the focus keys.objects- the objects to include in the group.
-
FocusOrderGroup
public FocusOrderGroup(FocusOrderGroup.Direction direction, boolean loopOrder, GUIObject... objects) Creates a newFocusOrderGroupand binds the required actions to the objects provided.- Parameters:
direction- the directionality of the focus keys.loopOrder- if true, the order loops back to the beginning, and not if false.objects- the objects to include in the group.
-
FocusOrderGroup
Creates a newFocusOrderGroupand binds the required actions to the objects provided.- Parameters:
direction- the directionality of the focus keys.objects- the objects to include in the group.
-
FocusOrderGroup
public FocusOrderGroup(FocusOrderGroup.Direction direction, boolean loopOrder, Iterable<GUIObject> objects) Creates a newFocusOrderGroupand binds the required actions to the objects provided.- Parameters:
direction- the directionality of the focus keys.loopOrder- if true, the order loops back to the beginning, and not if false.objects- the objects to include in the group.
-
-
Method Details
-
bind
Binds the actions in this group to the objects in the group.- Parameters:
loopOrder- if true, the end loops back to the beginning.objects- the objects in the group.
-