1 package org.simantics.spreadsheet.graph;
3 import java.io.Serializable;
5 import org.simantics.spreadsheet.graph.synchronization.SheetLineComponent;
6 import org.simantics.structural.synchronization.utils.ComponentFactory;
7 import org.simantics.structural.synchronization.utils.MappingBase;
8 import org.simantics.structural.synchronization.utils.Solver;
9 import org.simantics.structural.synchronization.utils.StateUndoContextBase;
11 public class SpreadsheetMapping extends MappingBase<SheetLineComponent> implements Serializable {
13 private static final long serialVersionUID = -7556699663877911393L;
15 final SheetLineComponent configuration;
17 public SpreadsheetMapping(SheetLineComponent configuration) {
18 super(configuration, true);
19 this.configuration = configuration;
23 public SheetLineComponent getConfiguration() {
28 public StateUndoContextBase createUndoContext() {
29 return new StateUndoContextBase() {
32 public void saveState(Solver solver, int componentId, String uid) {
36 public boolean loadState(Solver solver, int componentId, String uid) {
43 public ComponentFactory<SheetLineComponent> createComponentFactory() {
44 return new ComponentFactory<SheetLineComponent>() {
47 public SheetLineComponent create(String uid) {
48 return new SheetLineComponent(uid);