コード例 #1
0
ファイル: TablePresenter.java プロジェクト: Rima-B/opal
 @Override
 public void onTableSelectionChanged(TableSelectionChangeEvent event) {
   if (event.hasTable()) {
     updateDisplay(event.getTable());
   } else {
     updateDisplay(event.getDatasourceName(), event.getTableName());
   }
 }
コード例 #2
0
ファイル: TablePresenter.java プロジェクト: Rima-B/opal
  private void addEventHandlers() {
    addRegisteredHandler(TableSelectionChangeEvent.getType(), this);
    addRegisteredHandler(ConfirmationEvent.getType(), new RemoveConfirmationEventHandler());

    addRegisteredHandler(
        VariableRefreshEvent.getType(),
        new VariableRefreshEvent.Handler() {
          @Override
          public void onVariableRefresh(VariableRefreshEvent event) {
            if (table != null) {
              updateVariables();
            }
          }
        });

    registerHandler(getView().addVariableSortHandler(new VariableSortHandler()));

    addRegisteredHandler(
        TableIndexStatusRefreshEvent.getType(), new TableIndexStatusRefreshHandler());

    // Delete variables confirmation handler
    addRegisteredHandler(ConfirmationEvent.getType(), new DeleteVariableConfirmationEventHandler());

    addRegisteredHandler(
        ValuesQueryEvent.getType(),
        new ValuesQueryEvent.ValuesQueryHandler() {
          @Override
          public void onValuesQuery(ValuesQueryEvent event) {
            valuesFilter = event.getQuery();
            valuesFilterText = event.getText();
          }
        });
  }