KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > svggen > font > table > TableFactory


1 /*
2
3    Copyright 1999-2003 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  
19 package org.apache.batik.svggen.font.table;
20
21 import java.io.IOException JavaDoc;
22 import java.io.RandomAccessFile JavaDoc;
23
24 /**
25  *
26  * @version $Id: TableFactory.java,v 1.3 2004/10/30 18:38:06 deweese Exp $
27  * @author <a HREF="mailto:david@steadystate.co.uk">David Schweinsberg</a>
28  */

29 public class TableFactory {
30
31     public static Table create(DirectoryEntry de, RandomAccessFile JavaDoc raf) throws IOException JavaDoc {
32         Table t = null;
33         switch (de.getTag()) {
34         case Table.BASE:
35             break;
36         case Table.CFF:
37             break;
38         case Table.DSIG:
39             break;
40         case Table.EBDT:
41             break;
42         case Table.EBLC:
43             break;
44         case Table.EBSC:
45             break;
46         case Table.GDEF:
47             break;
48         case Table.GPOS:
49             t = new GposTable(de, raf);
50             break;
51         case Table.GSUB:
52             t = new GsubTable(de, raf);
53             break;
54         case Table.JSTF:
55             break;
56         case Table.LTSH:
57             break;
58         case Table.MMFX:
59             break;
60         case Table.MMSD:
61             break;
62         case Table.OS_2:
63             t = new Os2Table(de, raf);
64             break;
65         case Table.PCLT:
66             break;
67         case Table.VDMX:
68             break;
69         case Table.cmap:
70             t = new CmapTable(de, raf);
71             break;
72         case Table.cvt:
73             t = new CvtTable(de, raf);
74             break;
75         case Table.fpgm:
76             t = new FpgmTable(de, raf);
77             break;
78         case Table.fvar:
79             break;
80         case Table.gasp:
81             break;
82         case Table.glyf:
83             t = new GlyfTable(de, raf);
84             break;
85         case Table.hdmx:
86             break;
87         case Table.head:
88             t = new HeadTable(de, raf);
89             break;
90         case Table.hhea:
91             t = new HheaTable(de, raf);
92             break;
93         case Table.hmtx:
94             t = new HmtxTable(de, raf);
95             break;
96         case Table.kern:
97             t = new KernTable(de, raf);
98             break;
99         case Table.loca:
100             t = new LocaTable(de, raf);
101             break;
102         case Table.maxp:
103             t = new MaxpTable(de, raf);
104             break;
105         case Table.name:
106             t = new NameTable(de, raf);
107             break;
108         case Table.prep:
109             t = new PrepTable(de, raf);
110             break;
111         case Table.post:
112             t = new PostTable(de, raf);
113             break;
114         case Table.vhea:
115             break;
116         case Table.vmtx:
117             break;
118         }
119         return t;
120     }
121 }
122
Popular Tags