On 07-Dec-19 10:28 AM, Sergey Bylokhov wrote:
On 12/6/19 7:24 pm, Prasanta Sadhukhan wrote:
How other components which may use HTML inside calculates its preferred size? I do not remember that they additionally scale the values returned by the View.

Maybe those components does not use preferredSize calculation as JTooltip does.

Even if it not used, the preferredSize of the components and views should return correct values.


getPreferredSize() is called from ToolTipManager but it is done *before *calling Tooltip.show() which actually triggers PropertyChangeEvent with "graphicsConfiguration" property.

Now, View is updated by calling BasicHTML.updateRenderer() when "graphicsConfiguration" property is fired to notify transform is changed, so during preferredSize() call, the View has not yet been updated with correct transform.

So, my proposed fix is still same

http://cr.openjdk.java.net/~psadhukhan/8213535/webrev.1/

Regards
Prasanta

Reply via email to