Top Description Fields Constructors Methods
com.sun.jfx.incubator.scene.control.richtext

public Class RTAccessibilityHelper

extends Object
Class Inheritance
Imports
jfx.incubator.scene.control.richtext.RichTextArea, .SelectionSegment, .TextPos

The purpose of this class is to maintain a small String segment around the RichTextArea caret to use with the accessibility API.

These APIs generally accept a single String and integer offsets for caret position and selection, which is totally impossible to implement in the context of a large virtualized text model, as it a) uses TextPos for encapsulating the text position instead of an int, and it may not be possible to represent selected text as a String for large models.

Field Summary

Modifier and TypeField and Description
private final RichTextArea
private TextPos
private TextPos

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Integer
private Integer
private void
public String
public void
handleModelChange()

clear a11y cache

public boolean

Returns:

true if a11y window has shifted and TEXT attribute needs to be sent to the platform
handleSelectionChange
(SelectionSegment sel)

Handles selection changes.

public boolean
handleTextUpdate(TextPos p0, TextPos p1)

returns true if update is within the a11y window

private boolean
private void
p(String fmt, Object... args)

public Integer
public Integer
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

controlback to summary
private final RichTextArea control
endback to summary
private TextPos end
startback to summary
private TextPos start

Constructor Detail

RTAccessibilityHelperback to summary
public RTAccessibilityHelper(RichTextArea t)

Method Detail

caretOffsetback to summary
public Integer caretOffset()
computeOffsetback to summary
private Integer computeOffset(TextPos p)
createWindowback to summary
private void createWindow()
getTextback to summary
public String getText()
handleModelChangeback to summary
public void handleModelChange()

clear a11y cache

handleSelectionChangeback to summary
public boolean handleSelectionChange(SelectionSegment sel)

Handles selection changes.

Returns:boolean

true if a11y window has shifted and TEXT attribute needs to be sent to the platform

handleTextUpdateback to summary
public boolean handleTextUpdate(TextPos p0, TextPos p1)

returns true if update is within the a11y window

isOutsideback to summary
private boolean isOutside(TextPos p0, TextPos p1)
pback to summary
private void p(String fmt, Object... args)
selectionEndback to summary
public Integer selectionEnd()
selectionStartback to summary
public Integer selectionStart()