Record Class SelectionItemFacet
- Record Components:
selected- whether this member is selectedpositionInSet- this member's one-based position, or0when it has nonesizeOfSet- how many members the set holds, or0when that is unknowncontainerless- whether this member belongs to no container node at all
The position and the size of the set are the numbers a screen reader speaks as
"3 of 12", and nothing else: they are the model's numbers rather than the tree's, so a list
that publishes only its realized rows still reports the true row count and a user is told where
they are in the data and not where they are in the fraction of it that happens to be mounted.
Which set they count is each widget's to say, and three say it differently: a list row, a tab,
a menu row or a radio counts the container's members; a tree row counts its
siblings, the rows at its own level under its own parent, its place in the whole
outline being HierarchyFacet's; a calendar day counts the days of its own month, "15 of
30". A bridge that needs a row's index in a grid reads CellFacet, never these numbers.
A zero says there is no number: a bridge publishes nothing for it on every platform rather than "0 of 0", which is what a radio outside any group carries.
A member belongs to a container, or says it does not. The container is the nearest
ancestor with a SelectionFacet, climbing from the published parent only through synthetic
ancestors that lack one; it is what a selection change is raised on and what a platform's
"selection container" answers. A radio button has none — a ButtonGroup is not a node —
and says so with containerless(), so its selection change is never laid on whatever
layout node happens to be its published parent, and a bridge asked for its container answers none
rather than guessing.
-
Constructor Summary
ConstructorsConstructorDescriptionSelectionItemFacet(boolean selected, int positionInSet, int sizeOfSet) A member of a container: the shape every widget but a radio button publishes.SelectionItemFacet(boolean selected, int positionInSet, int sizeOfSet, boolean containerless) Creates an instance of aSelectionItemFacetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecontainerlessrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepositionInSetrecord component.booleanselected()Returns the value of theselectedrecord component.intReturns the value of thesizeOfSetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SelectionItemFacet
public SelectionItemFacet(boolean selected, int positionInSet, int sizeOfSet) A member of a container: the shape every widget but a radio button publishes.- Parameters:
selected- whether this member is selectedpositionInSet- this member's one-based position, or0when it has nonesizeOfSet- how many members the set holds, or0when that is unknown
-
SelectionItemFacet
public SelectionItemFacet(boolean selected, int positionInSet, int sizeOfSet, boolean containerless) Creates an instance of aSelectionItemFacetrecord class.- Parameters:
selected- the value for theselectedrecord componentpositionInSet- the value for thepositionInSetrecord componentsizeOfSet- the value for thesizeOfSetrecord componentcontainerless- the value for thecontainerlessrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
selected
public boolean selected()Returns the value of theselectedrecord component.- Returns:
- the value of the
selectedrecord component
-
positionInSet
public int positionInSet()Returns the value of thepositionInSetrecord component.- Returns:
- the value of the
positionInSetrecord component
-
sizeOfSet
public int sizeOfSet()Returns the value of thesizeOfSetrecord component.- Returns:
- the value of the
sizeOfSetrecord component
-
containerless
public boolean containerless()Returns the value of thecontainerlessrecord component.- Returns:
- the value of the
containerlessrecord component
-