/** Returns true if the passed X axis pixel position is within the * bounds where a drag can be initiated to resize columns */ protected final boolean onCenterLine(int pos) { int line = getColumnModel().getColumn(0).getWidth(); return (pos > (line - centerLineFudgeFactor)) && (pos < (line + centerLineFudgeFactor)); }
/** Returns true if the passed X axis pixel position is within the * bounds where a drag can be initiated to resize columns */ protected final boolean onCenterLine(int pos) { int line = getColumnModel().getColumn(0).getWidth(); return (pos > line - centerLineFudgeFactor) && (pos < line + centerLineFudgeFactor); }
/** Returns true if the passed X axis pixel position is within the * bounds where a drag can be initiated to resize columns */ protected final boolean onCenterLine(int pos) { int line = getColumnModel().getColumn(0).getWidth(); return (pos > line - centerLineFudgeFactor) && (pos < line + centerLineFudgeFactor); }
private void update() { if ((pos < 0) || (pos > getWidth())) { repaint(); return; } int pos0 = pos; int pos1 = getWidth() - pos; synchronized (getTreeLock()) { getColumnModel().getColumn(0).setWidth(pos0); getColumnModel().getColumn(1).setWidth(pos1); getColumnModel().getColumn(0).setPreferredWidth(pos0); getColumnModel().getColumn(1).setPreferredWidth(pos1); } BaseTable.this.repaint(); } }
private void update() { if ((pos < 0) || (pos > getWidth())) { repaint(); return; } int pos0 = pos; int pos1 = getWidth() - pos; synchronized (getTreeLock()) { getColumnModel().getColumn(0).setWidth(pos0); getColumnModel().getColumn(1).setWidth(pos1); getColumnModel().getColumn(0).setPreferredWidth(pos0); getColumnModel().getColumn(1).setPreferredWidth(pos1); } BaseTable.this.repaint(); } }
private void update() { if ((pos < 0) || (pos > getWidth())) { repaint(); return; } int pos0 = pos; int pos1 = getWidth() - pos; synchronized (getTreeLock()) { getColumnModel().getColumn(0).setWidth(pos0); getColumnModel().getColumn(1).setWidth(pos1); getColumnModel().getColumn(0).setPreferredWidth(pos0); getColumnModel().getColumn(1).setPreferredWidth(pos1); } BaseTable.this.repaint(); } }
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(); } }
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(); } }
Point loc = new Point(getColumnModel().getColumn(0).getWidth(), getRowHeight() / 2); int width = getColumnModel().getColumn(1).getWidth(); int height = getRowHeight() + 5; if (width < 120) {
Point loc = new Point(getColumnModel().getColumn(0).getWidth(), getRowHeight() / 2); int width = getColumnModel().getColumn(1).getWidth(); int height = getRowHeight() + 5; if (width < 120) {
JViewport jvp = (JViewport) getParent(); loc = jvp.getViewPosition(); loc.x += getColumnModel().getColumn(0).getWidth(); prevViewPosition = new Point( loc ); } else { loc = new Point(getColumnModel().getColumn(0).getWidth(), getRowHeight() / 2); int width = getColumnModel().getColumn(1).getWidth(); int height = getRowHeight() + 5;