mapList = [ [a:1, b:2, c:3], [a:4, b:5, c:6], [a:7, b:8, c:5] ] display1 = new TableDisplay(mapList) display1.addContextMenuItem("plusOne") { row, col, tableDisplay -> tableDisplay.values[row][col]++; } display1.addContextMenuItem("tag1ByStr", "tag1"); display1.addContextMenuItem("tag1ByClosure") { row, col, tableDisplay -> beakerx.runByTag("tag1"); } display1 details = display1.details print(details.row + ":" + details.col + "=" + display1.values[details.row][details.col]) // cell1 expected result Image("../../resources/img/groovy/tableActions/cell1_case1.png") // cell1 expected result after menu action Image("../../resources/img/groovy/tableActions/cell1_case2.png") display2 = new TableDisplay(mapList) display2.setDoubleClickAction { row, col, tableDisplay -> tableDisplay.values[row][col]++; } display2 // cell2 expected result Image("../../resources/img/groovy/tableActions/cell2_case1.png") // cell2 expected result after doubleClick action Image("../../resources/img/groovy/tableActions/cell2_case2.png") display3 = new TableDisplay(mapList) display3.setDoubleClickAction("tag3") display3 details = display3.details print(details.row + ":" + details.col + "=" + display3.values[details.row][details.col]) // cell3 expected result Image("../../resources/img/groovy/tableActions/cell3_case1.png") display4 = new TableDisplay(mapList) display4.setDoubleClickAction{ row, col, tableDisplay -> beakerx.runByTag("tag4"); } display4 details = display4.details print(details.row + ":" + details.col + "=" + display4.values[details.row][details.col]) // cell4 expected result Image("../../resources/img/groovy/tableActions/cell4_case1.png")