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