RFR: JDK-8320444: Column drag header is positioned wrong for nested columns [v2]

Andy Goryachev angorya at openjdk.org
Tue Nov 21 20:45:18 UTC 2023


On Tue, 21 Nov 2023 20:00:56 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

>> good point.
>> 
>> May I suggest to declare constants for column widths and column reordering coordinates so the origin of these numbers becomes clear?
>> Also, we are comparing floating point numbers, so perhaps it's better specify a small delta:
>> 
>> double CWIDTH = 100;
>> double EPSILON = 0.0001;
>> assertEquals(CWIDTH + CWIDTH + OFFSET, columnDragHeader.getTranslateX(), EPSILON);
>
> Pushed. 
> Since we compare very simple numbers (we even set them before as int), I personally would not expect a delta but an accurate number, therefore no delta added in this test.

Will it be a round integer in case of fractional scale (it might be in this case, since the test does not set the scale explicitly)?

Should we extends this test with fractional scale, let's say 1.25?

Have you tested this fix with fractional scale?

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1292#discussion_r1401151468


More information about the openjfx-dev mailing list