1 /*******************************************************************************
2 * Copyright (c) 2009, 2016 IBM Corporation and others.
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.swt.accessibility;
17 * This adapter class provides default implementations for the
18 * methods in the <code>AccessibleHyperlinkListener</code> interface.
20 * Classes that wish to deal with <code>AccessibleHyperlink</code> events can
21 * extend this class and override only the methods that they are
25 * @see AccessibleHyperlinkListener
26 * @see AccessibleHyperlinkEvent
30 public class AccessibleHyperlinkAdapter implements AccessibleHyperlinkListener {
32 * Returns the anchor for the link at the specified index.
34 * @param e an event object containing the following fields:<ul>
35 * <li>[in] index - a 0 based index identifying the anchor if this object
36 * has more than one link, as in the case of an image map</li>
37 * <li>[typical out] result - the returned anchor</li>
38 * <li>[optional out] accessible - the returned anchor.
39 * Note: The returned anchor can either be a string or an accessible.
40 * For example, for a text link this could be the substring of the containing string
41 * where the substring is overridden with link behavior, and for an image link this could be
42 * the accessible for the image.</li>
46 public void getAnchor(AccessibleHyperlinkEvent e) {}
49 * Returns the target of the link at the specified index.
51 * @param e an event object containing the following fields:<ul>
52 * <li>[in] index - a 0 based index identifying the anchor if this object
53 * has more than one link, as in the case of an image map</li>
54 * <li>[typical out] result - the returned target</li>
55 * <li>[optional out] accessible - the returned target.
56 * Note: The returned target can either be a string or an accessible.
57 * For example, this could be a string URI, or the accessible for the target
58 * object to be activated when the link is activated.</li>
62 public void getAnchorTarget(AccessibleHyperlinkEvent e) {}
65 * Returns the 0 based character offset at which the textual representation of the hyperlink starts.
67 * The returned value is related to the AccessibleTextExtended interface of the object that
68 * owns this hyperlink.
71 * @param e an event object containing the following fields:<ul>
72 * <li>[out] index</li>
76 public void getStartIndex(AccessibleHyperlinkEvent e) {}
79 * Returns the 0 based character offset at which the textual representation of the hyperlink ends.
81 * The returned value is related to the AccessibleTextExtended interface of the object that
82 * owns this hyperlink. The character at the index is not part of the hypertext.
85 * @param e an event object containing the following fields:<ul>
86 * <li>[out] index</li>
90 public void getEndIndex(AccessibleHyperlinkEvent e) {}