/** * {@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} */ 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; }
/** * Return the JList relative Y coordinate of the origin of the specified * row or -1 if row isn't valid. * * @return The Y coordinate of the origin of row, or -1. * @see #getRowHeight * @see #updateLayoutState */ protected int convertRowToY(int row) { if (row >= getRowCount(0) || row < 0) { return -1; } Rectangle bounds = getCellBounds(list, row, row); return bounds.y; }
/** * Return the JList relative Y coordinate of the origin of the specified * row or -1 if row isn't valid. * * @return The Y coordinate of the origin of row, or -1. * @see #getRowHeight * @see #updateLayoutState */ protected int convertRowToY(int row) { if (row >= getRowCount(0) || row < 0) { return -1; } Rectangle bounds = getCellBounds(list, row, row); return bounds.y; }
/** * Return the JList relative Y coordinate of the origin of the specified * row or -1 if row isn't valid. * * @return The Y coordinate of the origin of row, or -1. * @see #getRowHeight * @see #updateLayoutState */ protected int convertRowToY(int row) { if (row >= getRowCount(0) || row < 0) { return -1; } Rectangle bounds = getCellBounds(list, row, row); return bounds.y; }
/** * Return the JList relative Y coordinate of the origin of the specified * row or -1 if row isn't valid. * * @return The Y coordinate of the origin of row, or -1. * @see #getRowHeight * @see #updateLayoutState */ protected int convertRowToY(int row) { if (row >= getRowCount(0) || row < 0) { return -1; } Rectangle bounds = getCellBounds(list, row, row); return bounds.y; }
protected void repaintCellFocus() { int leadIndex = adjustIndex(list.getLeadSelectionIndex(), list); if (leadIndex != -1) { Rectangle r = getCellBounds(list, leadIndex, leadIndex); if (r != null) { list.repaint(r.x, r.y, r.width, r.height); } } }
protected void repaintCellFocus() { int leadIndex = adjustIndex(list.getLeadSelectionIndex(), list); if (leadIndex != -1) { Rectangle r = getCellBounds(list, leadIndex, leadIndex); if (r != null) { list.repaint(r.x, r.y, r.width, r.height); } } }
protected void repaintCellFocus() { int leadIndex = adjustIndex(list.getLeadSelectionIndex(), list); if (leadIndex != -1) { Rectangle r = getCellBounds(list, leadIndex, leadIndex); if (r != null) { list.repaint(r.x, r.y, r.width, r.height); } } }
protected void repaintCellFocus() { int leadIndex = adjustIndex(list.getLeadSelectionIndex(), list); if (leadIndex != -1) { Rectangle r = getCellBounds(list, leadIndex, leadIndex); if (r != null) { list.repaint(r.x, r.y, r.width, r.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); } }
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 mouseDragged(MouseEvent e) { if (SwingXUtilities.shouldIgnore(e, list)) { return; } if (list.getDragEnabled()) { DragRecognitionSupport.mouseDragged(e, this); return; } if (e.isShiftDown() || e.isControlDown()) { return; } int row = locationToIndex(list, e.getPoint()); if (row != -1) { // 4835633. Dragging onto a File should not select it. if (isFileList) { return; } Rectangle cellBounds = getCellBounds(list, row, row); if (cellBounds != null) { list.scrollRectToVisible(cellBounds); list.setSelectionInterval(row, row); } } }
public void mouseDragged(MouseEvent e) { if (SwingXUtilities.shouldIgnore(e, list)) { return; } if (list.getDragEnabled()) { DragRecognitionSupport.mouseDragged(e, this); return; } if (e.isShiftDown() || e.isControlDown()) { return; } int row = locationToIndex(list, e.getPoint()); if (row != -1) { // 4835633. Dragging onto a File should not select it. if (isFileList) { return; } Rectangle cellBounds = getCellBounds(list, row, row); if (cellBounds != null) { list.scrollRectToVisible(cellBounds); list.setSelectionInterval(row, row); } } }
public void mouseDragged(MouseEvent e) { if (SwingXUtilities.shouldIgnore(e, list)) { return; } if (list.getDragEnabled()) { DragRecognitionSupport.mouseDragged(e, this); return; } if (e.isShiftDown() || e.isControlDown()) { return; } int row = locationToIndex(list, e.getPoint()); if (row != -1) { // 4835633. Dragging onto a File should not select it. if (isFileList) { return; } Rectangle cellBounds = getCellBounds(list, row, row); if (cellBounds != null) { list.scrollRectToVisible(cellBounds); list.setSelectionInterval(row, row); } } }
public void mouseDragged(MouseEvent e) { if (SwingXUtilities.shouldIgnore(e, list)) { return; } if (list.getDragEnabled()) { DragRecognitionSupport.mouseDragged(e, this); return; } if (e.isShiftDown() || e.isControlDown()) { return; } int row = locationToIndex(list, e.getPoint()); if (row != -1) { // 4835633. Dragging onto a File should not select it. if (isFileList) { return; } Rectangle cellBounds = getCellBounds(list, row, row); if (cellBounds != null) { list.scrollRectToVisible(cellBounds); list.setSelectionInterval(row, row); } } }