carriage returns

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

carriage returns

Robert Piotrowski-2
in this example :http://pivot.apache.org/tutorials/text-areas.html

How did you get carriage-returns to show in the text area?

I tried 
 &#10: and other things, but nothing works.



Bob
Reply | Threaded
Open this post in threaded view
|

Re: carriage returns

Robert Piotrowski-2
Actually, they work in TextArea, but not in Lists.

Are they supposed to?



Bob

On Mon, May 10, 2010 at 11:07 AM, Robert Piotrowski <[hidden email]> wrote:
in this example :http://pivot.apache.org/tutorials/text-areas.html

How did you get carriage-returns to show in the text area?

I tried &#13; &#10: and other things, but nothing works.



Bob

Reply | Threaded
Open this post in threaded view
|

Re: carriage returns

Greg Brown
Administrator
They should work in ListView renderers as well. Probably has something to do with your overall renderer structure. What are you using as a base class for the renderer?

On May 10, 2010, at 12:09 PM, Robert Piotrowski wrote:

Actually, they work in TextArea, but not in Lists.

Are they supposed to?



Bob

On Mon, May 10, 2010 at 11:07 AM, Robert Piotrowski <[hidden email]> wrote:
in this example :http://pivot.apache.org/tutorials/text-areas.html

How did you get carriage-returns to show in the text area?

I tried &#13; &#10: and other things, but nothing works.



Bob


Reply | Threaded
Open this post in threaded view
|

Re: carriage returns

Robert Piotrowski-2
I was just using the standard list items.

I think I found a decent way of making a search result list:  using a vertically-aligned and scrollable boxpane with alternating separators and text areas.  Good enough for now.




On Mon, May 10, 2010 at 11:47 AM, Greg Brown <[hidden email]> wrote:
They should work in ListView renderers as well. Probably has something to do with your overall renderer structure. What are you using as a base class for the renderer?

On May 10, 2010, at 12:09 PM, Robert Piotrowski wrote:

Actually, they work in TextArea, but not in Lists.

Are they supposed to?



Bob

On Mon, May 10, 2010 at 11:07 AM, Robert Piotrowski <[hidden email]> wrote:
in this example :http://pivot.apache.org/tutorials/text-areas.html

How did you get carriage-returns to show in the text area?

I tried &#13; &#10: and other things, but nothing works.



Bob



Reply | Threaded
Open this post in threaded view
|

Re: carriage returns

Greg Brown
Administrator
Ah, so you were not using a custom list item renderer? That makes more sense - by default, list items don't wrap.

BoxPane/separator solution sounds pretty reasonable.


On May 10, 2010, at 2:06 PM, Robert Piotrowski wrote:

I was just using the standard list items.

I think I found a decent way of making a search result list:  using a vertically-aligned and scrollable boxpane with alternating separators and text areas.  Good enough for now.




On Mon, May 10, 2010 at 11:47 AM, Greg Brown <[hidden email]> wrote:
They should work in ListView renderers as well. Probably has something to do with your overall renderer structure. What are you using as a base class for the renderer?

On May 10, 2010, at 12:09 PM, Robert Piotrowski wrote:

Actually, they work in TextArea, but not in Lists.

Are they supposed to?



Bob

On Mon, May 10, 2010 at 11:07 AM, Robert Piotrowski <[hidden email]> wrote:
in this example :http://pivot.apache.org/tutorials/text-areas.html

How did you get carriage-returns to show in the text area?

I tried &#13; &#10: and other things, but nothing works.



Bob




Reply | Threaded
Open this post in threaded view
|

Re: carriage returns

Robert Piotrowski-2
When I get some free time at work, I might look into making a formatted textarea that accepts markup in xhtml or xml.  I don't have the stomach for piecing together labels to create formatted text.

Or maybe I'm just too old for that....



Bob



On Mon, May 10, 2010 at 1:29 PM, Greg Brown <[hidden email]> wrote:
Ah, so you were not using a custom list item renderer? That makes more sense - by default, list items don't wrap.

BoxPane/separator solution sounds pretty reasonable.


On May 10, 2010, at 2:06 PM, Robert Piotrowski wrote:

I was just using the standard list items.

I think I found a decent way of making a search result list:  using a vertically-aligned and scrollable boxpane with alternating separators and text areas.  Good enough for now.




On Mon, May 10, 2010 at 11:47 AM, Greg Brown <[hidden email]> wrote:
They should work in ListView renderers as well. Probably has something to do with your overall renderer structure. What are you using as a base class for the renderer?

On May 10, 2010, at 12:09 PM, Robert Piotrowski wrote:

Actually, they work in TextArea, but not in Lists.

Are they supposed to?



Bob

On Mon, May 10, 2010 at 11:07 AM, Robert Piotrowski <[hidden email]> wrote:
in this example :http://pivot.apache.org/tutorials/text-areas.html

How did you get carriage-returns to show in the text area?

I tried &#13; &#10: and other things, but nothing works.



Bob





Reply | Threaded
Open this post in threaded view
|

Re: carriage returns

Greg Brown
Administrator
In case you do end up working on it, there is already a ticket for this in JIRA:


On May 10, 2010, at 4:00 PM, Robert Piotrowski wrote:

When I get some free time at work, I might look into making a formatted textarea that accepts markup in xhtml or xml.  I don't have the stomach for piecing together labels to create formatted text.

Or maybe I'm just too old for that....



Bob



On Mon, May 10, 2010 at 1:29 PM, Greg Brown <[hidden email]> wrote:
Ah, so you were not using a custom list item renderer? That makes more sense - by default, list items don't wrap.

BoxPane/separator solution sounds pretty reasonable.


On May 10, 2010, at 2:06 PM, Robert Piotrowski wrote:

I was just using the standard list items.

I think I found a decent way of making a search result list:  using a vertically-aligned and scrollable boxpane with alternating separators and text areas.  Good enough for now.




On Mon, May 10, 2010 at 11:47 AM, Greg Brown <[hidden email]> wrote:
They should work in ListView renderers as well. Probably has something to do with your overall renderer structure. What are you using as a base class for the renderer?

On May 10, 2010, at 12:09 PM, Robert Piotrowski wrote:

Actually, they work in TextArea, but not in Lists.

Are they supposed to?



Bob

On Mon, May 10, 2010 at 11:07 AM, Robert Piotrowski <[hidden email]> wrote:
in this example :http://pivot.apache.org/tutorials/text-areas.html

How did you get carriage-returns to show in the text area?

I tried &#13; &#10: and other things, but nothing works.



Bob






Reply | Threaded
Open this post in threaded view
|

Re: carriage returns

Robert Piotrowski-2
I was looking at Flying Saucer and then the source for Pivot's TextArea, and I'm a little lost at a high level.  I'm not that solid on the whole Graphics2D/canvas stuff.

Is the TextAreaSkin.java doing the actual drawing?


For now, I was thinking of using Flying Saucer to create an image and then dropping that into an ImageView.  But then the text wont be selectable, right?



Bob



On Mon, May 10, 2010 at 3:49 PM, Greg Brown <[hidden email]> wrote:
In case you do end up working on it, there is already a ticket for this in JIRA:


On May 10, 2010, at 4:00 PM, Robert Piotrowski wrote:

When I get some free time at work, I might look into making a formatted textarea that accepts markup in xhtml or xml.  I don't have the stomach for piecing together labels to create formatted text.

Or maybe I'm just too old for that....



Bob



On Mon, May 10, 2010 at 1:29 PM, Greg Brown <[hidden email]> wrote:
Ah, so you were not using a custom list item renderer? That makes more sense - by default, list items don't wrap.

BoxPane/separator solution sounds pretty reasonable.


On May 10, 2010, at 2:06 PM, Robert Piotrowski wrote:

I was just using the standard list items.

I think I found a decent way of making a search result list:  using a vertically-aligned and scrollable boxpane with alternating separators and text areas.  Good enough for now.




On Mon, May 10, 2010 at 11:47 AM, Greg Brown <[hidden email]> wrote:
They should work in ListView renderers as well. Probably has something to do with your overall renderer structure. What are you using as a base class for the renderer?

On May 10, 2010, at 12:09 PM, Robert Piotrowski wrote:

Actually, they work in TextArea, but not in Lists.

Are they supposed to?



Bob

On Mon, May 10, 2010 at 11:07 AM, Robert Piotrowski <[hidden email]> wrote:
in this example :http://pivot.apache.org/tutorials/text-areas.html

How did you get carriage-returns to show in the text area?

I tried &#13; &#10: and other things, but nothing works.



Bob







Reply | Threaded
Open this post in threaded view
|

Re: carriage returns

Noel Grandin-2
It's probably easier if you look at the source for something like
Pivot's label - that has less complexity, and you'll get a better feel
for how it fits together.

Basically, in order to make Flying Saucer work you need to do 2 things
(a) make the graphics layer talk to Pivot's graphics layer, which
shouldn't be hard, since Pivot uses Graphics2D and I would guess that
FS is doing the same
(b) pass mouse and keyboard and focus events into FS' event handling
routines, which may be a little harder, because FS is probably
hard-coding the use of various Swing-specific event classes.


On Wed, May 12, 2010 at 22:35, Robert Piotrowski <[hidden email]> wrote:

> I was looking at Flying Saucer and then the source for Pivot's TextArea, and
> I'm a little lost at a high level.  I'm not that solid on the whole
> Graphics2D/canvas stuff.
>
> Is the TextAreaSkin.java doing the actual drawing?
>
>
> For now, I was thinking of using Flying Saucer to create an image and then
> dropping that into an ImageView.  But then the text wont be selectable,
> right?
>
>
>
> Bob
>
>
>
> On Mon, May 10, 2010 at 3:49 PM, Greg Brown <[hidden email]> wrote:
>>
>> In case you do end up working on it, there is already a ticket for this in
>> JIRA:
>> https://issues.apache.org/jira/browse/PIVOT-420
>> On May 10, 2010, at 4:00 PM, Robert Piotrowski wrote:
>>
>> When I get some free time at work, I might look into making a formatted
>> textarea that accepts markup in xhtml or xml.  I don't have the stomach for
>> piecing together labels to create formatted text.
>>
>> Or maybe I'm just too old for that....
>>
>>
>>
>> Bob
>>
>>
>>
>> On Mon, May 10, 2010 at 1:29 PM, Greg Brown <[hidden email]> wrote:
>>>
>>> Ah, so you were not using a custom list item renderer? That makes more
>>> sense - by default, list items don't wrap.
>>> BoxPane/separator solution sounds pretty reasonable.
>>>
>>> On May 10, 2010, at 2:06 PM, Robert Piotrowski wrote:
>>>
>>> I was just using the standard list items.
>>>
>>> I think I found a decent way of making a search result list:  using a
>>> vertically-aligned and scrollable boxpane with alternating separators and
>>> text areas.  Good enough for now.
>>>
>>>
>>>
>>>
>>> On Mon, May 10, 2010 at 11:47 AM, Greg Brown <[hidden email]> wrote:
>>>>
>>>> They should work in ListView renderers as well. Probably has something
>>>> to do with your overall renderer structure. What are you using as a base
>>>> class for the renderer?
>>>> On May 10, 2010, at 12:09 PM, Robert Piotrowski wrote:
>>>>
>>>> Actually, they work in TextArea, but not in Lists.
>>>>
>>>> Are they supposed to?
>>>>
>>>>
>>>>
>>>> Bob
>>>>
>>>> On Mon, May 10, 2010 at 11:07 AM, Robert Piotrowski
>>>> <[hidden email]> wrote:
>>>>>
>>>>> in this example :http://pivot.apache.org/tutorials/text-areas.html
>>>>>
>>>>> How did you get carriage-returns to show in the text area?
>>>>>
>>>>> I tried &#13; &#10: and other things, but nothing works.
>>>>>
>>>>>
>>>>>
>>>>> Bob
>>>>
>>>>
>>>
>>>
>>
>>
>
>