/** * {@inheritDoc} */ public Point indexToLocation(JList list, int index) { maybeUpdateLayoutState(); Rectangle rect = getCellBounds(list, index, index); if (rect != null) { return new Point(rect.x, rect.y); } return null; }
/** * {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public int locationToIndex(JList list, Point location) { maybeUpdateLayoutState(); return convertLocationToModel(location.x, location.y); }
/** * {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public int locationToIndex(JList list, Point location) { maybeUpdateLayoutState(); return convertLocationToModel(location.x, location.y); }
/** * {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public int locationToIndex(JList list, Point location) { maybeUpdateLayoutState(); return convertLocationToModel(location.x, location.y); }
/** * {@inheritDoc} */ public Point indexToLocation(JList list, int index) { maybeUpdateLayoutState(); Rectangle rect = getCellBounds(list, index, index); if (rect != null) { return new Point(rect.x, rect.y); } return null; }
/** * {@inheritDoc} */ public Point indexToLocation(JList list, int index) { maybeUpdateLayoutState(); Rectangle rect = getCellBounds(list, index, index); if (rect != null) { return new Point(rect.x, rect.y); } return null; }
/** * {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public int locationToIndex(JList list, Point location) { maybeUpdateLayoutState(); return convertLocationToModel(location.x, location.y); }
/** * {@inheritDoc} */ public Point indexToLocation(JList list, int index) { maybeUpdateLayoutState(); Rectangle rect = getCellBounds(list, index, index); if (rect != null) { return new Point(rect.x, rect.y); } return null; }
public void valueChanged(ListSelectionEvent e) { maybeUpdateLayoutState(); int size = getElementCount(); int firstIndex = Math.min(size - 1, Math.max(e.getFirstIndex(), 0)); int lastIndex = Math.min(size - 1, Math.max(e.getLastIndex(), 0)); Rectangle bounds = getCellBounds(list, firstIndex, lastIndex); if (bounds != null) { list.repaint(bounds.x, bounds.y, bounds.width, bounds.height); } }
public void valueChanged(ListSelectionEvent e) { maybeUpdateLayoutState(); int size = getElementCount(); int firstIndex = Math.min(size - 1, Math.max(e.getFirstIndex(), 0)); int lastIndex = Math.min(size - 1, Math.max(e.getLastIndex(), 0)); Rectangle bounds = getCellBounds(list, firstIndex, lastIndex); if (bounds != null) { list.repaint(bounds.x, bounds.y, bounds.width, bounds.height); } }
public void valueChanged(ListSelectionEvent e) { maybeUpdateLayoutState(); int size = getElementCount(); int firstIndex = Math.min(size - 1, Math.max(e.getFirstIndex(), 0)); int lastIndex = Math.min(size - 1, Math.max(e.getLastIndex(), 0)); Rectangle bounds = getCellBounds(list, firstIndex, lastIndex); if (bounds != null) { list.repaint(bounds.x, bounds.y, bounds.width, bounds.height); } }
public void valueChanged(ListSelectionEvent e) { maybeUpdateLayoutState(); int size = getElementCount(); int firstIndex = Math.min(size - 1, Math.max(e.getFirstIndex(), 0)); int lastIndex = Math.min(size - 1, Math.max(e.getLastIndex(), 0)); Rectangle bounds = getCellBounds(list, firstIndex, lastIndex); if (bounds != null) { list.repaint(bounds.x, bounds.y, bounds.width, bounds.height); } }