X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.spreadsheet.ui%2Fsrc%2Forg%2Fsimantics%2Fspreadsheet%2Fui%2FSpreadsheetModel.java;h=137cde7a44832cc160e6825f5cbb4659df0fd667;hp=5940cfbe0224a7e73ce495e3c18b196361db65af;hb=5c67a96d34fe904b8c4b0375cd08ff1d543bf369;hpb=9a37dabc6c0212ed3e14499c88df3208cd06f9b0 diff --git a/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SpreadsheetModel.java b/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SpreadsheetModel.java index 5940cfbe0..137cde7a4 100644 --- a/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SpreadsheetModel.java +++ b/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/SpreadsheetModel.java @@ -68,20 +68,20 @@ import org.simantics.scenegraph.INode; import org.simantics.scenegraph.swing.JScrollPaneSG; import org.simantics.spreadsheet.Adaptable; import org.simantics.spreadsheet.CellEditor; -import org.simantics.spreadsheet.CellEditor.Transaction; import org.simantics.spreadsheet.ClientModel; -import org.simantics.spreadsheet.ClientModel.OperationMode; +import org.simantics.spreadsheet.OperationMode; import org.simantics.spreadsheet.SheetCommands; +import org.simantics.spreadsheet.Spreadsheets; +import org.simantics.spreadsheet.Transaction; import org.simantics.spreadsheet.common.cell.Parsers; import org.simantics.spreadsheet.common.cell.StringCellParser; import org.simantics.spreadsheet.event.model.RemoveCellHandler; -import org.simantics.spreadsheet.util.SpreadsheetUtils; import org.simantics.ui.colors.Colors; import org.simantics.ui.dnd.LocalObjectTransfer; import org.simantics.ui.dnd.LocalObjectTransferable; import org.simantics.ui.fonts.Fonts; -import org.simantics.utils.ui.dialogs.ShowMessage; import org.simantics.utils.ui.awt.WrapLayout; +import org.simantics.utils.ui.dialogs.ShowMessage; import org.simantics.utils.ui.jface.ActiveSelectionProvider; @SuppressWarnings({ "rawtypes", "unchecked" }) @@ -409,16 +409,16 @@ public class SpreadsheetModel { for(int col : selectedColumns) { for(int row : selectedRows) { - String location = SpreadsheetUtils.cellName(row, col); + String location = Spreadsheets.cellName(row, col); // No if(index == 0) { if(col > 0) { - String left = SpreadsheetUtils.cellName(row, col-1); + String left = Spreadsheets.cellName(row, col-1); setCurrent(left, getCurrent(left, row, col-1) & 2); } if(row > 0) { - String up = SpreadsheetUtils.cellName(row-1, col); + String up = Spreadsheets.cellName(row-1, col); setCurrent(up, getCurrent(up, row-1, col) & 1); } setCurrent(location, 0); @@ -430,14 +430,14 @@ public class SpreadsheetModel { // Top else if(index == 2) { if(row > 0) { - String up = SpreadsheetUtils.cellName(row-1, col); + String up = Spreadsheets.cellName(row-1, col); setCurrent(up, getCurrent(up, row-1, col) | 2); } } // Left else if(index == 3) { if(col > 0) { - String left = SpreadsheetUtils.cellName(row, col-1); + String left = Spreadsheets.cellName(row, col-1); setCurrent(left, getCurrent(left, row, col-1) | 1); } } @@ -530,7 +530,7 @@ public class SpreadsheetModel { if (selection.intersects(span)) { selection = selection.union(span); found = true; - String location = SpreadsheetUtils.cellName(span.y, span.x); + String location = Spreadsheets.cellName(span.y, span.x); editor.edit(transaction, location, ClientModel.ROW_SPAN, 1, Bindings.INTEGER, null); editor.edit(transaction, location, ClientModel.COLUMN_SPAN, 1, Bindings.INTEGER, null); iter.remove(); @@ -538,7 +538,7 @@ public class SpreadsheetModel { } } - String location = SpreadsheetUtils.cellName(selection.y, selection.x); + String location = Spreadsheets.cellName(selection.y, selection.x); if (selection.height > 1) { editor.edit(transaction, location, ClientModel.ROW_SPAN, selection.height, Bindings.INTEGER, null); } @@ -1042,7 +1042,7 @@ public class SpreadsheetModel { private void editSelection(CellEditor editor, Transaction transaction, String property, Object value, Binding binding) { for(int col : table.getSelectedColumns()) { for(int row : table.getSelectedRows()) { - String location = SpreadsheetUtils.cellName(row, col); + String location = Spreadsheets.cellName(row, col); editor.edit(transaction, location, property, value, binding, null); } } @@ -1059,7 +1059,7 @@ public class SpreadsheetModel { // Transaction transaction = editor.startTransaction(); for(int col : selectedColumns) { for(int row : selectedRows) { - String location = SpreadsheetUtils.cellName(row, col); + String location = Spreadsheets.cellName(row, col); CellValue value = (CellValue)table.getValueAt(row, col); int align = value != null ? value.align : 0;