KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jxl > write > Font


1 /*********************************************************************
2 *
3 * Copyright (C) 2002 Andrew Khan
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ***************************************************************************/

19
20 package jxl.write;
21
22 import jxl.format.Colour;
23 import jxl.format.UnderlineStyle;
24 import jxl.format.ScriptStyle;
25
26 /**
27  * A class which is instantiated when the user application wishes to specify
28  * the font for a particular cell
29  *
30  * @deprecated Renamed to writable font
31  */

32 public class Font extends WritableFont
33 {
34   /**
35    * Objects created with this font name will be rendered within Excel as ARIAL
36    * fonts
37    * @deprecated
38    */

39   public static final FontName ARIAL = WritableFont.ARIAL;
40   /**
41    * Objects created with this font name will be rendered within Excel as TIMES
42    * fonts
43    * @deprecated
44    */

45   public static final FontName TIMES = WritableFont.TIMES;
46
47   // The bold styles
48

49   /**
50    * Indicates that this font should not be presented as bold
51    * @deprecated
52    */

53   public static final BoldStyle NO_BOLD = WritableFont.NO_BOLD;
54   /**
55    * Indicates that this font should be presented in a BOLD style
56    * @deprecated
57    */

58   public static final BoldStyle BOLD = WritableFont.BOLD;
59
60   // The underline styles
61
/**
62    * @deprecated
63    */

64   public static final UnderlineStyle NO_UNDERLINE =
65     UnderlineStyle.NO_UNDERLINE;
66
67   /**
68    * @deprecated
69    */

70   public static final UnderlineStyle SINGLE = UnderlineStyle.SINGLE;
71
72   /**
73    * @deprecated
74    */

75   public static final UnderlineStyle DOUBLE = UnderlineStyle.DOUBLE;
76
77   /**
78    * @deprecated
79    */

80   public static final UnderlineStyle SINGLE_ACCOUNTING =
81     UnderlineStyle.SINGLE_ACCOUNTING;
82
83   /**
84    * @deprecated
85    */

86   public static final UnderlineStyle DOUBLE_ACCOUNTING =
87     UnderlineStyle.DOUBLE_ACCOUNTING;
88
89   // The script styles
90
public static final ScriptStyle NORMAL_SCRIPT = ScriptStyle.NORMAL_SCRIPT;
91   public static final ScriptStyle SUPERSCRIPT = ScriptStyle.SUPERSCRIPT;
92   public static final ScriptStyle SUBSCRIPT = ScriptStyle.SUBSCRIPT;
93
94   /**
95    * Creates a default font, vanilla font of the specified face and with
96    * default point size.
97    *
98    * @param fn the font name
99    * @deprecated Use jxl.write.WritableFont
100    */

101   public Font(FontName fn)
102   {
103     super(fn);
104   }
105
106   /**
107    * Constructs of font of the specified face and of size given by the
108    * specified point size
109    *
110    * @param ps the point size
111    * @param fn the font name
112    * @deprecated use jxl.write.WritableFont
113    */

114   public Font(FontName fn, int ps)
115   {
116     super(fn, ps);
117   }
118
119   /**
120    * Creates a font of the specified face, point size and bold style
121    *
122    * @param ps the point size
123    * @param bs the bold style
124    * @param fn the font name
125    * @deprecated use jxl.write.WritableFont
126    */

127   public Font(FontName fn, int ps, BoldStyle bs)
128   {
129     super(fn, ps, bs);
130   }
131
132   /**
133    * Creates a font of the specified face, point size, bold weight and
134    * italicised option.
135    *
136    * @param ps the point size
137    * @param bs the bold style
138    * @param italic italic flag
139    * @param fn the font name
140    * @deprecated use jxl.write.WritableFont
141    */

142   public Font(FontName fn, int ps, BoldStyle bs, boolean italic)
143   {
144     super(fn, ps, bs, italic);
145   }
146
147   /**
148    * Creates a font of the specified face, point size, bold weight,
149    * italicisation and underline style
150    *
151    * @param ps the point size
152    * @param bs the bold style
153    * @param us underscore flag
154    * @param fn font name
155    * @param it italic flag
156    * @deprecated use jxl.write.WritableFont
157    */

158   public Font(FontName fn,
159               int ps,
160               BoldStyle bs,
161               boolean it,
162               UnderlineStyle us)
163   {
164     super(fn, ps, bs, it, us);
165   }
166
167
168   /**
169    * Creates a font of the specified face, point size, bold style,
170    * italicisation, underline style and colour
171    *
172    * @param ps the point size
173    * @param bs the bold style
174    * @param us the underline style
175    * @param fn the font name
176    * @param it italic flag
177    * @param c the colour
178    * @deprecated use jxl.write.WritableFont
179    */

180   public Font(FontName fn,
181               int ps,
182               BoldStyle bs,
183               boolean it,
184               UnderlineStyle us,
185               Colour c)
186   {
187     super(fn, ps, bs, it, us, c);
188   }
189
190
191   /**
192    * Creates a font of the specified face, point size, bold style,
193    * italicisation, underline style, colour, and script
194    * style (superscript/subscript)
195    *
196    * @param ps the point size
197    * @param bs the bold style
198    * @param us the underline style
199    * @param fn the font name
200    * @param it the italic flag
201    * @param c the colour
202    * @param ss the script style
203    * @deprecated use jxl.write.WritableFont
204    */

205   public Font(FontName fn,
206               int ps,
207               BoldStyle bs,
208               boolean it,
209               UnderlineStyle us,
210               Colour c,
211               ScriptStyle ss)
212   {
213     super(fn, ps, bs, it, us, c, ss);
214   }
215 }
216
217
Popular Tags