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.parser;
020:
021: /**
022: * This interface must be implemented and then registred as the
023: * handler of a <code>LengthParser</code> instance in order to be
024: * notified of parsing events.
025: *
026: * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
027: * @version $Id: LengthHandler.java 475477 2006-11-15 22:44:28Z cam $
028: */
029: public interface LengthHandler {
030: /**
031: * Invoked when the length attribute starts.
032: * @exception ParseException if an error occures while processing
033: * the length
034: */
035: void startLength() throws ParseException;
036:
037: /**
038: * Invoked when a float value has been parsed.
039: * @exception ParseException if an error occures while processing
040: * the length
041: */
042: void lengthValue(float v) throws ParseException;
043:
044: /**
045: * Invoked when 'em' has been parsed.
046: * @exception ParseException if an error occures while processing
047: * the length
048: */
049: void em() throws ParseException;
050:
051: /**
052: * Invoked when 'ex' has been parsed.
053: * @exception ParseException if an error occures while processing
054: * the length
055: */
056: void ex() throws ParseException;
057:
058: /**
059: * Invoked when 'in' has been parsed.
060: * @exception ParseException if an error occures while processing
061: * the length
062: */
063: void in() throws ParseException;
064:
065: /**
066: * Invoked when 'cm' has been parsed.
067: * @exception ParseException if an error occures while processing
068: * the length
069: */
070: void cm() throws ParseException;
071:
072: /**
073: * Invoked when 'mm' has been parsed.
074: * @exception ParseException if an error occures while processing
075: * the length
076: */
077: void mm() throws ParseException;
078:
079: /**
080: * Invoked when 'pc' has been parsed.
081: * @exception ParseException if an error occures while processing
082: * the length
083: */
084: void pc() throws ParseException;
085:
086: /**
087: * Invoked when 'pt' has been parsed.
088: * @exception ParseException if an error occures while processing
089: * the length
090: */
091: void pt() throws ParseException;
092:
093: /**
094: * Invoked when 'px' has been parsed.
095: * @exception ParseException if an error occures while processing
096: * the length
097: */
098: void px() throws ParseException;
099:
100: /**
101: * Invoked when '%' has been parsed.
102: * @exception ParseException if an error occures while processing
103: * the length
104: */
105: void percentage() throws ParseException;
106:
107: /**
108: * Invoked when the length attribute ends.
109: * @exception ParseException if an error occures while processing
110: * the length
111: */
112: void endLength() throws ParseException;
113: }
|