Beispiel #1
0
 private void updateSearchResultButtonStatus() {
   int size = selection.getSelectedSet().size();
   buttonAddDisk.setEnabled(true);
   buttonDeleteDisk.setEnabled(size != 0 && presenter.canDeleteDisk());
   buttonModifyDisk.setEnabled(size == 1 && presenter.canModifyDisk());
   buttonClearSelection.setEnabled(size != 0);
 }
  @Override
  public void setSelectedVariableName(
      VariableDto variable, VariableDto previousVariable, VariableDto nextVariable) {
    variableNameSuggestBox.setText(variable == null ? null : variable.getName());
    previous.setTitle(previousVariable == null ? null : previousVariable.getName());
    next.setTitle(nextVariable == null ? null : nextVariable.getName());

    previous.setEnabled(previousVariable != null);
    next.setEnabled(nextVariable != null);
  }
Beispiel #3
0
 @Override
 public void setEnabled(boolean enabled) {
   super.setEnabled(enabled);
   updateStatus();
 }