Skip to content

Commit

Permalink
#6730: remove update cell method and add example for updating values …
Browse files Browse the repository at this point in the history
…by sendModel
  • Loading branch information
jaroslawmalekcodete committed Feb 14, 2018
1 parent b0ea8e3 commit cd9cb84
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
3 changes: 2 additions & 1 deletion doc/groovy/TableAPI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,8 @@
"metadata": {},
"outputs": [],
"source": [
"tableToUpdate.updateCell(1,0,111)"
"tableToUpdate.values[0][0] = 99\n",
"tableToUpdate.sendModel()"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,13 +660,6 @@ public String getSubtype() {
return subtype;
}

@SuppressWarnings("unchecked")
public void updateCell(int row, int col, Object value) {
List<Object> rowList = (List<Object>) values.get(row);
rowList.set(col, value);
sendModel();
}

public void setDoubleClickAction(String tagName) {
this.doubleClickListener = null;
this.doubleClickTag = tagName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,6 @@ public void tearDown() throws Exception {
KernelManager.register(null);
}

@Test
public void shouldSendCommMsgWhenUpdateCell() throws Exception {
//given
//when
tableDisplay.updateCell(0, 0, 121);
//then
assertThat(tableDisplay.getValues().get(0).get(0)).isEqualTo(121);
LinkedHashMap model = getModel();
List actual = (List) model.get(VALUES);
assertThat(((List)actual.get(0)).get(0)).isEqualTo(121);
}

@Test
public void shouldSendCommMsgWhenAlignmentProviderForColumnChange() throws Exception {
//given
Expand Down

0 comments on commit cd9cb84

Please sign in to comment.