I'm amazed that this is something that needs to be done from scratch(?).
The way I was thinking of doing it:
- Overriding DefaultStyledDocument's insertString() method to insert a
"\n\u25CF\t" (new line + unicode for bullet + tab) whenever a \n is
recieved.
- Creating a custom TabStop that is used whenever there is a bullet list
- The Paragraph style in a bullet list must get a positive LeftIndent and a
negative FirstLineIndent to give the impression of 'hanging indent' that we
see in tab lists.
This solves some issues, but it's only the beginning.
- What happens when the user selects some text (including bullets) - the
bullets must behave like bullets, not just regular characters
- Deletion of lines
- Correct mouse/arrows navigation through bulleted paragraphs
Has anyone done this? Any hints? Code? :)
Best regards,
Bjørn Børresen
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
A custom View, ViewFactory, etc. will probably be the cleanest way.
Jim S.
--
Remove my extraneous mandibular appendages to reply via email.