@Override
 public TableDto getSelectedTable() {
   if (tableChooser.getSelectedTables().size() == 1) {
     return tableChooser.getSelectedTables().get(0);
   }
   return null;
 }
Exemple #2
0
 @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");
  }
Exemple #4
0
  private void clear() {
    tableChooser.clear();

    while (table.getColumnCount() > 0) {
      table.removeColumn(0);
    }

    addTableColumns();
  }
Exemple #5
0
 @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);
 }
Exemple #8
0
 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);
 }