[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
AW: [riena-dev] Mechanism for setting default tree images
|
+1
-----Ursprüngliche Nachricht-----
Von: riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-bounces@xxxxxxxxxxx] Im Auftrag von Elias Volanakis
Gesendet: Mittwoch, 28. Juli 2010 01:03
An: Riena Developers list; Barth, Heiko
Betreff: [riena-dev] Mechanism for setting default tree images
Hi Heiko and riena-dev,
I've been thinking about the TreeRidgetLabelProvider today.
I'm not happy with the way it uses some hacks ("magic" strings from
the widget -- see TRLP.TREE_KIND_KEY and TRLP.TREE_KIND_NAVIGATION) to
use different default icons in trees from the navigation bundle.
Instead I propose to use a setter to configure a trio of default
images for open node, close node, leaf (strategy pattern). This would
remove any navigation specific code from TRLP and simplify the logic a
lot. The images are used when no image is given via a formatter or via
the model. API would look like this:
treeRidget.setDefaultImages(new NavigationTreeImages());
Riena would come with three strategies (the user can implement more):
(a) NavigationTreeImages: set when configuring the navigation tree
ridget in SWTModuleController - uses images from LnFKeyConstants
SUB_MODULE_TREE_FOLDER_{OPEN, CLOSED}_ICON
(b) WorkareaTreeImages: default strategy used when nothing else is
provided - uses images from
LnFKeyConstants.WORKAREA_TREE_FOLDER_{OPEN,CLOSED}_ICON
(c) SnippetTreeImages: uses SharedImages - the Ridget would use this
instead of WorkareaTreeImages when it detects no OSGi - needed for the
Snippets
Thoughts and feedback?
Kind regards,
Elias.
--
Elias Volanakis | Technical Lead | http://eclipsesource.com
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | @evolanakis
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev
-------------------------------------------------------------
compeople AG
Untermainanlage 8
60329 Frankfurt/Main
fon: +49 (0) 69 / 27 22 18 0
fax: +49 (0) 69 / 27 22 18 22
web: http://www.compeople.de/
Vorstand: Jürgen Wiesmaier
Aufsichtsratsvorsitzender: Christian Glanz
Sitz der Gesellschaft: Frankfurt/Main
Handelsregister Frankfurt HRB 56759
Ust-Ident.-Nr: DE207665352
-------------------------------------------------------------