On Mon, 22 Aug 2022 19:32:34 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
>> test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 278: >> >>> 276: * center and the test window (if not null) is >>> placed to >>> 277: * the right of the instruction frame. >>> 278: * >> >> "vertical center" means half way between the top and the bottom which is >> absolutely not what you mean, is it ? >> >> horizontal center surely ? >> >> But what if the test window is > 0.5 the width of the screen ? Now it is off >> the edge .. wouldn't it be better >> to move the instruction window to the left to accommodate it ? >> Although that might be tricky if we don't know its size yet .. > > @prrace @aivanov-jdk For Horizontal position, the frame and window are > positioned as follows - > > . > > > I intended to convey that the right edge of the instruction frame aligns with > the yellow line, the line that runs vertically and divides the screen into > right and left halves (vertical center - probably not the right term, as Phil > mentioned horizontal center might be correct word here. Updated it in the > latest commit. > > >> But what if the test window is > 0.5 the width of the screen ? Now it is off >> the edge .. wouldn't it be better >> to move the instruction window to the left to accommodate it ? >> Although that might be tricky if we don't know its size yet .. > > Yes I agree, can we take it up as a separate issue while redesigning the > framework as @aivanov-jdk suggested? > Should be account for this in positonTestWindow() javadocs - something like - > "**_approximately_** positions the testWindow and instruction frame according > to {@code position} parameter." Yes, a pre-existing issue. Dealing with it later is OK even though it'll slightly respecify the method again. ------------- PR: https://git.openjdk.org/jdk/pull/9525