[[BackLinksMenu]] [[TicketQuery(summary=SCENE_COMMONS_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|)]] = Analysis = == Overview == The page scene is responsible for displaying objects inside the page work area. The page scene provides an object model for the contents of the page work area. It is supposed that different implementations of the scene should exist. They will actually display the given model using the primitives of some library. Base scene is a mediator that contstructs the object model and then uses a concrete implementation to get the graphical result. == Task requirements == * Define the elements of the scene model. * The model should be able to handle different page elements. * The scene should be able to provide a swing component. == Task result == The result of this task should be source code. == Implementation idea == Probably it will be good to have these elements in the model: * Frame * Swing component == Related == * [wiki:SCENE_POINT_R0] * [wiki:SCENE_AUDIO_POINT_R0] * [wiki:SCENE_VIDEO_POINT_R0] == How to demo == * Describe the model * Show the interfaces/classes. = Design = * We will use the Composite design pattern to build our model. * Here is the UML diagram for the object model [[Image(source:trunk/sophie2-platform/doc/uml-design-diagrams/SceneObjectModel.png)]] [[BR]] * Each element's graphic will have its own coordinate system * Each element contains an affine transformation that will position the element at the correct place. * Element style is supposed hold information about borders, opacity, shadows, etc. * Each element belongs to a layer. * The higher the layer the closer the object is to the viewer. * If the an object has no layer set, it inherits it from its parent object(ultimately the scene). * In each layer objects are sorted by their index in the scene object tree. * There will be Scene objects. They'll hold the information about the whole scene. * Swing element provisioning mechanism should be provided in the module class. To be done in SCENE_POINT task. Demo: [changeset:771] = Implementation = * Done according to design: [source:trunk/sophie2-platform/modules/org.sophie2.base.scene/src/main/java/org/sophie2/base/scene@880 Base Scene] = Testing = = Comments = = Log = [[Include(wiki:SCENE_COMMONS_R0_LOG)]]