KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jxl > write > biff > BlankRecord


1 /*********************************************************************
2 *
3 * Copyright (C) 2001 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.biff;
21
22 import common.Logger;
23
24 import jxl.CellType;
25 import jxl.Cell;
26 import jxl.format.CellFormat;
27 import jxl.biff.Type;
28 import jxl.biff.StringHelper;
29 import jxl.biff.IntegerHelper;
30 import jxl.biff.FormattingRecords;
31 import jxl.biff.CellReferenceHelper;
32
33 /**
34  * A blank record, which is used to contain formatting information
35  */

36 public abstract class BlankRecord extends CellValue
37 {
38   /**
39    * The logger
40    */

41   private static Logger logger = Logger.getLogger(BlankRecord.class);
42
43   /**
44    * Consructor used when creating a label from the user API
45    *
46    * @param c the column
47    * @param cont the contents
48    * @param r the row
49    */

50   protected BlankRecord(int c, int r)
51   {
52     super(Type.BLANK, c, r);
53   }
54
55   /**
56    * Constructor used when creating a label from the API. This is
57    * overloaded to allow formatting information to be passed to the record
58    *
59    * @param c the column
60    * @param r the row
61    * @param st the format applied to the cell
62    */

63   protected BlankRecord(int c, int r, CellFormat st)
64   {
65      super(Type.BLANK, c, r, st);
66   }
67
68   /**
69    * Constructor used when copying a formatted blank cell from a read only
70    * spreadsheet
71    *
72    * @param c the blank cell to copy
73    */

74   protected BlankRecord(Cell c)
75   {
76     super(Type.BLANK, c);
77   }
78
79   /**
80    * Copy constructor
81    *
82    * @param c the column
83    * @param r the row
84    * @param b the record to copy
85    */

86   protected BlankRecord(int c, int r, BlankRecord br)
87   {
88     super(Type.BLANK, c, r, br);
89   }
90
91   /**
92    * Returns the content type of this cell
93    *
94    * @return the content type for this cell
95    */

96   public CellType getType()
97   {
98     return CellType.EMPTY;
99   }
100
101   /**
102    * Quick and dirty function to return the contents of this cell as a string.
103    *
104    * @return the contents of this cell as a string
105    */

106   public String JavaDoc getContents()
107   {
108     return "";
109   }
110 }
111
112
113
114
Popular Tags