01: /*
02:
03: Licensed to the Apache Software Foundation (ASF) under one or more
04: contributor license agreements. See the NOTICE file distributed with
05: this work for additional information regarding copyright ownership.
06: The ASF licenses this file to You under the Apache License, Version 2.0
07: (the "License"); you may not use this file except in compliance with
08: the License. You may obtain a copy of the License at
09:
10: http://www.apache.org/licenses/LICENSE-2.0
11:
12: Unless required by applicable law or agreed to in writing, software
13: distributed under the License is distributed on an "AS IS" BASIS,
14: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: See the License for the specific language governing permissions and
16: limitations under the License.
17:
18: */
19: package org.apache.batik.parser;
20:
21: /**
22: * This interface must be implemented and then registred as the
23: * handler of a <code>PreserveAspectRatioParser</code> instance
24: * in order to be notified of parsing events.
25: *
26: * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
27: * @version $Id: FragmentIdentifierHandler.java 475477 2006-11-15 22:44:28Z cam $
28: */
29: public interface FragmentIdentifierHandler extends
30: PreserveAspectRatioHandler, 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 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 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: }
|