+ private void updateSupportType(SupportType supportType) {
+ if (supportType != this.supportType) {
+ this.supportType = supportType;
+ comboSupportTypes.setSelectedItem(supportType);
+ // TODO: reset all
+ }
+ }
+
+ private void updateSearchBy(final boolean byTag) {
+ if (byTag != this.searchByTags) {
+ inUi(new Runnable() {
+ @Override
+ public void run() {
+ if (!byTag) {
+ searchTabs.setSelectedIndex(0);
+ } else {
+ searchTabs.setSelectedIndex(1);
+ }
+ }
+ });
+ }
+ }
+
+ private void updatePages(final int page, final Integer maxPage) {
+ inUi(new Runnable() {
+ @Override
+ public void run() {
+ GuiReaderSearch.this.page = page;
+ GuiReaderSearch.this.maxPage = maxPage;
+ // TODO: gui
+ System.out.println("page: " + page);
+ System.out.println("max page: " + maxPage);
+ }
+ });
+ }
+
+ // cannot be NULL
+ private void updateKeywords(final String keywords) {
+ if (!keywords.equals(this.keywords)) {
+ inUi(new Runnable() {
+ @Override
+ public void run() {
+ GuiReaderSearch.this.keywords = keywords;
+ keywordsField.setText(keywords);
+ }
+ });
+ }
+ }
+
+ // can be NULL
+ private void updateTags(final SearchableTag tag) {
+ inUi(new Runnable() {
+ @Override
+ public void run() {
+ // TODO
+ }
+ });
+ }
+
+ private void updateBooks(final List<GuiReaderBookInfo> infos) {
+ setWaitingScreen(true);
+ inUi(new Runnable() {
+ @Override
+ public void run() {
+ books.refreshBooks(infos, seeWordcount);
+ setWaitingScreen(false);
+ }
+ });
+ }
+
+ // item 0 = no selection, else = default selection