1 package org.simantics.spreadsheet.solver;
3 import java.io.Serializable;
5 import org.simantics.structural.synchronization.utils.ComponentFactory;
6 import org.simantics.structural.synchronization.utils.MappingBase;
7 import org.simantics.structural.synchronization.utils.Solver;
8 import org.simantics.structural.synchronization.utils.StateUndoContextBase;
10 public class SpreadsheetMapping extends MappingBase<SheetLineComponent> implements Serializable {
12 private static final long serialVersionUID = -7556699663877911393L;
14 final SheetLineComponent configuration;
16 public SpreadsheetMapping(SheetLineComponent configuration) {
17 super(configuration, true);
18 this.configuration = configuration;
22 public SheetLineComponent getConfiguration() {
27 public StateUndoContextBase createUndoContext() {
28 return new StateUndoContextBase() {
31 public void saveState(Solver solver, int componentId, String uid) {
35 public boolean loadState(Solver solver, int componentId, String uid) {
42 public ComponentFactory<SheetLineComponent> createComponentFactory() {
43 return new ComponentFactory<SheetLineComponent>() {
46 public SheetLineComponent create(String uid) {
47 return new SheetLineComponent(uid);