Record Class ActionFacet
- Record Components:
actions- the verbs, in no particular order; never empty and never modifiablekeyBinding- the accelerator that performs this node's primary action, ornullaccessKey- the access letter's chord as a user would read it, ornull
Only parameterless verbs are published here. A parameterised setter is dispatched through the same one call and is not in this list, because one of the three platforms cannot express a parameterised action in its action list at all; what advertises such a setter is the presence of the facet it sets.
The key binding is here because one platform's action list has a column for it and nothing else in the model does. It is the accelerator as a user would read it, already localized.
The access key is apart from it: the letter a user presses with Alt to reach the node ("Alt+N"), which a menu, a button or a field's label marks, where the key binding runs a command ("Ctrl+N"). Windows has a property for each; Linux serves both in one string.
-
Constructor Summary
ConstructorsConstructorDescriptionActionFacet(Set<Accessible.Action> actions, @Nullable String keyBinding) A facet with no access key.ActionFacet(Set<Accessible.Action> actions, @Nullable String keyBinding, @Nullable String accessKey) Creates an instance of aActionFacetrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of theaccessKeyrecord component.actions()Returns the value of theactionsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanhas(Accessible.Action action) final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of thekeyBindingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ActionFacet
A facet with no access key. -
ActionFacet
public ActionFacet(Set<Accessible.Action> actions, @Nullable String keyBinding, @Nullable String accessKey) Creates an instance of aActionFacetrecord class.- Parameters:
actions- the value for theactionsrecord componentkeyBinding- the value for thekeyBindingrecord componentaccessKey- the value for theaccessKeyrecord component
-
-
Method Details
-
has
- Parameters:
action- the verb to look for- Returns:
- whether this node offers it
-
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 withObjects::equals(Object,Object). -
actions
Returns the value of theactionsrecord component.- Returns:
- the value of the
actionsrecord component
-
keyBinding
Returns the value of thekeyBindingrecord component.- Returns:
- the value of the
keyBindingrecord component
-
accessKey
Returns the value of theaccessKeyrecord component.- Returns:
- the value of the
accessKeyrecord component
-