コード例 #1
0
 protected void onSelectByMnemonic(Object value) {
   if (myListModel.isVisible(value)) {
     myList.setSelectedValue(value, true);
     myList.repaint();
     handleSelect(true);
   }
 }
コード例 #2
0
  protected void onSpeedSearchPatternChanged() {
    myListModel.refilter();
    if (myListModel.getSize() > 0) {
      if (!autoSelectUsingStatistics()) {
        int fullMatchIndex = myListModel.getClosestMatchIndex();
        if (fullMatchIndex != -1) {
          myList.setSelectedIndex(fullMatchIndex);
        }

        if (myListModel.getSize() <= myList.getSelectedIndex()
            || !myListModel.isVisible(myList.getSelectedValue())) {
          myList.setSelectedIndex(0);
        }
      }
    }
  }