X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.spreadsheet%2Fsrc%2Forg%2Fsimantics%2Fspreadsheet%2Fsolver%2FSpreadsheetCellEditable.java;fp=bundles%2Forg.simantics.spreadsheet.graph%2Fsrc%2Forg%2Fsimantics%2Fspreadsheet%2Fgraph%2FSpreadsheetCellEditable.java;h=246bd705b7a4cb0e585a992711f68a07e1603dd6;hp=81033f44cf15367b6da72ccc726267c0866126e5;hb=5c67a96d34fe904b8c4b0375cd08ff1d543bf369;hpb=9a37dabc6c0212ed3e14499c88df3208cd06f9b0 diff --git a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetCellEditable.java b/bundles/org.simantics.spreadsheet/src/org/simantics/spreadsheet/solver/SpreadsheetCellEditable.java similarity index 62% rename from bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetCellEditable.java rename to bundles/org.simantics.spreadsheet/src/org/simantics/spreadsheet/solver/SpreadsheetCellEditable.java index 81033f44c..246bd705b 100644 --- a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetCellEditable.java +++ b/bundles/org.simantics.spreadsheet/src/org/simantics/spreadsheet/solver/SpreadsheetCellEditable.java @@ -1,14 +1,17 @@ -package org.simantics.spreadsheet.graph; +package org.simantics.spreadsheet.solver; import java.util.Collections; import java.util.Map; import org.simantics.databoard.binding.mutable.Variant; +@SuppressWarnings("rawtypes") public class SpreadsheetCellEditable implements SheetNode { - public final SpreadsheetCell cell; + private static final long serialVersionUID = -5078387091775971986L; + public final SpreadsheetCell cell; + public SpreadsheetCellEditable(SpreadsheetCell spreadsheetCell) { this.cell = spreadsheetCell; } @@ -27,7 +30,7 @@ public class SpreadsheetCellEditable implements SheetNode { public Map getProperties() { return Collections.emptyMap(); } - + @Override public int hashCode() { final int prime = 31; @@ -54,22 +57,22 @@ public class SpreadsheetCellEditable implements SheetNode { } public boolean editable() { - if (cell.content == null || cell.content instanceof SpreadsheetFormula || cell.content instanceof SpreadsheetSCLConstant) + if (cell.getContent() == null || cell.getContent() instanceof SpreadsheetFormula || cell.getContent() instanceof SpreadsheetSCLConstant) return false; - if (cell.content instanceof String) { - String content = (String) cell.content; - if (content.isEmpty()) - return false; + if (cell.getContent() instanceof String) { + String content = (String) cell.getContent(); + if (content.isEmpty()) + return false; } - if (cell.content instanceof Variant) { - Variant content = (Variant) cell.content; - if (content.getValue() == null) - return false; - if (content.getValue() instanceof String) { - String actualContent = (String) content.getValue(); - if (actualContent.isEmpty()) - return false; - } + if (cell.getContent() instanceof Variant) { + Variant content = (Variant) cell.getContent(); + if (content.getValue() == null) + return false; + if (content.getValue() instanceof String) { + String actualContent = (String) content.getValue(); + if (actualContent.isEmpty()) + return false; + } } // System.out.println("content is " + cell.content); return true;