Presentation Layer
Updated on July 15, 2009 by KeiOno
Still under construction!
Introduction
Presentation layer is the set of actual classes which draws network graphics. From 3.0, Cytoscpae can have multiple presentation per view. This means multiple rendering engines can co-exist in an instance of Cytoscape.
Design
Definitions
Data Model
All kinds of data objects, including CyNetwork, CyDataTables, VisualStyles, etc.
View Model
- A map from Visual Property type to a value (color, size, ...)
- One View Model is always associated with a data model.
- A data model can have multiple View Models.
Presentation
Presentation is a visualization of View Model. A View Model can have multiple presentations. In reality, presentation represents a drawing on AWT Canvas or other Swing Components.
API
There are 3 interfaces in Presentation API bundle:
PresentationFactory - Provide a function to add Presentation as Swing Component to a given object.
VisualItemRenderer - Provide a VisualLexicon for
RenderingEngine - Render the scene
1 public interface PresentationFactory {
2 /**
3 * This method should add whatever content it likes to the JInternalFrame for
4 * display. It should also be sure to register said content as a transfer
5 * (Drag 'n Drop) listener, if so desired.
6 */
7 public <T extends View<?>> Renderer<T> addPresentation(Container presentationContainer, T view);
8 }
9
Discussion
Our overall design (model-view-presentation) does not completely equivalent to typical scene graph used in many 3D visualizers. This design is inspired by Prefuse Visualization Toolkit.
Case Study
Visualize Attributes
Relationship between Presentation Layer and Other Modules