Package limn.testing.a11y
Interface ValueSubject
public interface ValueSubject
A widget of the
VALUE shape as the value contract sees it: something that
publishes one number in a range, which the contract can build fresh, read the number of
through the widget's own API, and ask whether the number can be set at all.
The node under contract is the one carrying the value facet below the root, which may be the widget itself (a slider) or a child of it (a split pane's divider).
-
Method Summary
Modifier and TypeMethodDescriptionWidget<?> build()Builds a fresh widget at a value away from both bounds and returns the root to bind.intchanges()doublemax()doublemin()booleanreadOnly()voidset(double value) Sets the number through the API, as an application would; unused where read-only.doublestep()doublevalue()default intdefault intWidget<?> widget()
-
Method Details
-
build
Widget<?> build()Builds a fresh widget at a value away from both bounds and returns the root to bind. -
widget
Widget<?> widget()- Returns:
- the widget
build()made last, whose node or descendant carries the value
-
value
double value()- Returns:
- the number the widget's API says it holds now
-
min
double min()- Returns:
- the least value the API allows
-
max
double max()- Returns:
- the greatest value the API allows
-
step
double step()- Returns:
- what one
INCREMENTmoves the API's number by
-
readOnly
boolean readOnly()- Returns:
- true where the number is shown and never set (a progress bar)
-
set
void set(double value) Sets the number through the API, as an application would; unused where read-only. -
changes
int changes()- Returns:
- how many times the widget's own change listener fired since
build()
-
valueNodes
default int valueNodes()- Returns:
- how many nodes carry a value facet in what
build()makes: one for most widgets, two for a range's thumbs. The contract refuses any other count.
-
valueNode
default int valueNode()- Returns:
- which of those nodes is under contract, counted in tree order from
0: a range's upper thumb is1, and the subject's other methods speak of it
-