Changes between Version 24 and Version 25 of BASE_DND_R1


Ignore:
Timestamp:
08/19/09 13:14:34 (16 years ago)
Author:
tanya
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BASE_DND_R1

    v24 v25  
    6666  * The ResourceTransferable transfers a resource and fill in the list with the registered datas while going through the extensions that have attached to the extension point. 
    6767 * Using serialization, HotText can be copy/pasted between different Sophie-s. HotAttr, HotPos, HotStyleDef, HotStyleValue, HotUnit should implement Serializable.  
    68   
    69  * Drag and Drop will not be implemented on this revision because it is time consuming. 
    70  * CUT/COPY and PASTE of resources to the OS cannot be implemented. It appears that clipboard operations are limited for Java. For drag and drop operations however it will be possible and SHOULD be implemented. 
    71  * The data flavors for resources will be with DataFlavor.javaSerializedObjectMimeType mime type. An image resource data will have a flavor: 
    72 {{{  
    73 new DataFlavor(DataFlavor.javaSerializedObjectMimeType + "; class=" + ImageResource.class.getName());  
    74 }}} 
    75  * The DndData implementations for resources are going to be as follows: 
    76   * [source:branches/private/peko/sophie2-platform/modules/org.sophie2.base.model.resources/src/main/java/org/sophie2/base/model/resources/dnd/ResourceData.java ResourceData] - a base dnd data for resources. 
    77   * [source:branches/private/peko/sophie2-platform/modules/org.sophie2.main.app.model/src/main/java/org/sophie2/main/app/model/dnd/HotTextResourceData.java HotTextResourceData] - an implementation of the ResourceData for HotTextBookResources. 
    78   * [source:branches/private/peko/sophie2-platform/modules/org.sophie2.main.func.image/src/main/java/org/sophie2/main/func/image/dnd/ImageResourceData.java ImageResourceData] - an implementation of the ResourceData for ImageResources. 
    79   * [source:branches/private/peko/sophie2-platform/modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/dnd/ResourcesListData.java ResourcesListData] - an implementation of the ResourceData for list of resources. 
    80   * Note: for current revision this would be enough for transferring resource between the resources palette and the work area. 
    81   * For every dnd data described above a SophieTransferable implementation will be created. It will manage the resource and some other dnd data as well. For example the [source:branches/private/peko/sophie2-platform/modules/org.sophie2.main.func.image/src/main/java/org/sophie2/main/func/image/dnd/ImageTransferable.java ImageTransferable] will transfer ImageResourceData, ImageData and StringData (see [wiki:BASE_DND_R0]). This will export the image resouce, the image itself and the location of the resource as a string. 
    82    * [source:branches/private/peko/sophie2-platform/modules/org.sophie2.main.func.image/src/main/java/org/sophie2/main/func/image/dnd/ImageTransferable.java ImageTransferable] - transfers image resources, images and the location of the resource. 
    83    * [source:branches/private/peko/sophie2-platform/modules/org.sophie2.main.app.model/src/main/java/org/sophie2/main/app/model/dnd/HotTextTransferable.java HotTextTransferable] - transfers hot text resources, hot text itself and plain text (using StringData) that represents the plain text representation of the hot text. 
    84    * [source:branches/private/peko/sophie2-platform/modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/dnd/ResourcesListTransferable.java ResourcesListTransferable] - transfers a list of resources and a string representing their locations divided by new line character. (this is behavior from gnome). 
    85   * Note that every dnd data and every transferable is placed in the module it depends on (in a package named '''dnd'''). This will guarantee that modules not knowing about ImageResource for example cannot even try to acquire an ImageResourceData where a paste or drop operation is performed. 
    86   * In order to implement copy/cut and paste for the work area, an interaction map for the AuthorPageWorkArea and the AllResourcesPalette should be implemented. This also includes registering their components to the SwingEventAdapter. 
    87   * Copying a list of resources from the resource palette and eventually pasting them in the work area will be handled by an operation in the PageLogic which will fire event for every resource in the list, so that the logics knowing about the resource type given handle the provided resource. 
    88   * '''Note:''' currently copying from the resource palette would copy all the resources that are their. TODO: implement selection in ListPalette that can return more than one selected item. 
    89   * UML diagram: 
    90 [[Image(source:branches/private/peko/sophie2-platform/doc/uml-design-diagrams/uml-resource_data.png)]] 
    91  * Changesets: 
    92   * [changeset:3306] 
    93   * [changeset:3421] 
    94   * [changeset:3455] 
    95   * [changeset:3480] 
    96   * Test: [source:branches/private/peko/sophie2-platform/modules/org.sophie2.author/src/test/java/org/sophie2/author/ResourcesClipboardTest.java ResourcesClipboardTest] - refers to an image in the distrib dir of the test/resources. 
    9768 
    9869= Implementation =