RFC Name : Visual Style Simplification

Editor(s): MikeSmoot

Date: 10/29/07

Status: open

<<TableOfContents: execution failed [Argument "maxdepth" must be an integer value, not "[2]"] (see also the log)>>

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:

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:

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

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