TextArea exposes the document model, along with formatting and styling
information, via the org.apache.pivot.wtk.text.* classes.

I'm busy building a demo application (basically a wordpad-clone) that
shows off how it works.

-- Noel Grandin

aappddeevv wrote:
> How generically is the RichTextArea being built? I noticed the swing classes
> abstract out the document aspect and I think provides some abstraction on
> the formatting--maybe at the nitty gritty level it like TeX and blocks
> within blocks with glue.
>
> I am asking because I think any styled text widget is great, but I also was
> thinking about html decorated styling. Just wondering out loud.
>
>
> -----Original Message-----
> From: Noel Grandin [mailto:noelgran...@gmail.com] 
> Sent: Monday, June 07, 2010 4:45 AM
> To: dev@pivot.apache.org
> Cc: Greg Brown
> Subject: Re: [RFC] adding components to TextArea
>
> Hi
>
> The new child components are laid out using the existing *NodeView inner
> classes in TextAreaSkin.
> Currently, I set the size of the child components during the layout()
> operation, and I set their position during the paint() operation.
> I have to do it this way because TextAreaSkin only calculates position
> information during paint().
>
> The tricky part is that because the child components are part of the
> normal Component hierarchy, their position is defined with reference to
> the TextArea object, not with reference to the surrounding NodeView objects.
> So I have to pass extra information down the paint() call chain in order
> to set their position correctly.
>
> I see that we're releasing a 1.5.1, so I'll hold off on checking
> anything in until we've released 1.5.1
>
> Regards, Noel.
>
> Greg Brown wrote:
>   
>> I have not looked at the code in any detail, but I had assumed that the
>>     
> sub-components would be arranged in TextAreaSkin#layout(), as is done with
> other containers. Is that feasible?
>   
>> On Jun 4, 2010, at 10:54 AM, Noel Grandin wrote:
>>
>>   
>>     
>>> Hi
>>>
>>> This is my first attempt at the part of PIVOT-31 related to inserting
>>>       
> Component's into TextArea (soon to be RichTextArea).
>   
>>> It seems to be mostly working - I can add components, they follow the
>>>       
> layout properly, and the components can receive mouse events.
>   
>>> I'm asking for comments because there are 2 design decisions I'm not sure
>>>       
> about
>   
>>> (1) in TextAreaSkin I'm passing x and y parameters down the paint()
>>>       
> method chain, because a Component inside a TextArea lives outside the way
> other nodes are painted.
>   
>>> (2) I've changed the listeners quite a lot in the wtk.text package to
>>>       
> better reflect the difference between events fired for text mutation, and
> events fired for node mutation.
>   
>>> Regards, Noel Grandin
>>> <patch1.txt>
>>>     
>>>       
>>   
>>     
>   

Reply via email to