/** * Set the selected item. The implementation of this method should notify * all registered {@code ListDataListener}s that the contents have changed. * * @param item * the list object to select or {@code null} to clear the * selection * @throws ClassCastException * if {@code item} is not of type {@code E} */ @Override @SuppressWarnings("unchecked") public void setSelectedItem(Object item) { if ((selected != null && !selected.equals(item)) || selected == null && item != null) { selected = (E) item; fireContentsChanged(this, -1, -1); } }
/** * Set the selected item. The implementation of this method should notify * all registered {@code ListDataListener}s that the contents have changed. * * @param item * the list object to select or {@code null} to clear the * selection * @throws ClassCastException * if {@code item} is not of type {@code E} */ @Override @SuppressWarnings("unchecked") public void setSelectedItem(Object item) { if ((selected != null && !selected.equals(item)) || selected == null && item != null) { selected = (E) item; fireContentsChanged(this, -1, -1); } }
/** * Set the selected item. The implementation of this method should notify * all registered {@code ListDataListener}s that the contents have changed. * * @param item * the list object to select or {@code null} to clear the * selection * @throws ClassCastException * if {@code item} is not of type {@code E} */ @SuppressWarnings("unchecked") public void setSelectedItem(Object item) { if ((selected != null && !selected.equals(item)) || selected == null && item != null) { selected = (E) item; fireContentsChanged(this, -1, -1); } }
/** * Set the selected item. The implementation of this method should notify * all registered {@code ListDataListener}s that the contents have changed. * * @param item * the list object to select or {@code null} to clear the * selection * @throws ClassCastException * if {@code item} is not of type {@code E} */ @Override @SuppressWarnings("unchecked") public void setSelectedItem(Object item) { if ((selected != null && !selected.equals(item)) || selected == null && item != null) { selected = (E) item; fireContentsChanged(this, -1, -1); } }
/** * Set the selected item. The implementation of this method should notify * all registered {@code ListDataListener}s that the contents have changed. * * @param item * the list object to select or {@code null} to clear the * selection * @throws ClassCastException * if {@code item} is not of type {@code E} */ @Override @SuppressWarnings("unchecked") public void setSelectedItem(Object item) { if ((selected != null && !selected.equals(item)) || selected == null && item != null) { selected = (E) item; fireContentsChanged(this, -1, -1); } }
/** * {@inheritDoc} */ public void actionPerformed(ActionEvent evt) { if(evt.getActionCommand().equals(UPDATE)) { this.fireContentsChanged(this, 0, getSize()); } } }
/** * {@inheritDoc} */ @Override public void actionPerformed(ActionEvent evt) { if(evt.getActionCommand().equals(UPDATE)) { this.fireContentsChanged(this, 0, getSize() - 1); } } }
/** * {@inheritDoc} */ @Override public void actionPerformed(ActionEvent evt) { if(evt.getActionCommand().equals(UPDATE)) { this.fireContentsChanged(this, 0, getSize() - 1); } } }
/** * {@inheritDoc} */ @Override public void actionPerformed(ActionEvent evt) { if(evt.getActionCommand().equals(UPDATE)) { this.fireContentsChanged(this, 0, getSize() - 1); } } }
/** * {@inheritDoc} */ @Override public void actionPerformed(ActionEvent evt) { if(evt.getActionCommand().equals(UPDATE)) { this.fireContentsChanged(this, 0, getSize() - 1); } } }