Source Code Cross Referenced for AccessibleHyperlink.java in  » 6.0-JDK-Core » accessibility » javax » accessibility » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » accessibility » javax.accessibility 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 1998-2000 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025
026        package javax.accessibility;
027
028        import java.util.*;
029        import java.awt.*;
030        import javax.swing.text.*;
031
032        /**
033         * Encapsulation of a link, or set of links (e.g. client side imagemap)
034         * in a Hypertext document
035         *
036         * @see Accessible
037         * @see Accessible#getAccessibleContext
038         * @see AccessibleContext
039         * @see AccessibleText
040         * @see AccessibleContext#getAccessibleText
041         *
042         * @version 1.20, 05/05/07
043         * @author	Peter Korn
044         */
045        public abstract class AccessibleHyperlink implements  AccessibleAction {
046
047            /**
048             * Since the document a link is associated with may have
049             * changed, this method returns whether or not this Link is still valid
050             * (with respect to the document it references).
051             *
052             * @return a flag indicating whether this link is still valid with
053             *         respect to the AccessibleHypertext it belongs to
054             */
055            public abstract boolean isValid();
056
057            /**
058             * Returns the number of accessible actions available in this Link
059             * If there are more than one, the first one is NOT considered the
060             * "default" action of this LINK object (e.g. in an HTML imagemap).
061             * In general, links will have only one AccessibleAction in them.
062             *
063             * @return the zero-based number of Actions in this object
064             */
065            public abstract int getAccessibleActionCount();
066
067            /**
068             * Performs the specified Action on the object
069             *
070             * @param i zero-based index of actions
071             * @return true if the action was performed; otherwise false.
072             * @see #getAccessibleActionCount
073             */
074            public abstract boolean doAccessibleAction(int i);
075
076            /**
077             * Returns a String description of this particular
078             * link action.  This should be a text string
079             * associated with anchoring text, this should be the
080             * anchor text.  E.g. from HTML:
081             *   <a HREF="http://www.sun.com/access">Accessibility</a>
082             * this method would return "Accessibility".
083             *
084             * Similarly, from this HTML:
085             *   <a HREF="#top"><img src="top-hat.gif" alt="top hat"></a>
086             * this method would return "top hat"
087             *
088             * @param i zero-based index of the actions
089             * @return a String description of the action
090             * @see #getAccessibleActionCount
091             */
092            public abstract String getAccessibleActionDescription(int i);
093
094            /**
095             * Returns an object that represents the link action,
096             * as appropriate for that link.  E.g. from HTML:
097             *   <a HREF="http://www.sun.com/access">Accessibility</a>
098             * this method would return a
099             * java.net.URL("http://www.sun.com/access.html");
100             *
101             * @param i zero-based index of the actions
102             * @return an Object representing the hypertext link itself
103             * @see #getAccessibleActionCount
104             */
105            public abstract Object getAccessibleActionObject(int i);
106
107            /**
108             * Returns an object that represents the link anchor,
109             * as appropriate for that link.  E.g. from HTML:
110             *   <a href="http://www.sun.com/access">Accessibility</a>
111             * this method would return a String containing the text:
112             * "Accessibility".
113             *
114             * Similarly, from this HTML:
115             *   <a HREF="#top"><img src="top-hat.gif" alt="top hat"></a>
116             * this might return the object ImageIcon("top-hat.gif", "top hat");
117             *
118             * @param i zero-based index of the actions
119             * @return an Object representing the hypertext anchor
120             * @see #getAccessibleActionCount
121             */
122            public abstract Object getAccessibleActionAnchor(int i);
123
124            /**
125             * Gets the index with the hypertext document at which this
126             * link begins
127             *
128             * @return index of start of link
129             */
130            public abstract int getStartIndex();
131
132            /**
133             * Gets the index with the hypertext document at which this
134             * link ends
135             *
136             * @return index of end of link
137             */
138            public abstract int getEndIndex();
139        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.