|
Packit |
ffe0d2 |
/*
|
|
Packit |
ffe0d2 |
* Java ATK Wrapper for GNOME
|
|
Packit |
ffe0d2 |
* Copyright (C) 2009 Sun Microsystems Inc.
|
|
Packit |
ffe0d2 |
*
|
|
Packit |
ffe0d2 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
ffe0d2 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
ffe0d2 |
* License as published by the Free Software Foundation; either
|
|
Packit |
ffe0d2 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
ffe0d2 |
*
|
|
Packit |
ffe0d2 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
ffe0d2 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
ffe0d2 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
ffe0d2 |
* Lesser General Public License for more details.
|
|
Packit |
ffe0d2 |
*
|
|
Packit |
ffe0d2 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
ffe0d2 |
* License along with this library; if not, write to the Free Software
|
|
Packit |
ffe0d2 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit |
ffe0d2 |
*/
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
package org.GNOME.Accessibility;
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
import javax.accessibility.*;
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
public class AtkHyperlink {
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
AccessibleHyperlink acc_hyperlink;
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
public AtkHyperlink (AccessibleHyperlink hl) {
|
|
Packit |
ffe0d2 |
super();
|
|
Packit |
ffe0d2 |
acc_hyperlink = hl;
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
public String get_uri (int i) {
|
|
Packit |
ffe0d2 |
String s = "";
|
|
Packit |
ffe0d2 |
Object o = acc_hyperlink.getAccessibleActionObject(i);
|
|
Packit |
ffe0d2 |
if (o != null) {
|
|
Packit |
ffe0d2 |
s = o.toString();
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
return s;
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
public Object get_object (int i) {
|
|
Packit |
ffe0d2 |
Object o = null;
|
|
Packit |
ffe0d2 |
Object anchor = acc_hyperlink.getAccessibleActionAnchor(i);
|
|
Packit |
ffe0d2 |
if (anchor instanceof javax.accessibility.Accessible) {
|
|
Packit |
ffe0d2 |
o = anchor;
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
return o;
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
public int get_end_index () {
|
|
Packit |
ffe0d2 |
return acc_hyperlink.getEndIndex();
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
public int get_start_index () {
|
|
Packit |
ffe0d2 |
return acc_hyperlink.getStartIndex();
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
public boolean is_valid () {
|
|
Packit |
ffe0d2 |
return acc_hyperlink.isValid();
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|
|
Packit |
ffe0d2 |
public int get_n_anchors () {
|
|
Packit |
ffe0d2 |
return acc_hyperlink.getAccessibleActionCount();
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
}
|
|
Packit |
ffe0d2 |
|