pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique de Vito <ddv36...@yahoo.fr>
Subject Re : about label multiline wrapping - Re : basic questions about common table renderers
Date Mon, 17 May 2010 13:25:58 GMT
Is there a way in Pivot to mimic the HTML wrapping style ?
Is there a way to do it through a given XXXPane ?

Or is it possible to imagine:
<Label text="blah blah blah" wrappingSeparator=" "/>
or with good default settings 
<Label text="blah blah blah"/>
?

Thanks



----- Message d'origine ----
De : Greg Brown <gkbrown@mac.com>
À : user@pivot.apache.org
Envoyé le : Lun 17 mai 2010, 15h 07min 44s
Objet : Re: about label multiline wrapping - Re : basic questions about common table renderers

Good question. No, labels within flow panes don't wrap. FlowPane wouldn't know where or how
to break the label's text - it lays out components based on their unconstrained preferred
sizes. For a Label, this is the size of the unwrapped text.

However, you could accomplish this by setting an explicit preferred width on your Label. That
will force the label to break at that width:

<Label text="blah" preferredWidth="200"/>

On May 17, 2010, at 5:37 AM, Dominique de Vito wrote:

> Hi,
> 
> First, thanks Greg about the hint to replace "TableView" with "TablePane".
> 
> One more question.
> It's said into the doc: "Flow panes arrange components in a horizontal line, wrapping
when the contents don't fit on a single line."
> But, when I put, first, buttons into my flow pane, and next, a long label, this label
is NOT wrapped into multilines (as I need), and then, only the first characters of this label
appear (the characters that fit the width of my flow pane).
> Note that I want to add, after this label, a few more buttons. So, in a perfect world,
this label ends into the 2nd line, I expect following buttons to be added just after into
the 2nd line too.
> 
> Is there a way to wrap a label content (into a flow pane) within multilines ?
> 
> Thanks.
> 
> Dominique
> 
> 
> 
> 
> ----- Message d'origine ----
> De : Greg Brown <gkbrown@mac.com>
> À : user@pivot.apache.org
> Envoyé le : Dim 16 mai 2010, 14h 27min 38s
> Objet : Re: basic questions about common table renderers
> 
> I assume that the button needs to be interactive (i.e. pushing it will trigger an action)?
If so, you probably want to use TablePane rather than TableView. Cell renderers don't support
any kind of user interaction - they are simply used to "rubber stamp" content into a table
view. In other words, they are used for presentation, not interaction. TablePane is for laying
out components, such as buttons, and functions more like an HTML table.
> 
> On May 16, 2010, at 4:55 AM, Dominique de Vito wrote:
> 
>> Hi,
>> 
>> I am fed up of Twitter web interface, then I currently look at Pivot in order to
develop my own Twitter RIA client.
>> 
>> My first idea was about to include tweets into a table.
>> 
>> I wanted to include a PushButton into a cell, and then, I was looking around to know
how to render such a button (into a cell) like a button !
>> 
>> I expected to discover a renderer into Pivot distribution in order to render common
components like PushButton, or Label. AFAIK, there is none.
>> And I have not discovered a (simple) way to render such a button as a cell's content.
>> 
>> I hope not to ask dumb questions here...
>> Is there already defined renderers for common components, like button, into tables
?
>> If yes or no, it could be worth to add few notes into http://pivot.apache.org/tutorials/
page in order to talk about cell renderers too, existing ones, or to include a link to a page
detailling how to define custom renderer (like the case I mentionned above).
>> 
>> Thanks.
>> 
>> Regards,
>> Dominique
>> http://jroller.com/dmdevito/
>> 
>> 
>> 
>> 
> 
> 
> 
> 


      


Mime
View raw message