KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lowagie > text > pdf > hyphenation > PatternConsumer


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

16
17 package com.lowagie.text.pdf.hyphenation;
18
19 import java.util.ArrayList JavaDoc;
20
21 /**
22  * This interface is used to connect the XML pattern file parser to
23  * the hyphenation tree.
24  *
25  * @author Carlos Villegas <cav@uniscope.co.jp>
26  */

27 public interface PatternConsumer {
28
29     /**
30      * Add a character class.
31      * A character class defines characters that are considered
32      * equivalent for the purpose of hyphenation (e.g. "aA"). It
33      * usually means to ignore case.
34      * @param chargroup character group
35      */

36     void addClass(String JavaDoc chargroup);
37
38     /**
39      * Add a hyphenation exception. An exception replaces the
40      * result obtained by the algorithm for cases for which this
41      * fails or the user wants to provide his own hyphenation.
42      * A hyphenatedword is a vector of alternating String's and
43      * {@link Hyphen Hyphen} instances
44      */

45     void addException(String JavaDoc word, ArrayList JavaDoc hyphenatedword);
46
47     /**
48      * Add hyphenation patterns.
49      * @param pattern the pattern
50      * @param values interletter values expressed as a string of
51      * digit characters.
52      */

53     void addPattern(String JavaDoc pattern, String JavaDoc values);
54
55 }
56
Popular Tags