protected void moveMatchBySelection() { // PENDING JW: #718-swingx - don't move selection on not found // complying here is accidental, defaultListSelectionModel doesn't // clear on -1 but silently does nothing // isn't doc'ed anywhere - so we back out if (!hasMatch()) { return; } list.setSelectedIndex(lastSearchResult.foundRow); list.ensureIndexIsVisible(lastSearchResult.foundRow); }
protected void moveMatchBySelection() { // PENDING JW: #718-swingx - don't move selection on not found // complying here is accidental, defaultListSelectionModel doesn't // clear on -1 but silently does nothing // isn't doc'ed anywhere - so we back out if (!hasMatch()) { return; } list.setSelectedIndex(lastSearchResult.foundRow); list.ensureIndexIsVisible(lastSearchResult.foundRow); }
protected void moveMatchBySelection() { // PENDING JW: #718-swingx - don't move selection on not found // complying here is accidental, defaultListSelectionModel doesn't // clear on -1 but silently does nothing // isn't doc'ed anywhere - so we back out if (!hasMatch()) { return; } list.setSelectedIndex(lastSearchResult.foundRow); list.ensureIndexIsVisible(lastSearchResult.foundRow); }
protected void moveMatchBySelection() { // PENDING JW: #718-swingx - don't move selection on not found // complying here is accidental, defaultListSelectionModel doesn't // clear on -1 but silently does nothing // isn't doc'ed anywhere - so we back out if (!hasMatch()) { return; } list.setSelectedIndex(lastSearchResult.foundRow); list.ensureIndexIsVisible(lastSearchResult.foundRow); }
protected void moveMatchBySelection() { // PENDING JW: #718-swingx - don't move selection on not found // complying here is accidental, defaultListSelectionModel doesn't // clear on -1 but silently does nothing // isn't doc'ed anywhere - so we back out if (!hasMatch()) { return; } list.setSelectedIndex(lastSearchResult.foundRow); list.ensureIndexIsVisible(lastSearchResult.foundRow); }
/** * Selected the previous row and force it to be visible. * * @see JList#ensureIndexIsVisible */ protected void selectPreviousIndex() { int s = list.getSelectedIndex(); if(s > 0) { s -= 1; list.setSelectedIndex(s); list.ensureIndexIsVisible(s); } }
/** * Selected the previous row and force it to be visible. * * @see JList#ensureIndexIsVisible */ protected void selectPreviousIndex() { int s = list.getSelectedIndex(); if(s > 0) { s -= 1; list.setSelectedIndex(s); list.ensureIndexIsVisible(s); } }
/** * Selected the previous row and force it to be visible. * * @see JList#ensureIndexIsVisible */ protected void selectPreviousIndex() { int s = list.getSelectedIndex(); if(s > 0) { s -= 1; list.setSelectedIndex(s); list.ensureIndexIsVisible(s); } }
/** * Selected the previous row and force it to be visible. * * @see JList#ensureIndexIsVisible */ protected void selectPreviousIndex() { int s = list.getSelectedIndex(); if(s > 0) { s -= 1; list.setSelectedIndex(s); list.ensureIndexIsVisible(s); } }
/** * Selects the specified object from the list, taking into account * sorting and filtering. * * @param anObject the object to select * @param shouldScroll {@code true} if the list should scroll to display * the selected object, if one exists; otherwise {@code false} */ @Override public void setSelectedValue(Object anObject,boolean shouldScroll) { // Note: this method is a copy of JList.setSelectedValue, // including comments. It simply usues getElementCount() and getElementAt() // instead of the model. if(anObject == null) setSelectedIndex(-1); else if(!anObject.equals(getSelectedValue())) { int i,c; for(i=0,c=getElementCount();i<c;i++) if(anObject.equals(getElementAt(i))){ setSelectedIndex(i); if(shouldScroll) ensureIndexIsVisible(i); repaint(); /** FIX-ME setSelectedIndex does not redraw all the time with the basic l&f**/ return; } setSelectedIndex(-1); } repaint(); /** FIX-ME setSelectedIndex does not redraw all the time with the basic l&f**/ }
/** * Selects the specified object from the list, taking into account * sorting and filtering. * * @param anObject the object to select * @param shouldScroll {@code true} if the list should scroll to display * the selected object, if one exists; otherwise {@code false} */ @Override public void setSelectedValue(Object anObject,boolean shouldScroll) { // Note: this method is a copy of JList.setSelectedValue, // including comments. It simply usues getElementCount() and getElementAt() // instead of the model. if(anObject == null) setSelectedIndex(-1); else if(!anObject.equals(getSelectedValue())) { int i,c; for(i=0,c=getElementCount();i<c;i++) if(anObject.equals(getElementAt(i))){ setSelectedIndex(i); if(shouldScroll) ensureIndexIsVisible(i); repaint(); /** FIX-ME setSelectedIndex does not redraw all the time with the basic l&f**/ return; } setSelectedIndex(-1); } repaint(); /** FIX-ME setSelectedIndex does not redraw all the time with the basic l&f**/ }
/** * Selects the specified object from the list, taking into account * sorting and filtering. * * @param anObject the object to select * @param shouldScroll {@code true} if the list should scroll to display * the selected object, if one exists; otherwise {@code false} */ @Override public void setSelectedValue(Object anObject,boolean shouldScroll) { // Note: this method is a copy of JList.setSelectedValue, // including comments. It simply usues getElementCount() and getElementAt() // instead of the model. if(anObject == null) setSelectedIndex(-1); else if(!anObject.equals(getSelectedValue())) { int i,c; for(i=0,c=getElementCount();i<c;i++) if(anObject.equals(getElementAt(i))){ setSelectedIndex(i); if(shouldScroll) ensureIndexIsVisible(i); repaint(); /** FIX-ME setSelectedIndex does not redraw all the time with the basic l&f**/ return; } setSelectedIndex(-1); } repaint(); /** FIX-ME setSelectedIndex does not redraw all the time with the basic l&f**/ }
/** * Selects the specified object from the list, taking into account * sorting and filtering. * * @param anObject the object to select * @param shouldScroll {@code true} if the list should scroll to display * the selected object, if one exists; otherwise {@code false} */ @Override public void setSelectedValue(Object anObject,boolean shouldScroll) { // Note: this method is a copy of JList.setSelectedValue, // including comments. It simply usues getElementCount() and getElementAt() // instead of the model. if(anObject == null) setSelectedIndex(-1); else if(!anObject.equals(getSelectedValue())) { int i,c; for(i=0,c=getElementCount();i<c;i++) if(anObject.equals(getElementAt(i))){ setSelectedIndex(i); if(shouldScroll) ensureIndexIsVisible(i); repaint(); /** FIX-ME setSelectedIndex does not redraw all the time with the basic l&f**/ return; } setSelectedIndex(-1); } repaint(); /** FIX-ME setSelectedIndex does not redraw all the time with the basic l&f**/ }
/** * Selected the previous row and force it to be visible. * * @see JList#ensureIndexIsVisible */ protected void selectNextIndex() { int s = list.getSelectedIndex(); if((s + 1) < getElementCount()) { s += 1; list.setSelectedIndex(s); list.ensureIndexIsVisible(s); } }
/** * Selected the previous row and force it to be visible. * * @see JList#ensureIndexIsVisible */ protected void selectNextIndex() { int s = list.getSelectedIndex(); if((s + 1) < getElementCount()) { s += 1; list.setSelectedIndex(s); list.ensureIndexIsVisible(s); } }
/** * Selected the previous row and force it to be visible. * * @see JList#ensureIndexIsVisible */ protected void selectNextIndex() { int s = list.getSelectedIndex(); if((s + 1) < getElementCount()) { s += 1; list.setSelectedIndex(s); list.ensureIndexIsVisible(s); } }
/** * Selected the previous row and force it to be visible. * * @see JList#ensureIndexIsVisible */ protected void selectNextIndex() { int s = list.getSelectedIndex(); if((s + 1) < getElementCount()) { s += 1; list.setSelectedIndex(s); list.ensureIndexIsVisible(s); } }
participantsList.setSelectedIndex(index); final JLabel userLabel = (JLabel) model.getElementAt(index); final Resourcepart selectedUser = Resourcepart.fromOrThrowUnchecked(userLabel.getText());