+1
as always: great idea, Elias
ekke
Am 28.07.10 01:03, schrieb Elias Volanakis:
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.
--
ekke (ekkehard gentz)
independent software-architect
senior erp-consultant
eclipse | osgi | equinox | mdsd | oaw | emf |
uml
max-josefs-platz 30, D-83022 rosenheim, germany
mailto:ekke@xxxxxxxxxxxxxxxx
homepage (de): http://gentz-software.de
blog (en): http://ekkes-corner.org
twitter: @ekkescorner
skype: ekkes-corner
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID:
DE189929490
|