Example #1
0
  private int getResizingRow(Point p, int row) {
    if (row == -1) {
      return -1;
    }
    int col = table.columnAtPoint(p);
    if (col == -1) return -1;
    Rectangle r = table.getCellRect(row, col, true);
    r.grow(0, -3);
    if (r.contains(p)) return -1;

    int midPoint = r.y + r.height / 2;
    int rowIndex = (p.y < midPoint) ? row - 1 : row;

    return rowIndex;
  }
Example #2
0
 private boolean isInGrid(Point p) {
   Rectangle r = getBounds();
   r.grow(-PAD, -PAD);
   return r.contains(p);
 }