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; }
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); } } } }