On Thu, 21 Jan 2021 06:37:59 GMT, Robert Lichtenberger <[email protected]> 
wrote:

>> Regarding the spec change, I was thinking of this section, which you removed:
>> 
>>      * To clarify the purpose of the {@code hpos} and {@code vpos} 
>> parameters,
>>      * consider that they are relative to the anchor node. As such, a {@code 
>> hpos}
>>      * and {@code vpos} of {@code CENTER} would mean that the ContextMenu 
>> appears
>>      * on top of the anchor, with the (0,0) position of the {@code 
>> ContextMenu}
>>      * positioned at (0,0) of the anchor. A {@code hpos} of right would then 
>> shift
>>      * the {@code ContextMenu} such that its top-left (0,0) position would 
>> be attached
>>      * to the top-right position of the anchor.
>> 
>> As you pointed out, the reference to `hpos` and `vpos` is incorrect, but 
>> unless I'm missing something, it still seems like the concept still needs to 
>> be described.
>
>> Regarding the spec change, I was thinking of this section, which you removed:
>> 
>> ```
>>      * To clarify the purpose of the {@code hpos} and {@code vpos} 
>> parameters,
>>      * consider that they are relative to the anchor node. As such, a {@code 
>> hpos}
>>      * and {@code vpos} of {@code CENTER} would mean that the ContextMenu 
>> appears
>>      * on top of the anchor, with the (0,0) position of the {@code 
>> ContextMenu}
>>      * positioned at (0,0) of the anchor. A {@code hpos} of right would then 
>> shift
>>      * the {@code ContextMenu} such that its top-left (0,0) position would 
>> be attached
>>      * to the top-right position of the anchor.
>> ```
>> 
>> As you pointed out, the reference to `hpos` and `vpos` is incorrect, but 
>> unless I'm missing something, it still seems like the concept still needs to 
>> be described.
> 
> I assume that a very long time ago, there were hpos and vpos parameters for 
> this method. And that really required an explanation, because then you could 
> e.g. specify hpos=RIGHT and vpos=BOTTOM, which would give a very strange 
> position for the context menu (the top left corner of the menu would be in 
> the bottom right corner of the button).
> It also was very counter-intuitive that giving CENTER/CENTER for hpos/vpos 
> would put the top left corner of the menu at the top left corner of the 
> button.
> However all this confusion was ended when Side was used instead of HPos/VPos. 
> At that very moment all the confusing cases went away. No more BOTTOM/RIGHT 
> or CENTER/CENTER placement.
> So I think we can really just remove the (obsolete) explanation of hPos/vPos.

I've just "recreated" this PR as https://github.com/openjdk/jfx/pull/383 which 
is based on a separate branch as suggested.

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

PR: https://git.openjdk.java.net/jfx/pull/381

Reply via email to