158 if (a == null) return null;
159
160 return invokeAndWait(new Callable<AccessibleContext>() {
161 public AccessibleContext call() throws Exception {
162 return a.getAccessibleContext();
163 }
164 }, c);
165 }
166
167 public static boolean isAccessibleChildSelected(final Accessible a, final int index, final Component c) {
168 if (a == null) return false;
169
170 return invokeAndWait(new Callable<Boolean>() {
171 public Boolean call() throws Exception {
172 final AccessibleContext ac = a.getAccessibleContext();
173 if (ac == null) return Boolean.FALSE;
174
175 final AccessibleSelection as = ac.getAccessibleSelection();
176 if (as == null) return Boolean.FALSE;
177
178 return new Boolean(as.isAccessibleChildSelected(index));
179 }
180 }, c);
181 }
182
183 public static AccessibleStateSet getAccessibleStateSet(final AccessibleContext ac, final Component c) {
184 if (ac == null) return null;
185
186 return invokeAndWait(new Callable<AccessibleStateSet>() {
187 public AccessibleStateSet call() throws Exception {
188 return ac.getAccessibleStateSet();
189 }
190 }, c);
191 }
192
193 public static boolean contains(final AccessibleContext ac, final AccessibleState as, final Component c) {
194 if (ac == null || as == null) return false;
195
196 return invokeAndWait(new Callable<Boolean>() {
197 public Boolean call() throws Exception {
198 final AccessibleStateSet ass = ac.getAccessibleStateSet();
|
158 if (a == null) return null;
159
160 return invokeAndWait(new Callable<AccessibleContext>() {
161 public AccessibleContext call() throws Exception {
162 return a.getAccessibleContext();
163 }
164 }, c);
165 }
166
167 public static boolean isAccessibleChildSelected(final Accessible a, final int index, final Component c) {
168 if (a == null) return false;
169
170 return invokeAndWait(new Callable<Boolean>() {
171 public Boolean call() throws Exception {
172 final AccessibleContext ac = a.getAccessibleContext();
173 if (ac == null) return Boolean.FALSE;
174
175 final AccessibleSelection as = ac.getAccessibleSelection();
176 if (as == null) return Boolean.FALSE;
177
178 return as.isAccessibleChildSelected(index);
179 }
180 }, c);
181 }
182
183 public static AccessibleStateSet getAccessibleStateSet(final AccessibleContext ac, final Component c) {
184 if (ac == null) return null;
185
186 return invokeAndWait(new Callable<AccessibleStateSet>() {
187 public AccessibleStateSet call() throws Exception {
188 return ac.getAccessibleStateSet();
189 }
190 }, c);
191 }
192
193 public static boolean contains(final AccessibleContext ac, final AccessibleState as, final Component c) {
194 if (ac == null || as == null) return false;
195
196 return invokeAndWait(new Callable<Boolean>() {
197 public Boolean call() throws Exception {
198 final AccessibleStateSet ass = ac.getAccessibleStateSet();
|