-
Notifications
You must be signed in to change notification settings - Fork 119
/
AccessibleHyperlinkListener.java
90 lines (85 loc) · 3.38 KB
/
AccessibleHyperlinkListener.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*******************************************************************************
* Copyright (c) 2009, 2010 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.accessibility;
import java.util.*;
/**
* Classes which implement this interface provide methods
* that handle AccessibleHyperlink events.
* <p>
* After creating an instance of a class that implements
* this interface it can be added to an accessible using the
* <code>addAccessibleHyperlinkListener</code> method and removed using
* the <code>removeAccessibleHyperlinkListener</code> method.
* </p>
*
* @see AccessibleHyperlinkAdapter
* @see AccessibleHyperlinkEvent
*
* @since 3.6
*/
public interface AccessibleHyperlinkListener extends EventListener {
/**
* Returns the anchor for the link at the specified index.
*
* @param e an event object containing the following fields:<ul>
* <li>[in] index - a 0 based index identifying the anchor if this object
* has more than one link, as in the case of an image map</li>
* <li>[typical out] result - the returned anchor</li>
* <li>[optional out] accessible - the returned anchor.
* Note: The returned anchor can either be a string or an accessible.
* For example, for a text link this could be the substring of the containing string
* where the substring is overridden with link behavior, and for an image link this could be
* the accessible for the image.</li>
* </ul>
*/
public void getAnchor(AccessibleHyperlinkEvent e);
/**
* Returns the target of the link at the specified index.
*
* @param e an event object containing the following fields:<ul>
* <li>[in] index - a 0 based index identifying the anchor if this object
* has more than one link, as in the case of an image map</li>
* <li>[typical out] result - the returned target</li>
* <li>[optional out] accessible - the returned target.
* Note: The returned target can either be a string or an accessible.
* For example, this could be a string URI, or the accessible for the target
* object to be activated when the link is activated.</li>
* </ul>
*/
public void getAnchorTarget(AccessibleHyperlinkEvent e);
/**
* Returns the 0 based character offset at which the textual representation of the hyperlink starts.
* <p>
* The returned value is related to the AccessibleTextExtended interface of the object that
* owns this hyperlink.
* </p>
*
* @param e an event object containing the following fields:<ul>
* <li>[out] index</li>
* </ul>
*/
public void getStartIndex(AccessibleHyperlinkEvent e);
/**
* Returns the 0 based character offset at which the textual representation of the hyperlink ends.
* <p>
* The returned value is related to the AccessibleTextExtended interface of the object that
* owns this hyperlink. The character at the index is not part of the hypertext.
* </p>
*
* @param e an event object containing the following fields:<ul>
* <li>[out] index</li>
* </ul>
*/
public void getEndIndex(AccessibleHyperlinkEvent e);
}