Package limn.testing.a11y
Interface RowsSubject
public interface RowsSubject
A widget of the
ROWS shape as the rows contract sees it: something that publishes a
selection and members of it, which the contract can build fresh, read the selection and the
cursor of through the widget's own API, and ask three things about that the published tree
cannot say. Those three are the variants of the shape: whether the cursor is the selection or
separate from it, how rows beyond the box are reached, and whether there is a multiple
selection to enter.
A subject builds its rows as plain cells that cannot take the keyboard, so that what the
contract reads on a row is the row's and not the walk's free verbs on a focusable child. The
rows are named, uniquely, in tree order; "row i" everywhere below is the ith
name of rowNames(), which is also the ith member the tree publishes while
nothing has scrolled.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumHow the widget reaches a row outside its box. -
Method Summary
Modifier and TypeMethodDescriptionWidget<?> build()Builds a fresh widget with the rowsrowNames()names, nothing selected, and returns the root to bind: the widget itself, or a box around it that makes the box smaller than the rows whenscrolling()is notRowsSubject.Scrolling.NONE.default booleanbooleanintdefault booleanTakes every row away through the widget's API and gives itcontentas what it shows while it holds none, withmessage, a label inside the content, as what describes it then.booleanPuts the widget into multiple selection through its API.introwNames()booleanvoidselect(int row) Selects rowrowthrough the widget's API, as an application would.default Change.AspectWidget<?> widget()
-
Method Details
-
build
Widget<?> build()Builds a fresh widget with the rowsrowNames()names, nothing selected, and returns the root to bind: the widget itself, or a box around it that makes the box smaller than the rows whenscrolling()is notRowsSubject.Scrolling.NONE. Called once per case. -
widget
Widget<?> widget()- Returns:
- the widget
build()made last: the container whose rows these are
-
rowNames
- Returns:
- the rows' names, unique, in tree order
-
cursorIsTheSelection
boolean cursorIsTheSelection()- Returns:
- true where the cursor is the selection (a list, a segmented control, a tab strip); false where a row can be the cursor without being selected (a tree, a table, a calendar)
-
scrolling
RowsSubject.Scrolling scrolling()- Returns:
- how a row beyond the box is reached
-
rowsActivate
boolean rowsActivate()- Returns:
- true where a row has an activation of its own that
PRESSperforms (a tree's row opens, a table's row is activated, a tab dives into its panel); false where it has none (a list, whosePRESSis the container's and acts on the selection; a segment; a calendar's day, which is only picked)
-
enterMultipleSelection
boolean enterMultipleSelection()Puts the widget into multiple selection through its API.- Returns:
- false when the widget has no multiple selection, in which case nothing changed
-
select
void select(int row) Selects rowrowthrough the widget's API, as an application would. -
selectedRows
- Returns:
- the rows the widget's API says are selected, ascending
-
cursorRow
int cursorRow()- Returns:
- the row the widget's API says is the cursor, or -1 when there is none; where the cursor is the selection, the selected row
-
lastActivated
int lastActivated()- Returns:
- the row last activated through the widget's own callback, or -1
-
containerless
default boolean containerless()- Returns:
- whether the members have no container node of their own — a radio group, whose rows are widgets and whose group is not: the contract then reads the members' common parent as the box, expects the cursor to be the selection, and hears the selection change on the members that moved rather than on a container
-
empty
Takes every row away through the widget's API and gives itcontentas what it shows while it holds none, withmessage, a label inside the content, as what describes it then. Called on a bound widget; the contract publishes a frame after it.- Parameters:
content- what shows while there are no rowsmessage- the label inside it that says why- Returns:
- false where the widget has no empty content (a segmented control, a tab strip, a radio group, a calendar), in which case nothing changed
-
selectionAspect
- Returns:
- the aspect the subject announces a selection change under:
SELECTIONfor a container's; a radio group spells its one change asVALUEon each member
-