public class AccessibleContextUtil
extends java.lang.Object
Constructor and Description |
---|
AccessibleContextUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
combineAccessibleStrings(java.lang.String s1,
java.lang.String s2) |
static java.lang.String |
combineAccessibleStrings(java.lang.String s1,
java.lang.String separator,
java.lang.String s2) |
static java.lang.String |
combineAccessibleStrings(java.lang.String s1,
java.lang.String separator1,
java.lang.String s2,
java.lang.String separator2,
java.lang.String s3) |
static java.lang.String |
getCombinedDescription(java.awt.Component j1,
java.lang.String separator,
java.awt.Component j2) |
static java.lang.String |
getCombinedDescription(java.awt.Component j1,
java.lang.String separator1,
java.awt.Component j2,
java.lang.String separator2,
java.awt.Component j3) |
static java.lang.String |
getCombinedName(java.awt.Component j1,
java.lang.String separator,
java.awt.Component j2) |
static java.lang.String |
getCombinedName(java.awt.Component j1,
java.lang.String separator1,
java.awt.Component j2,
java.lang.String separator2,
java.awt.Component j3) |
static java.lang.String |
getCombinedName(java.lang.String separator,
java.awt.Component... components) |
static java.lang.String |
getUniqueDescription(javax.accessibility.AccessibleContext context,
java.lang.String description)
Returns
description if it is different than the accessible
name, null otherwise. |
static java.lang.String |
replaceLineSeparatorsWithPunctuation(java.lang.String text)
Given a multi-line string, return an single line string where new line separators
are replaced with a punctuation character.
|
static void |
setCombinedDescription(java.awt.Component component,
java.awt.Component j1,
java.lang.String separator,
java.awt.Component j2) |
static void |
setCombinedDescription(java.awt.Component component,
java.awt.Component j1,
java.lang.String separator1,
java.awt.Component j2,
java.lang.String separator2,
java.awt.Component j3) |
static void |
setCombinedName(java.awt.Component component,
java.awt.Component j1,
java.lang.String separator,
java.awt.Component j2) |
static void |
setCombinedName(java.awt.Component component,
java.awt.Component j1,
java.lang.String separator1,
java.awt.Component j2,
java.lang.String separator2,
java.awt.Component j3) |
static void |
setDescription(java.awt.Component component,
java.awt.Component source) |
static void |
setDescription(java.awt.Component component,
java.lang.String description) |
static void |
setName(java.awt.Component component,
java.awt.Component source) |
static void |
setName(java.awt.Component component,
java.lang.String name) |
static void |
setParent(java.awt.Component component,
java.awt.Component newParent) |
static void |
setParent(javax.swing.JComponent component,
java.awt.Component newParent)
Deprecated.
use
setParent(Component, Component) instead |
public static void setName(java.awt.Component component, java.lang.String name)
public static void setName(java.awt.Component component, java.awt.Component source)
public static void setCombinedName(java.awt.Component component, java.awt.Component j1, java.lang.String separator, java.awt.Component j2)
public static void setCombinedName(java.awt.Component component, java.awt.Component j1, java.lang.String separator1, java.awt.Component j2, java.lang.String separator2, java.awt.Component j3)
public static java.lang.String getCombinedName(java.awt.Component j1, java.lang.String separator, java.awt.Component j2)
public static java.lang.String getCombinedName(java.awt.Component j1, java.lang.String separator1, java.awt.Component j2, java.lang.String separator2, java.awt.Component j3)
public static java.lang.String getCombinedName(java.lang.String separator, java.awt.Component... components)
public static void setDescription(java.awt.Component component, java.awt.Component source)
public static void setDescription(java.awt.Component component, java.lang.String description)
public static void setCombinedDescription(java.awt.Component component, java.awt.Component j1, java.lang.String separator, java.awt.Component j2)
public static void setCombinedDescription(java.awt.Component component, java.awt.Component j1, java.lang.String separator1, java.awt.Component j2, java.lang.String separator2, java.awt.Component j3)
public static java.lang.String getCombinedDescription(java.awt.Component j1, java.lang.String separator, java.awt.Component j2)
public static java.lang.String getCombinedDescription(java.awt.Component j1, java.lang.String separator1, java.awt.Component j2, java.lang.String separator2, java.awt.Component j3)
public static java.lang.String getUniqueDescription(javax.accessibility.AccessibleContext context, java.lang.String description)
description
if it is different than the accessible
name, null
otherwise.
Calling this method is useful from custom implementations of
AccessibleContext@getAccessibleDescription
to ensure screen
readers don't announce the same text twice (name and description) when
a component receives the focus.public static void setParent(java.awt.Component component, java.awt.Component newParent)
@Deprecated public static void setParent(javax.swing.JComponent component, java.awt.Component newParent)
setParent(Component, Component)
insteadpublic static java.lang.String combineAccessibleStrings(java.lang.String s1, java.lang.String s2)
public static java.lang.String combineAccessibleStrings(java.lang.String s1, java.lang.String separator, java.lang.String s2)
public static java.lang.String combineAccessibleStrings(java.lang.String s1, java.lang.String separator1, java.lang.String s2, java.lang.String separator2, java.lang.String s3)
public static java.lang.String replaceLineSeparatorsWithPunctuation(java.lang.String text)