KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jxl > biff > formula > Operand


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.biff.formula;
21
22 import jxl.Sheet;
23 /**
24  * An operand in the parse tree. Operands represent leaf nodes in the
25  * tree, and may not have children
26  * Operands include numerical values, cell references and ranges
27  */

28 abstract class Operand extends ParseItem
29 {
30   /**
31    * Constructor
32    */

33   public Operand()
34   {
35   }
36
37   /**
38    * Default behaviour is to do nothing
39    *
40    * @param colAdjust the amount to add on to each relative cell reference
41    * @param rowAdjust the amount to add on to each relative row reference
42    */

43   public void adjustRelativeCellReferences(int colAdjust, int rowAdjust)
44   {
45   }
46
47   /**
48    * Default behaviour is to do nothing
49    *
50    * @param sheetIndex the sheet on which the column was inserted
51    * @param col the column number which was inserted
52    * @param currentSheet TRUE if this formula is on the sheet in which the
53    * column was inserted, FALSE otherwise
54    */

55   void columnInserted(int sheetIndex, int col, boolean currentSheet)
56   {
57   }
58
59   /**
60    * Called when a column is inserted on the specified sheet. Tells
61    * the formula parser to update all of its cell references beyond this
62    * column
63    *
64    * @param sheetIndex the sheet on which the column was removed
65    * @param col the column number which was removed
66    * @param currentSheet TRUE if this formula is on the sheet in which the
67    * column was inserted, FALSE otherwise
68    */

69   void columnRemoved(int sheetIndex, int col, boolean currentSheet)
70   {
71   }
72
73   /**
74    * Called when a column is inserted on the specified sheet. Tells
75    * the formula parser to update all of its cell references beyond this
76    * column
77    *
78    * @param sheetIndex the sheet on which the row was inserted
79    * @param row the row number which was inserted
80    * @param currentSheet TRUE if this formula is on the sheet in which the
81    * column was inserted, FALSE otherwise
82    */

83   void rowInserted(int sheetIndex, int row, boolean currentSheet)
84   {
85   }
86
87   /**
88    * Called when a column is inserted on the specified sheet. Tells
89    * the formula parser to update all of its cell references beyond this
90    * column
91    *
92    * @param sheetIndex the sheet on which the row was removed
93    * @param row the row number which was removed
94    * @param currentSheet TRUE if this formula is on the sheet in which the
95    * column was inserted, FALSE otherwise
96    */

97   void rowRemoved(int sheetIndex, int row, boolean currentSheet)
98   {
99   }
100 }
101
102
103
104
105
106
107
108
109
110
111
Popular Tags