You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Chris Bartlett (JIRA)" <ji...@apache.org> on 2010/09/17 17:36:34 UTC

[jira] Commented: (PIVOT-565) Use TextArea in default tooltip rather than Label

    [ https://issues.apache.org/jira/browse/PIVOT-565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910631#action_12910631 ] 

Chris Bartlett commented on PIVOT-565:
--------------------------------------

What about something along the lines of renderers?  Renderer is not quite the right name, and neither are Producer / Provider / Supplier.  TooltipContentBuilder?
I'll continue with the renderer name for the example below.


Create a TooltipRenderer interface which would be used by the ComponentSkin class.

Something along the lines of
public interface TooltipRenderer {
    public Component render(Object component, String tooltipText, Object tooltipData);
}

Add a tooltipRenderer property to Component

Add a tooltipData property to Component to give as much freedom as possible to developers (or just replace tooltipText)


It would be the responsibility of this renderer to supply a Component that will be placed into the tooltip popup window.

A default implementation might just create a Label and set its text to tooltipText.
A custom implementation would be free to generate whatever graph of components it wanted.  It could gather data from the Component parenting the tooltip and/or from the tooltipData object.

This could be the basis of PIVOT-512

This could also be taken further to combine tooltip show & hide delays, specifying transitions, rate & delays to create a TooltipPolicy.

> Use TextArea in default tooltip rather than Label
> -------------------------------------------------
>
>                 Key: PIVOT-565
>                 URL: https://issues.apache.org/jira/browse/PIVOT-565
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>            Reporter: André Thieme
>            Assignee: Greg Brown
>            Priority: Minor
>             Fix For: 2.0
>
>
> This would allow callers to more easily specify tooltips that contain line breaks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.