incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svante Schubert <svante.schub...@gmail.com>
Subject Re: how can I style a list using OdfTextListStyle?
Date Mon, 09 Apr 2012 16:41:09 GMT
On 03.04.2012 18:29, Grzegorz Kaczor wrote:
> 2012/3/31 Devin Han <devinhan@apache.org>
>
>> Please reference this demo:
>> http://incubator.apache.org/odftoolkit/simple/demo/demo4.html
>> and this description in cookbook:
>>
>> http://incubator.apache.org/odftoolkit/simple/document/cookbook/Text%20Document.html#List
>>
>> Now, List API support 3 types of lists, ListType.BULLET, ListType.NUMBER
>> and ListType.IMAGE. The default created list is ListType.BULLET, bullet
>> list. How to create a number list or a image list then? ListDecorator has
>> powerful functions that can help you. ListDecorator is an interface which
>> decides how to decorate a list and its list items. We supply 4
>> implementations of this interface, BulletDecorator, NumberDecorator,
>> ImageDecorator and OutlineDecorator.
>>
>>     // create a number list.
>>        ListDecorator numberDecorator = new NumberDecorator(document1);
>>
>>        List numberList1 = document1.addList(numberDecorator);
>>
>>        List numberList2 = new List(document1, numberDecorator);
>>
>>
>> You can implement your own ListDecorator as need, or extend the default
>> four implementations.
>>  You can remove a list from the document, the following two methods are
>> same.
>>
> Thank you for your response. From this I deduce that I cannot use a list
> style from the document and just assign it to a paragraph or item... it
> would be useful.
>
>
I agree that it would be useful and in the end is what all user expects.
For instance there might be a default decorator behind the scenes
dependent of the list type (bullet, number or image) or heading
(outline) the style is using.
Guess there was just time to implement it.
I personally will not invest time atm, as I think it is more important
to improvement the lower levels (DOM - as source code generation) - to
ease problem solution in the higher level (e.g. simple API), like the
following feature -
https://issues.apache.org/jira/browse/ODFTOOLKIT-182

Happy Easter,
Svante


Mime
View raw message