- public void searchTag(SupportType searchOn, int page, int item, String... tags) {
- // TODO: !!!
- throw new java.lang.IllegalStateException("Not implemented yet.");
+ public void searchTag(final SupportType searchOn, final int page,
+ final int item, final boolean sync, final Integer... tags) {
+
+ final GuiReaderSearchFrame search = new GuiReaderSearchFrame(this);
+
+ final BasicSearchable searchable = BasicSearchable
+ .getSearchable(searchOn);
+
+ Runnable action = new Runnable() {
+ @Override
+ public void run() {
+ SearchableTag tag = null;
+ try {
+ tag = searchable.getTag(tags);
+ } catch (IOException e) {
+ Instance.getInstance().getTraceHandler().error(e);
+ }
+
+ search.searchTag(searchOn, page, item, tag);
+
+ if (sync) {
+ sync(search);
+ } else {
+ search.setVisible(true);
+ }
+ }
+ };
+
+ if (sync) {
+ action.run();
+ } else {
+ new Thread(action).start();
+ }