summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2006-04-15 21:41:46 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2006-04-15 21:41:46 +0000
commit8ffa5c4e180edd9801a841264f2fd8a23b6a7d52 (patch)
treeed83f9eb23750804bb06187896a14ea965f75247
parent8628e982ea0b53a3fcc6b039375d57fbf4d48c04 (diff)
downloadclasspath-8ffa5c4e180edd9801a841264f2fd8a23b6a7d52.tar.gz
2006-04-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
* javax/accessibility/AccessibleAction.java: (DECREMENT): Added field. (INCREMENT): Likewise. (TOGGLE_EXPAND): Likewise. * javax/accessibility/AccessibleRole.java: (EDITBAR): Added field. (FOOTER): Likewise. (HEADER): Likewise. (PARAGRAPH): Likewise. (PROGRESS_MONITOR): Likewise. (RULER): Likewise. * javax/accessibility/AccessibleState.java: (INDETERMINATE): Added field. (MANAGES_DESCENDANTS): Likewise. (TRUNCATED): Likewise. * vm/reference/java/lang/reflect/Constructor.java: Fixed copyright header to match generics branch. * vm/reference/java/lang/reflect/Field.java: Fixed copyright header to match generics branch. (toGenericString()): Ported from generics branch. (getGenericType()): Likewise. (getSignature()): Likewise.
-rw-r--r--ChangeLog25
-rw-r--r--javax/accessibility/AccessibleAction.java22
-rw-r--r--javax/accessibility/AccessibleRole.java50
-rw-r--r--javax/accessibility/AccessibleState.java31
-rw-r--r--vm/reference/java/lang/reflect/Constructor.java2
-rw-r--r--vm/reference/java/lang/reflect/Field.java40
6 files changed, 168 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 93b011fe9..bb60ef63b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2006-04-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
+
+ * javax/accessibility/AccessibleAction.java:
+ (DECREMENT): Added field.
+ (INCREMENT): Likewise.
+ (TOGGLE_EXPAND): Likewise.
+ * javax/accessibility/AccessibleRole.java:
+ (EDITBAR): Added field.
+ (FOOTER): Likewise.
+ (HEADER): Likewise.
+ (PARAGRAPH): Likewise.
+ (PROGRESS_MONITOR): Likewise.
+ (RULER): Likewise.
+ * javax/accessibility/AccessibleState.java:
+ (INDETERMINATE): Added field.
+ (MANAGES_DESCENDANTS): Likewise.
+ (TRUNCATED): Likewise.
+ * vm/reference/java/lang/reflect/Constructor.java:
+ Fixed copyright header to match generics branch.
+ * vm/reference/java/lang/reflect/Field.java:
+ Fixed copyright header to match generics branch.
+ (toGenericString()): Ported from generics branch.
+ (getGenericType()): Likewise.
+ (getSignature()): Likewise.
+
2006-04-14 Robert Schuster <robertschuster@fsfe.org>
* javax/swing/text/DefaultCaret.java:
diff --git a/javax/accessibility/AccessibleAction.java b/javax/accessibility/AccessibleAction.java
index 2ca683e45..a7cf05e4a 100644
--- a/javax/accessibility/AccessibleAction.java
+++ b/javax/accessibility/AccessibleAction.java
@@ -55,6 +55,28 @@ package javax.accessibility;
*/
public interface AccessibleAction
{
+
+ /**
+ * The name of an action which decrements a value.
+ *
+ * @since 1.5
+ */
+ static final String DECREMENT = "decrement";
+
+ /**
+ * The name of an action which increments a value.
+ *
+ * @since 1.5
+ */
+ static final String INCREMENT = "increment";
+
+ /**
+ * The name of an action which toggles the expansion of a tree node.
+ *
+ * @since 1.5
+ */
+ static final String TOGGLE_EXPAND = "toggle expand";
+
/**
* Get the number possible actions for this object, with the zeroth
* representing the default action.
diff --git a/javax/accessibility/AccessibleRole.java b/javax/accessibility/AccessibleRole.java
index f386ad0e9..a5396f147 100644
--- a/javax/accessibility/AccessibleRole.java
+++ b/javax/accessibility/AccessibleRole.java
@@ -467,6 +467,56 @@ public class AccessibleRole extends AccessibleBundle
= new AccessibleRole("groupbox");
/**
+ * A formula for creating a value.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleRole EDITBAR
+ = new AccessibleRole("editbar");
+
+ /**
+ * A text-based footer.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleRole FOOTER
+ = new AccessibleRole("footer");
+
+ /**
+ * A text-based header.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleRole HEADER
+ = new AccessibleRole("header");
+
+
+ /**
+ * A text-based paragraph.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleRole PARAGRAPH
+ = new AccessibleRole("paragraph");
+
+ /**
+ * Represents the current level of progress on a particular task.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleRole PROGRESS_MONITOR
+ = new AccessibleRole("progress monitor");
+
+ /**
+ * A ruler is a method of measuring the distance between two
+ * points.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleRole RULER
+ = new AccessibleRole("ruler");
+
+ /**
* Create a new constant with a locale independent key. Follow the example,
* keep the constructor private and make public constants instead.
*
diff --git a/javax/accessibility/AccessibleState.java b/javax/accessibility/AccessibleState.java
index a630354b0..e4d00bd70 100644
--- a/javax/accessibility/AccessibleState.java
+++ b/javax/accessibility/AccessibleState.java
@@ -177,6 +177,28 @@ public class AccessibleState extends AccessibleBundle
= new AccessibleState("iconified");
/**
+ * Indicates that the state of this particular object is
+ * indeterminate. This commonly occurs when an object is incapable
+ * of representing the state by a single value.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleState INDETERMINATE
+ = new AccessibleState("indeterminate");
+
+ /**
+ * Indicates that this particular object manages a number of
+ * subcomponents. This is a common property of structures such as
+ * trees and tables, which have a number of sub-elements such as
+ * rows and columns. The subcomponents should be left to the
+ * object, and not managed by the application.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleState MANAGES_DESCENDANTS
+ = new AccessibleState("manages descendants");
+
+ /**
* Indicates that something must be done in the current object before
* interaction is allowed on other windows, usually for dialogs.
*
@@ -250,6 +272,15 @@ public class AccessibleState extends AccessibleBundle
= new AccessibleState("showing");
/**
+ * Indicates that this particular object is truncated when displayed
+ * visually.
+ *
+ * @since 1.5
+ */
+ public static final AccessibleState TRUNCATED
+ = new AccessibleState("truncated");
+
+ /**
* Indicates that this object intends to be visible. However, if its
* parent is invisible, this object is as well.
*
diff --git a/vm/reference/java/lang/reflect/Constructor.java b/vm/reference/java/lang/reflect/Constructor.java
index a8733f46a..55e5ac0dd 100644
--- a/vm/reference/java/lang/reflect/Constructor.java
+++ b/vm/reference/java/lang/reflect/Constructor.java
@@ -1,5 +1,5 @@
/* java.lang.reflect.Constructor - reflection of Java constructors
- Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/vm/reference/java/lang/reflect/Field.java b/vm/reference/java/lang/reflect/Field.java
index 874b7da91..d0e84aba9 100644
--- a/vm/reference/java/lang/reflect/Field.java
+++ b/vm/reference/java/lang/reflect/Field.java
@@ -1,5 +1,5 @@
/* java.lang.reflect.Field - reflection of Java fields
- Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,6 +40,8 @@ package java.lang.reflect;
import gnu.java.lang.ClassHelper;
+import gnu.java.lang.reflect.FieldSignatureParser;
+
/**
* The Field class represents a member variable of a class. It also allows
* dynamic access to a member, via reflection. This works for both
@@ -212,6 +214,16 @@ extends AccessibleObject implements Member
return sb.toString();
}
+ public String toGenericString()
+ {
+ StringBuffer sb = new StringBuffer(64);
+ Modifier.toString(getModifiers(), sb).append(' ');
+ sb.append(getGenericType()).append(' ');
+ sb.append(getDeclaringClass().getName()).append('.');
+ sb.append(getName());
+ return sb.toString();
+ }
+
/**
* Get the value of this Field. If it is primitive, it will be wrapped
* in the appropriate wrapper type (boolean = java.lang.Boolean).<p>
@@ -621,4 +633,30 @@ extends AccessibleObject implements Member
*/
public native void setDouble(Object o, double value)
throws IllegalAccessException;
+
+ /**
+ * Return the generic type of the field. If the field type is not a generic
+ * type, the method returns the same as <code>getType()</code>.
+ *
+ * @throws GenericSignatureFormatError if the generic signature does
+ * not conform to the format specified in the Virtual Machine
+ * specification, version 3.
+ * @since 1.5
+ */
+ public Type getGenericType()
+ {
+ String signature = getSignature();
+ if (signature == null)
+ return getType();
+ FieldSignatureParser p = new FieldSignatureParser(getDeclaringClass(),
+ signature);
+ return p.getFieldType();
+ }
+
+ /**
+ * Return the String in the Signature attribute for this field. If there
+ * is no Signature attribute, return null.
+ */
+ private native String getSignature();
+
}