Пример #1
0
 private void handleSearchType() {
   if (searchTextField.isFocus) {
     String text = searchTextField.getText();
     _list.removeAll();
     _list.invalidate();
     for (int i = 0; i < all.size(); i++) {
       DocumentInfo picInfo = (DocumentInfo) all.elementAt(i);
       if (picInfo.containKey(text)) {
         _list.add(picInfo);
       }
     }
     _list.invalidate();
   }
 }
Пример #2
0
 public void fieldChanged(Field field, int context) {
   //		Dialog.alert("test");
   if (!(field instanceof MyButtonField)) {
     super.fieldChanged(field, context);
     return;
   }
   MyButtonField btnField = (MyButtonField) field;
   if (btnField == nextBT) {
     //			Dialog.alert("next");
     currentIndex = currentIndex + Const.NUM_LIST;
     UiApplication.getUiApplication().pushScreen(WaitScreen.getInstance());
     Engine.getInstance().getDocument(currentIndex, search);
   } else if (btnField == previousBT) {
     //			Dialog.alert("prev");
     currentIndex = currentIndex - Const.NUM_LIST;
     UiApplication.getUiApplication().pushScreen(WaitScreen.getInstance());
     Engine.getInstance().getDocument(currentIndex, search);
   } else if (btnField == searchBT) {
     search = searchTextField.getText();
     UiApplication.getUiApplication().pushScreen(WaitScreen.getInstance());
     Engine.getInstance().getDocument(currentIndex, search);
   }
 }