Differences between revisions 1 and 2
Revision 1 as of 2007-10-29 19:32:01
Size: 3500
Editor: nebbiolo
Comment:
Revision 2 as of 2007-10-29 19:34:51
Size: 3582
Editor: nebbiolo
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
Creating and applying VisualStyles in Cytoscape is currently very cumbersome. Recent improvements to the VizMapper code have simplified some things, but others remain. Creating and applying !VisualStyles in Cytoscape is currently very cumbersome. Recent improvements to the !VizMapper code have simplified some things, but others remain.
Line 17: Line 17:
The primary difficulty in creating visual styles is the many layers of objects that need to be created for VisualStyles to work. Users need to create or get the following: The primary difficulty in creating visual styles is the many layers of objects that need to be created for !VisualStyles to work. Users need to create or get the following:
Line 20: Line 20:
 * The NodeAppearanceCalculator.
 * The EdgeAppearanceCalculator.
  * The GlobalAppearanceCalculator.
 * The VisualStyle.
 * The VisualMappingManager.
 * The !NodeAppearanceCalculator.
 * The !EdgeAppearanceCalculator.
 * The !GlobalAppearanceCalculator.
 * The !VisualStyle.
 * The !VisualMappingManager.
Line 27: Line 27:
Applying visual styles is also complicated, because there are apparently different ways to do this. There is a setVisualStyle method on CyNetworkView and there is one in VisualMappingManager. Which should be used? Should you use CyNetworkView.applyVizMapper() or VisualMappingManager.applyAppearance()? Applying visual styles is also complicated, because there are apparently different ways to do this. There is a setVisualStyle method on !CyNetworkView and there is one in !VisualMappingManager. Which should be used? Should you use !CyNetworkView.applyVizMapper() or !VisualMappingManager.applyAppearance()?
Line 44: Line 44:
 * Simplify event handling and where/when visual styles are applied.

RFC Name : Visual Style Simplification

Editor(s): MikeSmoot

Date: 10/29/07

Status: open

TableOfContents([2])

Proposal

Simplify the process of creating and applying VisualStyles in Cytoscape for plugin writers and the core.

Background

Creating and applying VisualStyles in Cytoscape is currently very cumbersome. Recent improvements to the VizMapper code have simplified some things, but others remain.

The primary difficulty in creating visual styles is the many layers of objects that need to be created for VisualStyles to work. Users need to create or get the following:

  • A mapping for the attribute in question.
  • A Calculator for the particular visual attribute and mapping.
  • The NodeAppearanceCalculator.

  • The EdgeAppearanceCalculator.

  • The GlobalAppearanceCalculator.

  • The VisualStyle.

  • The VisualMappingManager.

  • Possibly the calculator catalog.

Applying visual styles is also complicated, because there are apparently different ways to do this. There is a setVisualStyle method on CyNetworkView and there is one in VisualMappingManager. Which should be used? Should you use CyNetworkView.applyVizMapper() or VisualMappingManager.applyAppearance()?

Use Cases

A plugin writer wants to associate a data attribute with a visual attribute.

Implementation Plan

The should be relatively straightforward as all of the necessary code exists, it's just distributed in different places. I envision a limited number of interfaces that users will interact with:

  1. A Mapping object that also identifies the visual attribute that should be set. This means that the Calculator stuff can go away, or at least be hidden.
  2. The mapping object should be added directly to the VisualStyle object, which means we can bypass the NodeAppearanceCalculator nonsense.

  3. Simplify application of the visual style to one place, either CyNetworkView or VisualMappingManager.

Other considerations:

  • Simplify the VisualStyle and Mapping interfaces so that the can be easily implemented by plugin writers.

  • Simplify event handling and where/when visual styles are applied.

Project Management

This will break interfaces, so this is 3.0 thing.

Project Timeline

All of the code exists, it just needs to be reshuffled. This could probably be accomplished in about 1 month's time.

Project Dependencies

Anything that depends on the VizMapper, which is to say everything, will probably break to one degree or another. This is not a change to make lightly. Best done along with everything else for 3.0.

Issues

This will break many, many things.

Comments

  • Add comment here…

How to Comment

Edit the page and add your comments under the provided header. By adding your ideas to the Wiki directly, we can more easily organize everyone's ideas, and keep clear records. Be sure to include today's date and your name for each comment. Try to keep your comments as concrete and constructive as possible. For example, if you find a part of the RFC makes no sense, please say so, but don't stop there. Take the extra step and propose alternatives.

Visual_Style_Simplification (last edited 2009-02-12 01:03:28 by localhost)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux