Changes between Version 28 and Version 29 of PAGE_ELEMENT_GROUPING_R0


Ignore:
Timestamp:
05/25/09 14:18:41 (16 years ago)
Author:
kyli
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PAGE_ELEMENT_GROUPING_R0

    v28 v29  
    6767 
    6868= Design = 
    69  
    70  * Rename the  interface PageElement to '''GroupElement'''. Add the following methods: 
    71    * GroupContainer getParent(), providing the parent container of this element. 
    72  * Define an interface '''GroupContainer''' which contains Groups. It will have the following methods: 
     69 * Make implementation ResourcePageElement of the PageElement interface, which extends Resource.  
     70 * Define an interface '''ElementContainer''' which contains PageElements. It will have the following methods: 
    7371  * GroupContainer getParent(), providing the parent GroupContainer of it.  
    74   * RwListProp<ResourceRef> elements(), all the elements this container owns. They can be other groups. 
    75  * 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. Rename the property Prop<ResourceRef>frames() to Prop<ResourceRef>emelents(), expect problems with the templates  
    76  * The '''Frame''' will implement GroupElement - it will have parent GroupContainer. 
    77  * 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: 
    78   * public static Group createGroup(List<GroupElement> elements) - which will create a Group from given elements. The grouping should find the common parent of the both elements and move them with their subtrees to a new group. If they do not have a common parent, they should not be grouped. 
     72  * RwListProp<ResourceRef> resourceElements(), all the resource elements this container owns. They can be other groups, frames, etc. 
     73  * RwListProp<PageElement> pageElements(), all the page elements, which are not resources.  
     74 * The '''Page''' will implement GroupContainer - it will have elements. Page will not have a parent container. Rename the property Prop<ResourceRef>frames() to Prop<ResourceRef>resourceElements() 
     75 * The '''Frame''' will implement ResourcePageElement - it will have parent ElementContainer. 
     76 * Define class '''Group''' which will handle grouping, ungrouping and group navigation. It will implement the ElementContainer and ResourcePageElement. The Group class should have: 
     77  * public Group createGroup(List<PageElement> elements) - which will create a Group from given elements. They should be first children of the given one. 
    7978  * public static void deleteGroup(Group group) - which will ungroup a previously created group. 
    80   * void enterGroup() - which will set the current group to this one. If it is not in the subtree of the previously current group, does nothing. 
    81   * void exitGroup() - which will go one level up in the group tree. If the current group is a root one, does nothing. 
    82   * This class must provide functionalities for moving, resizing, rotating. It is different from the multi_select operations, since rotating a group does not rotate every element inside the group, but the elements altogether. This may be postponed for the next revision. 
    8379 * Create class GroupView, which has a corresponding sceneElement. The sceneElement will consist of composition of the contained frame elements. 
    8480 * Clicking on either frame of a group should select all the group. For this, create a property currentGroup() in the PageWorkArea and watch for it in the PageElementLogic. 
     
    8884  * Both halo buttons will appear on selecting more than one frame. 
    8985 * Group navigation must be present: 
    90   * Navigating one level up is just calling the group's parent container. 
    91   * For going down one level, we need ability to enter a group's subtree by given node element. 
    92  * Actual group navigation UI will be implemented during the next revision. 
     86  * Navigating one level up. 
     87  * Going down one level. 
    9388 
    9489Test are written already, they will need to be refactored during the implementation phase. [http://sophie2.org/trac/browser/trunk/sophie2-platform/modules/org.sophie2.base.model.book/src/test/java/org/sophie2/base/model/book/GroupTest.java GroupTest.java]