Changes between Version 16 and Version 17 of PAGE_ELEMENT_GROUPING_R0


Ignore:
Timestamp:
05/21/09 12:53:28 (16 years ago)
Author:
kyli
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PAGE_ELEMENT_GROUPING_R0

    v16 v17  
    126126== New design == 
    127127 
    128  * Define an interface '''ElementContainer''' which will contain elements. It will have the following methods: 
    129    * Prop<ElementContainer> parentContainer(), providing the parent container of this one. 
    130    * RwListProp<PageElement> elements(), all the elements that this container owns. 
     128 * Rename the  interface PageElement to '''GroupElement'''. Add the following methods: 
     129   * Prop<ElementContainer> getParent(), providing the parent container of this element. 
    131130 * Define an interface '''GroupContainer''' which contains Groups. It will have the following methods: 
    132   * Prop<GroupContainer> parentContainer(), providing the parent GroupContainer of the class implementing it. 
    133   * RwListProp<Group> groups(), all the groups this container owns. 
    134  * The '''Page''' will implement GroupContainer - it will have grou(s) of frames / of other groups. Page will not have a parentContainer - it will be initially set to null. The Group whose parent container is a Page is a root group.  
    135  * The '''Frame''' will implement ElementContainer - it will have parent ElementContainer - a group. 
    136  * Define class '''Group''' which will handle grouping, ungrouping and group navigation. It will implement the GroupContainer, ElementContainer and will extend Resource. The Group class should have two static methods which will do exactly what is supposed for grouping of elements: 
    137   * public static Group createGroup(Page page, List<ElementContainer> elements, List<GroupContainer> groups) - which will create a Group from given groups and elements. 
     131  * Prop<GroupContainer> getParent(), providing the parent GroupContainer of the class implementing it.  
     132  * RwListProp<PageElement> elements(), all the elements this container owns. They can be other groups. 
     133 * The '''Page''' will implement GroupContainer - it will have GroupElements. Page will not have a parentContainer - it will be initially set to null. The Group whose parent container is a Page is a root group.  
     134 * The '''Frame''' will implement GroupElement - it will have parent GroupContainer. 
     135 * Define class '''Group''' which will handle grouping, ungrouping and group navigation. It will implement the GroupContainer, GroupElement and will extend Resource. The Group class should have two static methods which will do exactly what is supposed for grouping of elements: 
     136  * public static Group createGroup(Page page, List<GroupElement> elements) - which will create a Group from given elements. 
    138137  * public static void deleteGroup(Group group) - which will ungroup a previously created group. 
    139138  * void enterGroup() - which will set the current group to this one and view it as a root group. 
    140139  * void exitGroup() - which will go one level up in the group tree. If the current group is a root one, does nothing. 
    141  * '''Examples''': 
    142   * Grouping three frames will end up having the following tree in the model: 
    143 {{{ 
    144                                     page 
    145                                      | 
    146                                      | 
    147                                      | 
    148                                   @Own-ed  
    149                               groups(size==1) 
    150                                 / 
    151                                / 
    152                               /  
    153                             group[0] 
    154                             /      \ 
    155                            /        \ 
    156                        @Own-ed       @Own-ed                                  
    157                   elements(size==3)  groups(size==0)  
    158                        / |  \    
    159                       /  |   \ 
    160                      /   |    \ 
    161                     /    |     \ 
    162               frame1  frame2  frame3 
    163                   /       |       \ 
    164                  /        |        \ 
    165                 /         |         \ 
    166          @Own-ed        @Own-ed      @Own-ed 
    167 elements(size=0)  elements(size=0)   elements(size=0) 
    168      
    169 }}} 
    170  * We have one group and clicking on either frame should select all the group. 
     140 * Clicking on either frame of a group should select all the group. 
    171141 * The actual grouping control will be done through the HaloButtons created for this. 
    172142  * Selected elements will be able to be grouped. 
     
    183153 
    184154= Comments = 
    185  
    186  * We introduce a parent-child relationship but this will be quite radical, since the Frame has a parent Page while the Page has a parent Book. 
    187   * Having a parent-child relationship will enforce to have something in between the Frame and Page. If the Frame is @Own by something other than the Page it will enforce to change the model so that other things that depend on Page<=>Frame, parent<=>child relationship will require more computations. Besides grouping of frames is only for selecting and editing purposes.