public void setList(Vector trainInfos) { _list.removeAll(); all.removeAllElements(); for (int i = 0; i < trainInfos.size(); i++) { _list.add((DocumentInfo) trainInfos.elementAt(i)); all.addElement((DocumentInfo) trainInfos.elementAt(i)); } }
private void selectAction() { if (_list != null && _list.getSize() > 0) { if (_list.get(_list, _list.getSelectedIndex()) != null) { DocumentInfo trainInfo = (DocumentInfo) _list.get(_list, _list.getSelectedIndex()); if (trainInfo != null) { DocumentDetailScreen scr = new DocumentDetailScreen(trainInfo); UiApplication.getUiApplication().pushScreen(scr); } } } }
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(); } }
protected void onUiEngineAttached(boolean attached) { if (_list != null) { this.invalidate(); // fieldManager.invalidate(); _list.invalidate(); } super.onUiEngineAttached(attached); }