summaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/accessibility
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/accessibility')
-rw-r--r--libjava/classpath/javax/accessibility/AccessibleAction.java16
-rw-r--r--libjava/classpath/javax/accessibility/AccessibleAttributeSequence.java22
-rw-r--r--libjava/classpath/javax/accessibility/AccessibleEditableText.java2
-rw-r--r--libjava/classpath/javax/accessibility/AccessibleRelationSet.java4
-rw-r--r--libjava/classpath/javax/accessibility/AccessibleRole.java13
-rw-r--r--libjava/classpath/javax/accessibility/AccessibleTextSequence.java17
6 files changed, 65 insertions, 9 deletions
diff --git a/libjava/classpath/javax/accessibility/AccessibleAction.java b/libjava/classpath/javax/accessibility/AccessibleAction.java
index a7cf05e4a04..c2e00714176 100644
--- a/libjava/classpath/javax/accessibility/AccessibleAction.java
+++ b/libjava/classpath/javax/accessibility/AccessibleAction.java
@@ -78,6 +78,22 @@ public interface AccessibleAction
static final String TOGGLE_EXPAND = "toggle expand";
/**
+ * The name of an action which causes a component to perform its default
+ * action.
+ *
+ * @since 1.6
+ */
+ static final String CLICK = "click";
+
+ /**
+ * The name of an action which toggles the state of a popup, causing a
+ * hidden popup to be displayed and a visible popup to be hidden.
+ *
+ * @since 1.6
+ */
+ static final String TOGGLE_POPUP = "toggle popup";
+
+ /**
* Get the number possible actions for this object, with the zeroth
* representing the default action.
*
diff --git a/libjava/classpath/javax/accessibility/AccessibleAttributeSequence.java b/libjava/classpath/javax/accessibility/AccessibleAttributeSequence.java
index 5ee50e5d787..de8edcb9706 100644
--- a/libjava/classpath/javax/accessibility/AccessibleAttributeSequence.java
+++ b/libjava/classpath/javax/accessibility/AccessibleAttributeSequence.java
@@ -41,8 +41,12 @@ package javax.accessibility;
import javax.swing.text.AttributeSet;
/**
- * This is a convenience class that represents an accessible
- * attribute sequence.
+ * This is a convenience class that wraps together a sequence
+ * of text with the attributes applied to it. This allows a single
+ * object to be used when
+ * {@link AccessibleContext#ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED}
+ * events are fired.
+ *
* @since 1.5
*/
public class AccessibleAttributeSequence
@@ -63,9 +67,19 @@ public class AccessibleAttributeSequence
public int endIndex;
/**
- * Create a new instance.
+ * Creates a new instance using the specified attributes
+ * and the supplied start and end indicies.
+ *
+ * @param start the index of the start of the text.
+ * @param end the index of the end of the text.
+ * @param attr the attributes applied to the text sequence.
+ * @since 1.6
*/
- public AccessibleAttributeSequence()
+ public AccessibleAttributeSequence(int start, int end, AttributeSet attr)
{
+ startIndex = start;
+ endIndex = end;
+ attributes = attr;
}
+
}
diff --git a/libjava/classpath/javax/accessibility/AccessibleEditableText.java b/libjava/classpath/javax/accessibility/AccessibleEditableText.java
index 07d7530e4f4..308016a3966 100644
--- a/libjava/classpath/javax/accessibility/AccessibleEditableText.java
+++ b/libjava/classpath/javax/accessibility/AccessibleEditableText.java
@@ -125,7 +125,7 @@ public interface AccessibleEditableText extends AccessibleText
* Select the text between two points.
*
* @param start the start position, inclusive
- * @param end the end position, exclusive
+ * @param stop the end position, exclusive
*/
// XXX What happens if indices are out of bounds?
void selectText(int start, int stop);
diff --git a/libjava/classpath/javax/accessibility/AccessibleRelationSet.java b/libjava/classpath/javax/accessibility/AccessibleRelationSet.java
index 768c9cd791c..49161d77e9d 100644
--- a/libjava/classpath/javax/accessibility/AccessibleRelationSet.java
+++ b/libjava/classpath/javax/accessibility/AccessibleRelationSet.java
@@ -168,7 +168,7 @@ public class AccessibleRelationSet
{
int i = relations.size();
while (--i >= 0)
- if (((AccessibleRelation) relations.get(i)).key.equals(key))
+ if ((relations.get(i)).key.equals(key))
return true;
return false;
}
@@ -184,7 +184,7 @@ public class AccessibleRelationSet
int i = relations.size();
while (--i >= 0)
{
- AccessibleRelation r = (AccessibleRelation) relations.get(i);
+ AccessibleRelation r = relations.get(i);
if (r.key.equals(key))
return r;
}
diff --git a/libjava/classpath/javax/accessibility/AccessibleRole.java b/libjava/classpath/javax/accessibility/AccessibleRole.java
index a5396f147f5..c568b4fe93b 100644
--- a/libjava/classpath/javax/accessibility/AccessibleRole.java
+++ b/libjava/classpath/javax/accessibility/AccessibleRole.java
@@ -517,6 +517,19 @@ public class AccessibleRole extends AccessibleBundle
= new AccessibleRole("ruler");
/**
+ * A HTML container is an accessible object which contains other
+ * accessible objects that together form some HTML content. For example,
+ * the content may be a sequence of text containing a link, which
+ * would be represent as two children, one an {@link AccessibleText}
+ * object holding the normal text and the other an
+ * {@link AccessibleHypertext} object representing the link.
+ *
+ * @since 1.6
+ */
+ public static final AccessibleRole HTML_CONTAINER
+ = new AccessibleRole("HTML container");
+
+ /**
* Create a new constant with a locale independent key. Follow the example,
* keep the constructor private and make public constants instead.
*
diff --git a/libjava/classpath/javax/accessibility/AccessibleTextSequence.java b/libjava/classpath/javax/accessibility/AccessibleTextSequence.java
index 88fa4c2b880..b400160aa35 100644
--- a/libjava/classpath/javax/accessibility/AccessibleTextSequence.java
+++ b/libjava/classpath/javax/accessibility/AccessibleTextSequence.java
@@ -39,7 +39,10 @@ exception statement from your version. */
package javax.accessibility;
/**
- * This is a convenience class that encapsulates a String and a range.
+ * This is a convenience class that encapsulates a string of text
+ * and a range specifying where, within a larger body of text, the
+ * string may be found.
+ *
* @since 1.5
*/
public class AccessibleTextSequence
@@ -61,8 +64,18 @@ public class AccessibleTextSequence
/**
* Create a new instance.
+ *
+ * @param start the initial index of the text within a larger
+ * body of text.
+ * @param end the final index of the text within a larger body
+ * of text.
+ * @param txt the text itself.
+ * @since 1.6
*/
- public AccessibleTextSequence()
+ public AccessibleTextSequence(int start, int end, String txt)
{
+ startIndex = start;
+ endIndex = end;
+ text = txt;
}
}