View
The smallest unit of displayable, interactive content within doodle. Views are the visual entities used to display components for an application. User input events are sent to all Views that are configured to receive them. This allows them to response to user interaction or convey such events to other parts of an application.
Author
Nicholas Eddy
Inheritors
Types
ClipPath based on a Ellipse. The contains check defaults to Ellipse.contains.
ClipPath based on a Polygon. The contains check defaults to Polygon.contains.
Indicates the minimum and ideal sizes for a View.
Properties
Determines whether the View will be affected by Themes set in ThemeManager. Defaults to true
Indicates the View that contains a more detailed description for assistive technologies. This property overrides accessibilityLabel.
Provides a recognizable name for assistive technologies.
Indicates the View that contains a recognizable name for assistive technologies. This property overrides accessibilityLabel.
indicates the View's role for assistive technologies
Optional color that the View could use for its background
Notifies changes to camera
List of child Views within this one
Notifies changes to children
The resolved content direction for this View, including any value inherited from its parent if localContentDirection is null
. The final fallback value is LeftRight.
Notifies changes to localContentDirection
Notifies changes to cursor
Notifies changes to displayed
Current visible Rectangle for this View within it's coordinate space. This accounts for clipping by ancestors, but NOT cousins (siblings, anywhere in the hierarchy)
Notifies changes to monitorsDisplayRect
Recognizer used to determine whether a PointerEvent should result in a DragOperation
Receiver that determines what drop operations are supported by the View
Notifies changes to enabled
Notifies on the View's first render
Notifies changes to focusable
Notifies changes to hasFocus
Optional color that the View could use for its foreground (i.e. text)
KeyListeners that are notified during the bubbling phase of key event handling.
KeyListeners that are notified during the sinking phase of key event handling
Indicates the direction of content within the View; used to support right-to-left locales. Setting this property to null
will allow the View to inherit the value from its parent. The resolved value is obtained via contentDirection; and it will never be null
.
Minimum size preferred by the View, default is Empty
true
if the View's contentDirection is RightLeft and mirrorWhenRightLeft is true
.
Indicates whether the View should be mirrored (as though transformed using AffineTransform.flipHorizontally), when the contentDirection is RightLeft.
Indicates whether the framework should notify the View of changes to its visible region as a result of changes to bounds in its ancestor chain. The events for this require monitoring potentially large sets of Views in the hierarchy and the events can be frequent during layout changes. So the default value is false
. But it is useful for things like efficient rendering of sub-portions (i.e. long list-like Views) where the cost is outweighed.
Overrides the next item read by assistive technologies when they move from this View. This is helpful when the display order (i.e. ordering of children in a parent) does not match the order they should be read in.
Indicates how opaque the View is. A value of 1 means the View should be fully opaque and 0 means fully transparent. Setting this property to 0 does not make a View invisible (i.e. visible might still be true
). This property also does not affect how events (i.e. pointer and keyboard) are sent to the View.
Notifies changes to opacity
Notifies changes to parent
PointerListeners that are notified during the bubbling phase of pointer event handling.
PointerListeners that are notified during the sinking phase of pointer event handling.
PointerMotionListeners that are notified during the sinking phase of pointer-motion event handling.
PointerMotionListeners that are notified during the sinking phase of pointer-motion event handling.
PointerMotionListeners that are ONLY notified if a View chooses to pass a pointer event through to Views below it. This allows actions to be taken for events that would otherwise be relayed to other, underlying Views.
PointerListeners that are ONLY notified if a View chooses to pass a pointer event through to Views below it. This allows actions to be taken for events that would otherwise be relayed to other, underlying Views.
Notifies changes to idealSize or minimumSize
Notifies changes to font, foregroundColor, or backgroundColor
The current text to display for tool-tips. The default is the empty string.
Affine transform applied to the View. This transform does not affect the View's bounds or how it is handled by Layout. It does affect the boundingBox, and how the View looks when rendered. Hit-detection is handled correctly such that the pointer intersects with the View as expected after transformation. So no additional handling is necessary in general. The default is Identity
Notifies changes to transform
Notifies changes to visible
Inherited properties
Functions
Tells whether this View is an ancestor of the given View. A View is not considered an ancestor of itself.
Tells whether this View is child's parent. Unlike ancestorOf, this checks only a parent-child relationship.
Checks whether a point (relative to parent or Display if top-level) is within the View's bounds. This method must account for any transform and camera applied to the View. The default implementation does this and delegates to intersects.
This is an event invoked on a View in response to a key event triggered in the subsystem.
This is an event invoked on a View during the filter phase of a pointer event.
This is an event invoked on a View during the filter phase of a pointer-motion event.
Gets the set of keys used to trigger this type of focus traversal.
This is an event invoked on a View in response to a change in the display rectangle.
This is an event invoked on a View in response to a key event triggered in the subsystem.
This is an event invoked on a View in response to a pointer event triggered in the subsystem.
This is an event invoked on a View in response to a pointer-motion event triggered in the subsystem.
Checks whether a point on the View's plane, but relative to its parent, intersects (is "touching") the View. This enables custom hit detection logic for Views that have non-rectangular shapes.
Request the rendering subsystem to trigger a render call with no delay. Only use this method for time-sensitive drawing as is the case for animations.
Sets the keys used to control focus traversals of the given type.
Determines whether the given event should be passed through the View to underlying items. This method is only called when a View would normally be sent an event like the one provided.
Determines whether the given event should be passed through the View to underlying items. This method is only called when a View would normally be sent an event like the one provided.
Checked by the focus system before the focus is moved from a View. Returning false
will prevent focus from moving. The default is true
.
Maps a Point within the View to absolute coordinate-space.
Gets the tool-tip text based on the given PointerEvent. Override this method to provide multiple tool-tip text values for a single View.
Inherited functions
Scrolls the View to the given region if it is within a ScrollPanel.