darklaf icon indicating copy to clipboard operation
darklaf copied to clipboard

Verticle line through table

Open tyro668 opened this issue 1 year ago • 4 comments

table height cannot be grid height, it will through the table.

tyro668 avatar Aug 30 '22 02:08 tyro668

Could you please elaborate what precisely the issue being fixed is here?

weisJ avatar Aug 31 '22 09:08 weisJ

if use JTable inside with a scrollpane,the table‘s vertical lines are not end at the last row,in fact the vertical tables grid lines though the last row,like this image:

error vertical table grid line

tyro668 avatar Sep 08 '22 02:09 tyro668

The way the vertical lines are painted is intentional. If you think there should be an option to change that behaviour, please file a feature request issue. I highly appreciate any contributions, but would like them to be discussed beforehand if they do more than simply changing something trivial (like translations etc.). In this case I think adding an option to to change the painting behaviour through a client property would be very reasonable (similar to TableConstants.KEY_ALTERNATE_ROW_COLOR ).

Note that

  1. The height of the cells doesn't need to be computed as it is already available above as the bottom coordinate of maxCell.
  2. As is your patch doesn't work when dragging columns

weisJ avatar Sep 08 '22 20:09 weisJ

Fix the problem,add property:TableConstants.KEY_VERTICAL_LINES_THROUGH

tyro668 avatar Sep 13 '22 10:09 tyro668