- combo.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- final SearchableTag tag = (SearchableTag) combo
- .getSelectedItem();
- if (tag != null) {
- while (comboIndex + 1 < combos.size()) {
- JComboBox combo = combos.remove(comboIndex + 1);
- tagBars.remove(combo);
- }
-
- addTagBar(tag, new Runnable() {
- @Override
- public void run() {
- // TODO: slow ui
- SearchableTag tag = ((SearchableTag) combo
- .getSelectedItem());
- if (tag != null && tag.isLeaf()) {
- BasicSearchable searchable = BasicSearchable
- .getSearchable(supportType);
- List<MetaData> metas = new ArrayList<MetaData>();
- try {
- metas = searchable.search(tag, 1);
- search(metas, 1,
- searchable.searchPages(tag), 0);
- } catch (IOException e) {
- error(e);
- }
- }
-
- setWaitingScreen(false);
- }
- });
- }
- }
- });