01: /*
02: * Copyright (c) 2005 Einar Pehrson <einar@pehrson.nu>.
03: *
04: * This file is part of
05: * CleanSheets - a spreadsheet application for the Java platform.
06: *
07: * CleanSheets is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU General Public License as published by
09: * the Free Software Foundation; either version 2 of the License, or
10: * (at your option) any later version.
11: *
12: * CleanSheets is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with CleanSheets; if not, write to the Free Software
19: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: */
21: package csheets.core;
22:
23: import java.util.EventListener;
24:
25: /**
26: * A listener interface for receiving notification on events occurring in a
27: * cell.
28: * @author Einar Pehrson
29: */
30: public interface CellListener extends EventListener {
31:
32: /**
33: * Invoked when the value of a cell has changed, either by a change in
34: * its content, or by a change of value in one of its precedents.
35: * @param cell the cell that was modified
36: */
37: public void valueChanged(Cell cell);
38:
39: /**
40: * Invoked when the content of a cell has been changed.
41: * As a consequence, the cell's formula and its precedents may have changed.
42: * @param cell the cell that was modified
43: */
44: public void contentChanged(Cell cell);
45:
46: /**
47: * Invoked when a new dependent has been registered on a cell,
48: * or when an old one has been removed.
49: * @param cell the cell that was modified
50: */
51: public void dependentsChanged(Cell cell);
52:
53: /**
54: * Invoked when a cell has been cleared.
55: * @param cell the cell that was modified
56: */
57: public void cellCleared(Cell cell);
58:
59: /**
60: * Invoked when a cell has been copied.
61: * @param cell the cell that was modified
62: * @param source the cell from which data was copied
63: */
64: public void cellCopied(Cell cell, Cell source);
65: }
|