@Override public TableDto getSelectedTable() { if (tableChooser.getSelectedTables().size() == 1) { return tableChooser.getSelectedTables().get(0); } return null; }
@Override public void setTables(JsArray<TableDto> tables, TableDto selectedTable) { clear(); valuesPanel.setVisible(tables.length() > 0); if (tables.length() > 0) { tableChooser.addTableSelections(tables); tableChooser.selectTable(selectedTable); } }
@Inject public DeriveFromVariableView(Binder uiBinder) { initWidget(uiBinder.createAndBindUi(this)); tableChooser.addStyleName("table-chooser-large"); variableBox.addStyleName("table-chooser-large"); }
private void clear() { tableChooser.clear(); while (table.getColumnCount() > 0) { table.removeColumn(0); } addTableColumns(); }
@Inject public EntityModalView(EventBus eventBus) { super(eventBus); widget = uiBinder.createAndBindUi(this); valueSelectionHandler = new ValueSelectionHandlerImpl(); initializeTable(); initializeDisplayOptions(); dialog.setTitle(translations.entityDetailsModalTitle()); dialog.setMinWidth(MIN_WIDTH); dialog.setMinHeight(MIN_HEIGHT); tableChooser.addStyleName("table-chooser-large"); }
@Override public void selectTable(TableDto tableDto) { tableChooser.selectTable(tableDto); }
@Override public void addTableSelections(JsArray<TableDto> tables) { tableChooser.addTableSelections(tables); }
private TableDto getSelectedTable() { List<TableDto> tables = tableChooser.getSelectedTables(); // there is only one table since the chooser is not multi select return tables.isEmpty() ? null : tables.get(0); }