I think it depends on a few factors such as the actual code complexity, memory footprint and other benefits and capabilities for styled text etc. Its not clear it's a high-priority area for pivot as a project.
I built a read-only text area based on the jse's line breaking support classes, multiple styles and a tiny doc model (and modified the serializer so that free text can be provided between element tags). The code is smaller than the TextArea editing code but not dramatically, and the footprint can be smaller, but its not clear that supporting it would be any less easy than the full editing version in the pivot library. -----Original Message----- From: Greg Brown [mailto:[email protected]] Sent: Thursday, September 09, 2010 10:10 PM To: Pivot Dev Cc: Pivot User Subject: Re: TextArea/RichTextArea By the way, this suggestion doesn't invalidate any of the (extensive) work that Noel has done recently with TextArea. In fact, it wouldn't be possible without it. I'm just wondering if a supporting read-only text pane might be a better long-term strategy than supporting rich text authoring... On Sep 9, 2010, at 9:42 PM, Greg Brown wrote: > Hi all, > > I'm about ready to check in final support for the new TextArea. There are still a few bugs to work out, but it is mostly functional. > > I'd like to raise the question again of what to call the new "rich text area". I'm still pretty excited about the concept of a "TextPane" component - this would be a container whose primary purpose is to support text-based layouts that aren't easily achievable (or even possible) using some of our other layout containers. For example, designers of complex text-based forms could really benefit from such a component. > > The existing (rich) TextArea class can certainly be used for this purpose, but it currently has a lot of baggage since it supports editing. A pure "text pane" wouldn't need such support, so it would significantly simplify the codebase if we were to eliminate it. > > I think there may be a lot more long-term value in a "TextPane" class than a "RichTextArea" component. It would also be a lot easier to maintain (which is a very valid concern in a volunteer-driven effort like Pivot). > > We don't necessarily need to decide right now, but I'm thinking that "TextPane" might be a more appropriate name for this component either way. It also has a bit more parity with the "org.apache.pivot.wtk.text" package, and the view classes, which currently live in org.apache.pivot.wtk.skin, could be moved to org.apache.pivot.wtk.skin.text. > > Let me know what you think. > > G >
