Cytoscape 2.8.0 API

cytoscape.data.readers
Class VisualStyleBuilder

java.lang.Object
  extended by cytoscape.data.readers.VisualStyleBuilder

public class VisualStyleBuilder
extends Object

Based on the graph/node/edge view information, build new Visual Style. This class accepts style properties and adds hidden Cytoscape attributes that will be used to actually create the style.


Constructor Summary
VisualStyleBuilder(String name)
          Build a new VisualStyleBuilder object whose output style will be called "name".
VisualStyleBuilder(String name, boolean addOvAttr)
          Build a new VisualStyleBuilder object whose output style will be called "name".
VisualStyleBuilder(String newName, Map nodeGraphics, Map edgeGraphics, Map globalGraphics)
          Deprecated. this should no longer be used and is not functional. Use VisualStyleBuilder(String) instead and then call addProperty for each value
 
Method Summary
 void addProperty(String id, VisualPropertyType type, String desc)
          This method actually adds a property to be considered for inclusion into the resulting style.
 void buildStyle()
          Actually build the style using the provided properties
 void setBackgroundColor(Color backgroundColor)
          Set the background color for the style we build.
 void setNodeSizeLocked(boolean pLock)
          This method lock/unlock the size object (Node Width, Node Height) in NodeAppearanceCalculator If unlocked, we can modify both width and height of node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisualStyleBuilder

public VisualStyleBuilder(String name)
Build a new VisualStyleBuilder object whose output style will be called "name".

Parameters:
name - the name of the visual style that will be created.

VisualStyleBuilder

public VisualStyleBuilder(String newName,
                          Map nodeGraphics,
                          Map edgeGraphics,
                          Map globalGraphics)
Deprecated. this should no longer be used and is not functional. Use VisualStyleBuilder(String) instead and then call addProperty for each value

Build a new VisualStyleBuilder object whose output style will be called "name" based on JAXB Graphics objects. This constructor is no longer used and is not supported.

Parameters:
newName - the name of the visual style that will be created.
nodeGraphics - the map of node to JAXB Graphics object
edgeGraphics - the map of edge to JAXB Graphics object
globalGraphics - the map of network to JAXB Graphics object

VisualStyleBuilder

public VisualStyleBuilder(String name,
                          boolean addOvAttr)
Build a new VisualStyleBuilder object whose output style will be called "name".

Parameters:
name - the name of the visual style that will be created.
addOvAttr - not used.
Method Detail

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)
Set the background color for the style we build. We need to do this because our VisualStyleProperty stuff doesn't support global styles.

Parameters:
backgroundColor - the color

buildStyle

public void buildStyle()
Actually build the style using the provided properties


addProperty

public void addProperty(String id,
                        VisualPropertyType type,
                        String desc)
This method actually adds a property to be considered for inclusion into the resulting style.

Parameters:
id - the id of the node or edge
type - the type of the property
desc - the property value

setNodeSizeLocked

public void setNodeSizeLocked(boolean pLock)
This method lock/unlock the size object (Node Width, Node Height) in NodeAppearanceCalculator If unlocked, we can modify both width and height of node

Parameters:
pLock -

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.