]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/InvalidateAll.java
ExternalRef corrections
[simantics/platform.git] / bundles / org.simantics.spreadsheet.graph / src / org / simantics / spreadsheet / graph / InvalidateAll.java
1 package org.simantics.spreadsheet.graph;
2
3 import org.simantics.spreadsheet.SpreadsheetVisitor;
4 import org.simantics.spreadsheet.solver.SpreadsheetBook;
5 import org.simantics.spreadsheet.solver.SpreadsheetCell;
6 import org.simantics.spreadsheet.solver.SpreadsheetEngine;
7 import org.simantics.spreadsheet.solver.SpreadsheetLine;
8 import org.simantics.spreadsheet.solver.SpreadsheetLines;
9
10 public class InvalidateAll implements SpreadsheetVisitor {
11         
12         public InvalidateAll() {
13         }
14
15         @Override
16         public void visit(SpreadsheetBook book) {
17                 for(SpreadsheetEngine engine : book.sheets) engine.accept(this);
18         }
19
20         @Override
21         public void visit(SpreadsheetEngine engine) {
22                 engine.lines.accept(this);
23         }
24
25         @Override
26         public void visit(SpreadsheetLines node) {
27                 for(SpreadsheetLines child : node.nodes.values()) child.accept(this);
28                 for(SpreadsheetLine line : node.lines.values()) line.accept(this);
29         }
30
31         @Override
32         public void visit(SpreadsheetLine line) {
33                 for(SpreadsheetCell cell : line.cells) cell.accept(this);
34         }
35
36         @Override
37         public void visit(SpreadsheetCell cell) {
38                 cell.invalidate();
39         }
40
41 }