KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > gvt > font > UnresolvedFontFamily


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.gvt.font;
20
21 import java.text.AttributedCharacterIterator JavaDoc;
22 import java.util.Map JavaDoc;
23
24 /**
25  * A font family class for unresolved fonts.
26  *
27  * @author <a HREF="mailto:bella.robinson@cmis.csiro.au">Bella Robinson</a>
28  * @version $Id: UnresolvedFontFamily.java,v 1.7 2005/03/27 08:58:34 cam Exp $
29  */

30 public class UnresolvedFontFamily implements GVTFontFamily {
31
32     protected GVTFontFace fontFace;
33
34     /**
35      * Constructs an UnresolvedFontFamily with the specified familyName.
36      *
37      * @param fontFace The name of the font family.
38      */

39     public UnresolvedFontFamily(GVTFontFace fontFace) {
40         this.fontFace = fontFace;
41     }
42
43     /**
44      * Constructs an UnresolvedFontFamily with the specified familyName.
45      *
46      * @param familyName The name of the font family.
47      */

48     public UnresolvedFontFamily(String JavaDoc familyName) {
49         this(new GVTFontFace(familyName));
50     }
51
52     /**
53      * Returns the font-face information for this font family.
54      */

55     public GVTFontFace getFontFace() {
56         return fontFace;
57     }
58
59     /**
60      * Returns the font family name.
61      *
62      * @return the family name.
63      */

64     public String JavaDoc getFamilyName() {
65         return fontFace.getFamilyName();
66     }
67
68     /**
69      * Derives a GVTFont object of the correct size. As this font family is yet
70      * to be resolved this will always return null.
71      *
72      * @param size The required size of the derived font.
73      * @param aci The character iterator that will be rendered using the derived
74      * font.
75      */

76     public GVTFont deriveFont(float size, AttributedCharacterIterator JavaDoc aci) {
77        return null;
78     }
79
80
81     /**
82      * Derives a GVTFont object of the correct size from an attribute Map.
83      * @param size The required size of the derived font.
84      * @param attrs The Attribute Map to get Values from.
85      */

86     public GVTFont deriveFont(float size, Map JavaDoc attrs) { return null; }
87      
88 }
89
Popular Tags