Interface ISetVisibility
interface ISetVisibility
Extends com.amazon.apmf.IStandard
This interface is used to describe the visible traits of an element
including on-screen bounds.
Methods
bounds()
Gets the on-screen bounds of this element. This property specifies a polygon representing the on-screen bounds of the component, relative to its parent. Coordinates of the points in the polygon are expected to be provided in clockwise order.voidbounds(Point[]bounds)
Parameters
bounds
Point[] — Required
the on-screen bounds of this element relative to its parent
touchTarget()
Set the touch target for this element. In some cases, such as a grid containing very small items and a significant amount of whitespace, it is desirable to specify a touch target for an item which is larger than it’s on-screen bounds. This optional property allows a developer to specify a touch target which is different from the element’s on-screen bounds.voidtouchTarget(Point[]bounds)
Parameters
bounds
Point[] — Required
the bounds of the touch target for this element
zIndex()
Set the z-index of this element. Given two elements share the same parent and have overlapping bounds, this property allows an assistive technology to determine which one is on top, and should be spoken when the blind user touches the screen, or should control the location and magnification level of the screen magnifier. Overlapping elements with a larger z-index cover those with a smaller one. This property does not specify a range for zIndex values, as the actual zIndex value may be situation dependent. zIndex is useful only in the context of comparing multiple elements.voidzIndex(i32zIndex)
Parameters
zIndex
i32 — Required
the z-index of this element
alpha()
Set this element’s alpha value. Like zIndex, this property helps assistive technologies determine which element should be described when touched. For example, elements which are fully transparent likely should not be spoken when touched. This value is a percent. Valid values range from 0 (fully transparent) to 100 (fully opaque).voidalpha(i32alpha)
Parameters
alpha
i32 — Required
this element’s alpha value.
directTouch()
Set whether this element supports direct touch. This optional boolean property indicates that touch events within this element’s bounding box should be sent directly to the element, and not processed by UCC clients. This is used to allow blind customers using a screen reader to interact with components which need to process touch events directly. The canonical example of such a component is an on-screen piano keyboard, which plays sounds when individual keys are touched.voiddirectTouch(booldirectTouch)
Parameters
directTouch
bool — Required
true if this element supports direct touch.

