コード例 #1
0
 public List<String> getHistory() {
   final int itemsCount = myModel.getSize();
   List<String> history = new ArrayList<String>(itemsCount);
   for (int i = 0; i < itemsCount; i++) {
     history.add((String) myModel.getElementAt(i));
   }
   return history;
 }
コード例 #2
0
 private void updateMenu() {
   if (myNativeSearchPopup != null) {
     myNativeSearchPopup.removeAll();
     final int itemsCount = myModel.getSize();
     if (itemsCount == 0) {
       myNativeSearchPopup.add(myNoItems);
     } else {
       for (int i = 0; i < itemsCount; i++) {
         String item = (String) myModel.getElementAt(i);
         addMenuItem(item);
       }
     }
   }
 }