-
New Feature
-
Resolution: Fixed
-
Normal
-
8.0.3
-
None
-
Security Level: Jimmy
-
None
-
None
The XULElement currently possess 2 overloads for the setTooltip method:
https://www.zkoss.org/javadoc/8.0.0/zk/org/zkoss/zul/impl/XulElement.html#setTooltip(org.zkoss.zul.Popup)
https://www.zkoss.org/javadoc/8.0.0/zk/org/zkoss/zul/impl/XulElement.html#setTooltip(java.lang.String)
The first overload accept a popup component only. Using this method, the popup will be used as tooltip, always centered on the pointer, with the default delay (500ms).
The 2nd overload offer more flexibility (can define position (after_end), absolute position (x,y coordinates), delay). However, this method is not convenient to use, as it requires string building, where passing values / component references would be more convenient.
Also, using some composition methods, uuid may not be available while setting the popup, making string building impossible.
This could be improved by adding new overloads for the setTooltip method such as:
setTooltip(Popup popup, String position, Int delay)
setTooltip(Popup popup, float x, float y, Int delay)
etc.
Update:
Should also apply to similar methods (setContext, setPopup)
Should cover all possible attribute set in the String, such as type=toggle for popups, etc.