mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-28 08:39:56 +00:00
8380790: reuse JEditorPaneAccessibleHypertextSupport
getAccessibleText() is the only place JEditorPaneAccessibleHypertextSupport is constructed. (I don't see why JEditorPaneAccessibleHypertextSupport was written as a separate class. Ideally I'd consider flattening it into AccessibleJEditorPaneHTML. But since it's already released as a protected class: I don't want to risk refactoring it away in case some developers have dependencies around it.)
This commit is contained in:
parent
3d6856c251
commit
31ff495d36
@ -1715,13 +1715,17 @@ public class JEditorPane extends JTextComponent {
|
||||
protected class AccessibleJEditorPaneHTML extends AccessibleJEditorPane {
|
||||
|
||||
private AccessibleContext accessibleContext;
|
||||
private JEditorPaneAccessibleHypertextSupport axText;
|
||||
|
||||
/**
|
||||
* Returns the accessible text.
|
||||
* @return the accessible text
|
||||
*/
|
||||
public AccessibleText getAccessibleText() {
|
||||
return new JEditorPaneAccessibleHypertextSupport();
|
||||
if (axText == null) {
|
||||
axText = new JEditorPaneAccessibleHypertextSupport();
|
||||
}
|
||||
return axText;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user