Package limn.accessibility
Record Class ScrollFacet
java.lang.Object
java.lang.Record
limn.accessibility.ScrollFacet
- Record Components:
horizontalPercent- where the viewport sits along the content's width, in0..1verticalPercent- where it sits along the content's height, in0..1horizontalViewSize- the fraction of the content's width the viewport showsverticalViewSize- the fraction of its height the viewport showshorizontallyScrollable- whether the content is wider than the viewportverticallyScrollable- whether it is taller
public record ScrollFacet(double horizontalPercent, double verticalPercent, double horizontalViewSize, double verticalViewSize, boolean horizontallyScrollable, boolean verticallyScrollable)
extends Record
A node that scrolls its content: a scroll view, a list, a text area, an overflowing strip.
The two percentages are where the viewport sits in the content, from 0 at the start
to 1 at the end; the two view sizes are the fraction of the content the viewport shows.
An axis that does not scroll reports a percentage of 0 and a view size of 1,
which is what every platform reads as "all of it, nowhere to go".
-
Constructor Summary
ConstructorsConstructorDescriptionScrollFacet(double horizontalPercent, double verticalPercent, double horizontalViewSize, double verticalViewSize, boolean horizontallyScrollable, boolean verticallyScrollable) Creates an instance of aScrollFacetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehorizontallyScrollablerecord component.doubleReturns the value of thehorizontalPercentrecord component.doubleReturns the value of thehorizontalViewSizerecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theverticallyScrollablerecord component.doubleReturns the value of theverticalPercentrecord component.doubleReturns the value of theverticalViewSizerecord component.
-
Constructor Details
-
ScrollFacet
public ScrollFacet(double horizontalPercent, double verticalPercent, double horizontalViewSize, double verticalViewSize, boolean horizontallyScrollable, boolean verticallyScrollable) Creates an instance of aScrollFacetrecord class.- Parameters:
horizontalPercent- the value for thehorizontalPercentrecord componentverticalPercent- the value for theverticalPercentrecord componenthorizontalViewSize- the value for thehorizontalViewSizerecord componentverticalViewSize- the value for theverticalViewSizerecord componenthorizontallyScrollable- the value for thehorizontallyScrollablerecord componentverticallyScrollable- the value for theverticallyScrollablerecord 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 '=='. -
horizontalPercent
public double horizontalPercent()Returns the value of thehorizontalPercentrecord component.- Returns:
- the value of the
horizontalPercentrecord component
-
verticalPercent
public double verticalPercent()Returns the value of theverticalPercentrecord component.- Returns:
- the value of the
verticalPercentrecord component
-
horizontalViewSize
public double horizontalViewSize()Returns the value of thehorizontalViewSizerecord component.- Returns:
- the value of the
horizontalViewSizerecord component
-
verticalViewSize
public double verticalViewSize()Returns the value of theverticalViewSizerecord component.- Returns:
- the value of the
verticalViewSizerecord component
-
horizontallyScrollable
public boolean horizontallyScrollable()Returns the value of thehorizontallyScrollablerecord component.- Returns:
- the value of the
horizontallyScrollablerecord component
-
verticallyScrollable
public boolean verticallyScrollable()Returns the value of theverticallyScrollablerecord component.- Returns:
- the value of the
verticallyScrollablerecord component
-