[
https://issues.apache.org/jira/browse/PIVOT-565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886723#action_12886723
]
André Thieme commented on PIVOT-565:
------------------------------------
I am aware of PIVOT-394 and just thought that such a constructor would be
very convenient. Nearly 100% of all tooltips will contain text. So a constructor
accepting text makes sense. If this constructor would create a TextArea
implicitly under the hood then this would not allow only for short single line
Tooltips, but at the same time for multiline ones.
Also this issue was about the setTooltipText method.
Please reconsider if users really prefer
TextArea ta = new TextArea();
ta.setText("Hello\nWorld");
new Tooltip(ta);
over
new Tooltip("Hello\nWorld");
And how much already written code would break if a Tooltip had again
a String constructor (additionally to the new Component one which totally
makes sense)?
Plus setTooltipText could stay as it is, just providing a TextArea
under the hood.
> New multiline text Tooltip constructor
> --------------------------------------
>
> Key: PIVOT-565
> URL: https://issues.apache.org/jira/browse/PIVOT-565
> Project: Pivot
> Issue Type: Improvement
> Components: wtk
> Reporter: André Thieme
> Fix For: 2.0
>
>
> Please add a third org.apache.pivot.wtk.Tooltip constructor that takes a
> string.
> This would then construct a tooltip that can potentially display multiline
> text.
> This solution offers greater compatibility and less breakage to earlier
> versions
> of Pivot, and at the same time probably covers 99% of all Tooltip usage.
> new Tooltip("This\nis\na\nmultiline\nTooltip\ntext");
> Also the setTooltipText of the Component class could use a TextArea under the
> hood by default, allowing for
> myButton.setTooltipText("Multiline\nTooltip\ntext");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.