public void updateRow(int row) { WalrusInfoWeb walrus = this.walrusList.get(row); Grid g = (Grid) this.grid.getWidget(row, 0); HorizontalPanel p = (HorizontalPanel) g.getWidget(0, 1); walrus.setHost(((TextBox) p.getWidget(0)).getText()); int widgetStartIndex = 1; ArrayList<String> properties = walrus.getProperties(); for (int i = 0; i < (properties.size() / 4); ++i) { if (properties.get(4 * i).startsWith("KEYVALUE")) properties.set(4 * i + 2, ((TextBox) g.getWidget(widgetStartIndex + i, 1)).getText()); } }
private void storeCellWidgets() { cellWidgets = new FocusWidget[boardGrid.getRowCount()][boardGrid.getCellCount(0)]; for (int row = 0; row < boardGrid.getRowCount(); row++) { int cellCount = boardGrid.getCellCount(row); for (int col = 0; col < cellCount; col++) { cellWidgets[row][col] = (FocusWidget) boardGrid.getWidget(row, col); } } }