ramido / choosel

Automatically exported from code.google.com/p/choosel
0 stars 0 forks source link

Redefine responsibilities of DefaultView, ViewContentDisplay, ResourceItem, and corresponding item display #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Redefine responsibilities of DefaultView, ViewContentDisplay, ResourceItem, and 
corresponding item display

Original issue reported on code.google.com by Lars.Grammel on 25 Jul 2010 at 10:33

GoogleCodeExporter commented 9 years ago
Requirement: It should depend on the view content display how the actual view 
update works. Two models are possible: updating every resource one by one, or 
doing one major update that changes the whole view. It depends on the actual 
ViewContentDisplay which of those two models is more appropriate.

Original comment by Lars.Grammel on 25 Jul 2010 at 10:39

GoogleCodeExporter commented 9 years ago
Proposed changes:

1. Separate ResourceItem from concrete ResourceItemDisplay objects. 
ResourceItem should be managed by the DefaultView, and is not extended. It will 
contain the state (highlighting, selection) as well as the contained resources 
and the resolved slot values. Each ResourceItem will contain an optional 
reference to the corresponding ResourceItemDisplay for performance reasons (no 
need for hashing).

2. All event and update behavior should be removed from ResourceItem. The 
updating of the ResourceItems should be done by DefaultView, which listens for 
all changes to hover, selection and resource model. That way, the changes can 
be forwarded to the content display at once.

3. The ViewContentDisplay should offer an interface update(addedResourceItems, 
updatedResourceItems, removedResourceItems). The ViewContentDisplay 
implementations should update the corresponding ResourceItemDisplays to update 
the visualization. Doing this in an aggregated way will enable important 
performance improvements.

Original comment by Lars.Grammel on 25 Jul 2010 at 10:59

GoogleCodeExporter commented 9 years ago

Original comment by Lars.Grammel on 26 Jul 2010 at 12:58

GoogleCodeExporter commented 9 years ago

Original comment by Lars.Grammel on 5 Aug 2010 at 6:23

GoogleCodeExporter commented 9 years ago

Original comment by Lars.Grammel on 20 Aug 2010 at 6:26

GoogleCodeExporter commented 9 years ago

Original comment by Lars.Grammel on 8 Sep 2010 at 3:04

GoogleCodeExporter commented 9 years ago

Original comment by Lars.Grammel on 9 Sep 2010 at 12:07