Source Code Cross Referenced for UserAgent.java in  » Graphic-Library » batik » org » apache » batik » bridge » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » batik » org.apache.batik.bridge 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Licensed to the Apache Software Foundation (ASF) under one or more
004:           contributor license agreements.  See the NOTICE file distributed with
005:           this work for additional information regarding copyright ownership.
006:           The ASF licenses this file to You under the Apache License, Version 2.0
007:           (the "License"); you may not use this file except in compliance with
008:           the License.  You may obtain a copy of the License at
009:
010:               http://www.apache.org/licenses/LICENSE-2.0
011:
012:           Unless required by applicable law or agreed to in writing, software
013:           distributed under the License is distributed on an "AS IS" BASIS,
014:           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:           See the License for the specific language governing permissions and
016:           limitations under the License.
017:
018:         */
019:        package org.apache.batik.bridge;
020:
021:        import java.awt.Cursor;
022:        import java.awt.Point;
023:        import java.awt.geom.AffineTransform;
024:        import java.awt.geom.Dimension2D;
025:
026:        import org.apache.batik.gvt.event.EventDispatcher;
027:        import org.apache.batik.gvt.text.Mark;
028:        import org.apache.batik.util.ParsedURL;
029:        import org.w3c.dom.Element;
030:        import org.w3c.dom.svg.SVGAElement;
031:        import org.w3c.dom.svg.SVGDocument;
032:
033:        /**
034:         * An interface that provides access to the User Agent informations
035:         * needed by the bridge.
036:         *
037:         * @author <a href="mailto:cjolif@ilog.fr">Christophe Jolif</a>
038:         * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
039:         * @version $Id: UserAgent.java 475477 2006-11-15 22:44:28Z cam $
040:         */
041:        public interface UserAgent {
042:
043:            // <!> FIXME: TO BE REMOVED
044:            /**
045:             * Returns the event dispatcher to use.
046:             */
047:            EventDispatcher getEventDispatcher();
048:
049:            /**
050:             * Returns the default size of the viewport.
051:             */
052:            Dimension2D getViewportSize();
053:
054:            /**
055:             * Displays an error resulting from the specified Exception.
056:             */
057:            void displayError(Exception ex);
058:
059:            /**
060:             * Displays a message in the User Agent interface.
061:             */
062:            void displayMessage(String message);
063:
064:            /**
065:             * Shows an alert dialog box.
066:             */
067:            void showAlert(String message);
068:
069:            /**
070:             * Shows a prompt dialog box.
071:             */
072:            String showPrompt(String message);
073:
074:            /**
075:             * Shows a prompt dialog box.
076:             */
077:            String showPrompt(String message, String defaultValue);
078:
079:            /**
080:             * Shows a confirm dialog box.
081:             */
082:            boolean showConfirm(String message);
083:
084:            /**
085:             * Returns the size of a px CSS unit in millimeters.
086:             */
087:            float getPixelUnitToMillimeter();
088:
089:            /**
090:             * Returns the size of a px CSS unit in millimeters.
091:             * This will be removed after next release.
092:             * @see #getPixelUnitToMillimeter()
093:             */
094:            float getPixelToMM();
095:
096:            /** 
097:             * Returns the  medium font size. 
098:             */
099:            float getMediumFontSize();
100:
101:            /**
102:             * Returns a lighter font-weight.
103:             */
104:            float getLighterFontWeight(float f);
105:
106:            /**
107:             * Returns a bolder font-weight.
108:             */
109:            float getBolderFontWeight(float f);
110:
111:            /**
112:             * Returns the default font family.
113:             */
114:            String getDefaultFontFamily();
115:
116:            /**
117:             * Returns the language settings.
118:             */
119:            String getLanguages();
120:
121:            /**
122:             * Returns the user stylesheet uri.
123:             * @return null if no user style sheet was specified.
124:             */
125:            String getUserStyleSheetURI();
126:
127:            /**
128:             * Opens a link.
129:             * @param elt The activated link element.
130:             */
131:            void openLink(SVGAElement elt);
132:
133:            /**
134:             * Informs the user agent to change the cursor.
135:             * @param cursor the new cursor
136:             */
137:            void setSVGCursor(Cursor cursor);
138:
139:            /**
140:             * Informs the user agent that the text selection has changed.
141:             * @param start The Mark for the start of the selection.
142:             * @param end   The Mark for the end of the selection.
143:             */
144:            void setTextSelection(Mark start, Mark end);
145:
146:            /**
147:             * Informs the user agent that the text selection should be cleared.
148:             */
149:            void deselectAll();
150:
151:            /**
152:             * Returns the class name of the XML parser.
153:             */
154:            String getXMLParserClassName();
155:
156:            /**
157:             * Returns true if the XML parser must be in validation mode, false
158:             * otherwise.
159:             */
160:            boolean isXMLParserValidating();
161:
162:            /**
163:             * Returns the <code>AffineTransform</code> currently
164:             * applied to the drawing by the UserAgent.
165:             */
166:            AffineTransform getTransform();
167:
168:            /**
169:             * Sets the <code>AffineTransform</code> currently
170:             * applied to the drawing by the UserAgent.
171:             */
172:            void setTransform(AffineTransform at);
173:
174:            /**
175:             * Returns this user agent's CSS media.
176:             */
177:            String getMedia();
178:
179:            /**
180:             * Returns this user agent's alternate style-sheet title.
181:             */
182:            String getAlternateStyleSheet();
183:
184:            /**
185:             * Returns the location on the screen of the
186:             * client area in the UserAgent.
187:             */
188:            Point getClientAreaLocationOnScreen();
189:
190:            /**
191:             * Tells whether the given feature is supported by this
192:             * user agent.
193:             */
194:            boolean hasFeature(String s);
195:
196:            /**
197:             * Tells whether the given extension is supported by this
198:             * user agent.
199:             */
200:            boolean supportExtension(String s);
201:
202:            /**
203:             * Lets the bridge tell the user agent that the following
204:             * extension is supported by the bridge.
205:             */
206:            void registerExtension(BridgeExtension ext);
207:
208:            /**
209:             * Notifies the UserAgent that the input element 
210:             * has been found in the document. This is sometimes
211:             * called, for example, to handle &lt;a&gt; or
212:             * &lt;title&gt; elements in a UserAgent-dependant
213:             * way.
214:             */
215:            void handleElement(Element elt, Object data);
216:
217:            /**
218:             * Returns the security settings for the given script
219:             * type, script url and document url
220:             * 
221:             * @param scriptType type of script, as found in the 
222:             *        type attribute of the &lt;script&gt; element.
223:             * @param scriptURL url for the script, as defined in
224:             *        the script's xlink:href attribute. If that
225:             *        attribute was empty, then this parameter should
226:             *        be null
227:             * @param docURL url for the document into which the 
228:             *        script was found.
229:             */
230:            ScriptSecurity getScriptSecurity(String scriptType,
231:                    ParsedURL scriptURL, ParsedURL docURL);
232:
233:            /**
234:             * This method throws a SecurityException if the script
235:             * of given type, found at url and referenced from docURL
236:             * should not be loaded.
237:             * 
238:             * This is a convenience method to call checkLoadScript
239:             * on the ScriptSecurity strategy returned by 
240:             * getScriptSecurity.
241:             *
242:             * @param scriptType type of script, as found in the 
243:             *        type attribute of the &lt;script&gt; element.
244:             * @param scriptURL url for the script, as defined in
245:             *        the script's xlink:href attribute. If that
246:             *        attribute was empty, then this parameter should
247:             *        be null
248:             * @param docURL url for the document into which the 
249:             *        script was found.
250:             */
251:            void checkLoadScript(String scriptType, ParsedURL scriptURL,
252:                    ParsedURL docURL) throws SecurityException;
253:
254:            /**
255:             * Returns the security settings for the given resource
256:             * url and document url
257:             * 
258:             * @param resourceURL url for the resource, as defined in
259:             *        the resource's xlink:href attribute. If that
260:             *        attribute was empty, then this parameter should
261:             *        be null
262:             * @param docURL url for the document into which the 
263:             *        resource was found.
264:             */
265:            ExternalResourceSecurity getExternalResourceSecurity(
266:                    ParsedURL resourceURL, ParsedURL docURL);
267:
268:            /**
269:             * This method throws a SecurityException if the resource
270:             * found at url and referenced from docURL
271:             * should not be loaded.
272:             * 
273:             * This is a convenience method to call checkLoadExternalResource
274:             * on the ExternalResourceSecurity strategy returned by 
275:             * getExternalResourceSecurity.
276:             *
277:             * @param resourceURL url for the resource, as defined in
278:             *        the resource's xlink:href attribute. If that
279:             *        attribute was empty, then this parameter should
280:             *        be null
281:             * @param docURL url for the document into which the 
282:             *        resource was found.
283:             */
284:            void checkLoadExternalResource(ParsedURL resourceURL,
285:                    ParsedURL docURL) throws SecurityException;
286:
287:            /**
288:             * This method should return an image to be displayed when an image
289:             * can't be loaded.  If it returns 'null' then a BridgeException will
290:             * be thrown.
291:             *
292:             * @param e   The &lt;image> element that can't be loaded.
293:             * @param url The resolved url that can't be loaded.
294:             * @param message As best as can be determined the reason it can't be
295:             *                loaded (not available, corrupt, unknown format, ...).
296:             */
297:            SVGDocument getBrokenLinkDocument(Element e, String url,
298:                    String message);
299:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.