KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > parser > FragmentIdentifierHandler


1 /*
2
3    Copyright 2000-2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.parser;
19
20 /**
21  * This interface must be implemented and then registred as the
22  * handler of a <code>PreserveAspectRatioParser</code> instance
23  * in order to be notified of parsing events.
24  *
25  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
26  * @version $Id: FragmentIdentifierHandler.java,v 1.6 2005/03/27 08:58:35 cam Exp $
27  */

28 public interface FragmentIdentifierHandler
29     extends PreserveAspectRatioHandler,
30             TransformListHandler {
31
32     /**
33      * Invoked when the fragment identifier starts.
34      * @exception ParseException if an error occured while processing the
35      * fragment identifier
36      */

37     void startFragmentIdentifier() throws ParseException;
38
39     /**
40      * Invoked when an ID has been parsed.
41      * @param s The string that represents the parsed ID.
42      * @exception ParseException if an error occured while processing the
43      * fragment identifier
44      */

45     void idReference(String JavaDoc s) throws ParseException;
46
47     /**
48      * Invoked when 'viewBox(x,y,width,height)' has been parsed.
49      * @param x x coordinate of the viewbox
50      * @param y y coordinate of the viewbox
51      * @param width width of the viewbox
52      * @param height height of the viewbox
53      * @exception ParseException if an error occured while processing the
54      * fragment identifier
55      */

56     void viewBox(float x, float y, float width, float height)
57         throws ParseException;
58
59     /**
60      * Invoked when a view target specification starts.
61      * @exception ParseException if an error occured while processing the
62      * fragment identifier
63      */

64     void startViewTarget() throws ParseException;
65
66     /**
67      * Invoked when a identifier has been parsed within a view target
68      * specification.
69      * @param name the target name.
70      * @exception ParseException if an error occured while processing the
71      * fragment identifier
72      */

73     void viewTarget(String JavaDoc name) throws ParseException;
74
75     /**
76      * Invoked when a view target specification ends.
77      * @exception ParseException if an error occured while processing the
78      * fragment identifier
79      */

80     void endViewTarget() throws ParseException;
81
82     /**
83      * Invoked when a 'zoomAndPan' specification has been parsed.
84      * @param magnify true if 'magnify' has been parsed.
85      * @exception ParseException if an error occured while processing the
86      * fragment identifier
87      */

88     void zoomAndPan(boolean magnify);
89
90     /**
91      * Invoked when the fragment identifier ends.
92      * @exception ParseException if an error occured while processing the
93      * fragment identifier
94      */

95     void endFragmentIdentifier() throws ParseException;
96 }
97
Popular Tags