private void updateSortMode() {
    sortMode.clear();
    for (SortMode mode : supportedModes) {
      sortMode.addItem(app.getPlain(mode.toString()));
    }

    SortMode selectedMode = app.getAlgebraView().getTreeMode();
    sortMode.setSelectedIndex(supportedModes.indexOf(selectedMode));
  }