48 | | This is the content of the [wiki:TIMELINES/Design] page that will document the design of the timelines. |
49 | | [[BR]][[BR]][[BR]] |
50 | | [[Include(wiki:TIMELINES/Design)]] |
51 | | [[BR]][[BR]][[BR]] |
52 | | |
53 | | Here follow the internal details like classes, modules, etc. |
54 | | |
55 | | For now, the base classes for timelines will be in the [source:/trunk/sophie2-platform/modules/org.sophie2.base.model.book/src/main/java/org/sophie2/base/model/book org.sophie2.base.model.book module], in a separate package (timelines). If needed, at a later stage, timelines, links and scripting can be separated to their own interactivity module. The base classes for the model are Timeline, Channel, TimelineEntry and EventTimelineEntry. |
56 | | |
57 | | A new module for the UI and manipulation of timelines will be created - org.sophie2.main.func.timelines. It will hold classes for the user interface and the interactions, manipulating the timelines. At first, it will provide a very simple (and ugly) interface for demonstration purposes only ('proof of concept'). It will be changed at the next revision of the task or at some of the other tasks related to timelines. |
58 | | |
59 | | It will contain a table with one row for each channel and one column for each second of the timeline. At first timelines will be with a fixed duration of 10 seconds. Each cell in the timeline will have a checkbox showing whether the corresponding element is visible or not. This table will be placed in a TimelinesPalette in the bottom flap. The existing timelines tab will be removed from the left flap. |
60 | | |
61 | | Here follow a dependency and a class diagram for the timelines model:[[BR]] |
62 | | [[Image(source:/trunk/sophie2-platform/doc/uml-design-diagrams/Timelines-Dependency-Diagram.png)]][[BR]] |
63 | | [[Image(source:/trunk/sophie2-platform/doc/uml-design-diagrams/Timelines-Class-Diagram.png)]][[BR]] |
64 | | |
65 | | Intial tests are provided in the attached patches. |
68 | | As a start, the bottom flap has been added to the application. This required great refactoring of the MDMainWindow class as well as some skinning and other minor fixes. The unnecessary TimelinesTab has been removed as well. [2401] |
69 | | |
70 | | Taking the 'design by contract' approach, extensive javadoc has been written to all methods in the base module. Timeboxing requires reducing the scope so not all of them will be implemented, but still enough information for them is present. [2409] |
71 | | |
72 | | The basic part of the model is implemented with some minor changes to the design. A GroupChannel class is created and timeline entries are only represented by the TimelineEntry class. At the current stage, the intro and outro are not used. There is a channel for each frame instead of each group of page elements (since groups need reimplementation). Event channels are also not implemented at the current stage. [2415], [2435] |
73 | | |
74 | | The basic UI consists of a table containing a row for each channel and a column for each second of the length of the timeline. There's a checkbox in each cell that controls the frame visibility in that second. Playing, pausing, rewinding the timeline and looping is supported from the UI as well. [2458] |
75 | | |
76 | | Final tuning of the classes layout and javadoc was performed in changeset [2466]. |
77 | | |
78 | | Since the user interface is for temoral use only, the UI test has been deleted. [2468] |
79 | | |
80 | | Due to some problems and bugs, there's an additional changeset. It changes the design of the timeline model. Instead of having a list of entries for each channel, this list has been moved to the Timeline class. This is required for timelines to work in preview mode since copying the book (cloning a resource) does not work well with the AutoListProperty groupChannels(). Also, SwingUtilities.invokeLater() is used for synchronious playing of the TimerTasks. [2616] |
81 | | |
82 | | Final tweaks ahve been applied in the last changeset. These include frame rendering and bottom flap. The timelines model needs to be changed in the next iteration so that everything is copied correctly. Now the timeline entries do not update their channels when switching to preview mode and this is somehow fixed, but should be changed. [2807] |