01: package org.drools.decisiontable.parser;
02:
03: /*
04: * Copyright 2005 JBoss Inc
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: /**
20: * @author <a href="mailto:shaun.addison@gmail.com"> Shaun Addison </a>
21: *
22: * Callback interface for scanning an spreadsheet.
23: */
24: public interface SheetListener {
25:
26: public static final int NON_MERGED = -1;
27:
28: /**
29: * Start a new sheet
30: *
31: * @param name
32: * the sheet name
33: */
34: public void startSheet(String name);
35:
36: /**
37: * Come to the end of the sheet.
38: */
39: public void finishSheet();
40:
41: /**
42: * Enter a new row.
43: *
44: *
45: * @param rowNumber
46: *
47: * @param columns
48: *
49: */
50: public void newRow(int rowNumber, int columns);
51:
52: /**
53: * Enter a new cell.
54: * Do NOT call this event for trailling cells at the end of the line.
55: * It will just confuse the parser. If all the trailing cells are empty, just
56: * stop raising events.
57: *
58: *
59: * @param row
60: * the row number
61: * @param column
62: * the column alpha character label
63: * @param value
64: * the string value of the cell
65: * @param mergedCol
66: * the "source" column if it is merged. -1 otherwise.
67: */
68: public void newCell(int row, int column, String value,
69: int mergedColStart);
70:
71: }
|