private void finishDrag() { dragging = false; if ((System.currentTimeMillis() - dragStartTime) < 400) { update(); } else { abortDrag(); } }
public void mouseDragged(MouseEvent e) { if (!armed && !dragging) { return; } int newPos = e.getPoint().x; TableColumn c0 = getColumnModel().getColumn(0); TableColumn c1 = getColumnModel().getColumn(1); int min = Math.max(c0.getMinWidth(), getWidth() - c1.getMaxWidth()); int max = Math.min(c0.getMaxWidth(), getWidth() - c1.getMinWidth()); if ((newPos >= min) && (newPos <= max)) { pos = newPos; update(); } }
private void finishDrag() { dragging=false; if ((System.currentTimeMillis() - dragStartTime) < 400) { update(); } else { abortDrag(); } }
public void mouseDragged(MouseEvent e) { if (!armed && !dragging) return; int newPos = e.getPoint().x; TableColumn c0 = getColumnModel().getColumn(0); TableColumn c1 = getColumnModel().getColumn(1); int min = Math.max(c0.getMinWidth(), getWidth() - c1.getMaxWidth()); int max = Math.min(c0.getMaxWidth(), getWidth() - c1.getMinWidth()); if ((newPos >= min) && (newPos <= max)) { pos = newPos; update(); } }
public void mouseDragged(MouseEvent e) { if (!armed && !dragging) return; int newPos = e.getPoint().x; TableColumn c0 = getColumnModel().getColumn(0); TableColumn c1 = getColumnModel().getColumn(1); int min = Math.max(c0.getMinWidth(), getWidth() - c1.getMaxWidth()); int max = Math.min(c0.getMaxWidth(), getWidth() - c1.getMinWidth()); if ((newPos >= min) && (newPos <= max)) { pos = newPos; update(); } }
private void finishDrag() { dragging=false; if ((System.currentTimeMillis() - dragStartTime) < 400) { update(); } else { abortDrag(); } }