});
-
txt_search.setFont(new java.awt.Font("Verdana", 0, 12));
txt_search.getEditor().getEditorComponent()
@Override
public void actionPerformed(ActionEvent e)
{
- if (!getTypedText().equalsIgnoreCase(lastSearchTerm))
+ String typed = getTypedText();
+ if (!typed.equalsIgnoreCase(lastSearchTerm))
{
searchAction(true);
paginatorCart.clear();
- lastSearchTerm = getTypedText();
+ lastSearchTerm = typed;
}
}
}, false);
@Override
public String getTypedText()
{
- return txt_search.getEditor().getItem() == null ? "" : txt_search
+ String typed = txt_search.getEditor().getItem() == null ? ""
+ : txt_search
.getEditor().getItem().toString().trim();
+ System.out.println("Typed : " + typed);
+ return typed;
}
@Override
{
lbl_blank.setVisible(!isSearchInProgress);
lbl_loading.setVisible(isSearchInProgress);
+ txt_search.setEditable(!isSearchInProgress);
}
@Override
{
setSearchInProgress(true);
long startTime = System.currentTimeMillis();
-
+ searchInput = getTypedText();
String searchTarget = ((FTSDataColumnI) cmb_searchTarget
.getSelectedItem()).getAltCode();
-
wantedFields = UniProtFTSRestClient.getInstance()
.getAllDefaultDisplayedFTSDataColumns();
- String searchTerm = decodeSearchTerm(getTypedText(),
- searchTarget);
+ String searchTerm = decodeSearchTerm(searchInput, searchTarget);
FTSRestRequest request = new FTSRestRequest();
request.setFieldToSearchBy(searchTarget);
setSearchInProgress(false);
refreshPaginatorState();
updateSummaryTableSelections();
+ updateCache();
}
- updateCache();
}
}.start();