Cytoscape 2.8.0 API

cytoscape.visual
Class EdgeAppearanceCalculator

java.lang.Object
  extended by cytoscape.visual.EdgeAppearanceCalculator
All Implemented Interfaces:
Cloneable

public class EdgeAppearanceCalculator
extends Object

This class calculates the appearance of an Edge. It holds a default value and a (possibly null) calculator for each visual attribute.


Field Summary
protected  List<Calculator> calcs
           
protected static String CLONE_SUFFIX
           
protected  VisualPropertyDependency deps
           
protected  Appearance tmpDefaultAppearance
           
 
Constructor Summary
EdgeAppearanceCalculator()
          Deprecated. Use VisualStyle.getEdgeAppearanceCalculator() or new EdgeAppearanceCalculator( VisualStyle.getDependency() ); Will be removed Jan 2010.
EdgeAppearanceCalculator(EdgeAppearanceCalculator toCopy)
          Copy constructor.
EdgeAppearanceCalculator(String name, Properties eacProps, String baseKey, CalculatorCatalog catalog, VisualPropertyDependency deps)
          Creates a new EdgeAppearanceCalculator and immediately customizes it by calling applyProperties with the supplied arguments.
EdgeAppearanceCalculator(VisualPropertyDependency deps)
          Creates a new EdgeAppearanceCalculator object.
 
Method Summary
protected  void applyProperties(Appearance appr, String name, Properties nacProps, String baseKey, CalculatorCatalog catalog)
           
 void applyProperties(String name, Properties eacProps, String baseKey, CalculatorCatalog catalog)
          DOCUMENT ME!
 void calculateEdgeAppearance(EdgeAppearance appr, Edge edge, CyNetwork network)
          Using the rules defined by the default values and calculators in this object, compute an appearance for the requested Edge in the supplied CyNetwork.
 EdgeAppearance calculateEdgeAppearance(Edge edge, CyNetwork network)
          Using the rules defined by the default values and calculators in this object, compute an appearance for the requested Edge in the supplied CyNetwork.
 Object clone()
          Create deep copy of the object.
 Object clone(String vsName)
          Make deep copy of this object
protected  void copyCalculators(cytoscape.visual.AppearanceCalculator copy)
           
protected  void copyDefaultAppearance(cytoscape.visual.AppearanceCalculator toCopy)
           
 Calculator getCalculator(VisualPropertyType type)
          DOCUMENT ME!
 List<Calculator> getCalculators()
          DOCUMENT ME!
 EdgeAppearance getDefaultAppearance()
          DOCUMENT ME!
 String getDescription()
          DOCUMENT ME!
protected  String getDescription(String name, Appearance defaultAppr)
           
protected  Properties getProperties(Appearance appr, String baseKey)
           
 Properties getProperties(String baseKey)
          DOCUMENT ME!
 void removeCalculator(VisualPropertyType type)
          DOCUMENT ME!
 void setCalculator(Calculator c)
          DOCUMENT ME!
 void setDefaultAppearance(EdgeAppearance appr)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLONE_SUFFIX

protected static final String CLONE_SUFFIX
See Also:
Constant Field Values

calcs

protected final List<Calculator> calcs

tmpDefaultAppearance

protected Appearance tmpDefaultAppearance

deps

protected VisualPropertyDependency deps
Constructor Detail

EdgeAppearanceCalculator

@Deprecated
public EdgeAppearanceCalculator()
Deprecated. Use VisualStyle.getEdgeAppearanceCalculator() or new EdgeAppearanceCalculator( VisualStyle.getDependency() ); Will be removed Jan 2010.


EdgeAppearanceCalculator

public EdgeAppearanceCalculator(VisualPropertyDependency deps)
Creates a new EdgeAppearanceCalculator object.


EdgeAppearanceCalculator

public EdgeAppearanceCalculator(EdgeAppearanceCalculator toCopy)
Copy constructor. Returns a default object if the argument is null.


EdgeAppearanceCalculator

public EdgeAppearanceCalculator(String name,
                                Properties eacProps,
                                String baseKey,
                                CalculatorCatalog catalog,
                                VisualPropertyDependency deps)
Creates a new EdgeAppearanceCalculator and immediately customizes it by calling applyProperties with the supplied arguments.

Method Detail

clone

public Object clone()
Create deep copy of the object.


calculateEdgeAppearance

public EdgeAppearance calculateEdgeAppearance(Edge edge,
                                              CyNetwork network)
Using the rules defined by the default values and calculators in this object, compute an appearance for the requested Edge in the supplied CyNetwork. A new EdgeApperance object will be created.


calculateEdgeAppearance

public void calculateEdgeAppearance(EdgeAppearance appr,
                                    Edge edge,
                                    CyNetwork network)
Using the rules defined by the default values and calculators in this object, compute an appearance for the requested Edge in the supplied CyNetwork. The supplied EdgeAppearance object will be changed to hold the new values.


getDefaultAppearance

public EdgeAppearance getDefaultAppearance()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setDefaultAppearance

public void setDefaultAppearance(EdgeAppearance appr)
DOCUMENT ME!

Parameters:
appr - DOCUMENT ME!

getDescription

public String getDescription()
DOCUMENT ME!

Returns:
DOCUMENT ME!

applyProperties

public void applyProperties(String name,
                            Properties eacProps,
                            String baseKey,
                            CalculatorCatalog catalog)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
eacProps - DOCUMENT ME!
baseKey - DOCUMENT ME!
catalog - DOCUMENT ME!

getProperties

public Properties getProperties(String baseKey)
DOCUMENT ME!

Parameters:
baseKey - DOCUMENT ME!
Returns:
DOCUMENT ME!

copyDefaultAppearance

protected void copyDefaultAppearance(cytoscape.visual.AppearanceCalculator toCopy)

clone

public Object clone(String vsName)
Make deep copy of this object


getCalculator

public Calculator getCalculator(VisualPropertyType type)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
Returns:
DOCUMENT ME!

getCalculators

public List<Calculator> getCalculators()
DOCUMENT ME!

Returns:
DOCUMENT ME!

removeCalculator

public void removeCalculator(VisualPropertyType type)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!

setCalculator

public void setCalculator(Calculator c)
DOCUMENT ME!

Parameters:
c - DOCUMENT ME!

getDescription

protected String getDescription(String name,
                                Appearance defaultAppr)

applyProperties

protected void applyProperties(Appearance appr,
                               String name,
                               Properties nacProps,
                               String baseKey,
                               CalculatorCatalog catalog)

getProperties

protected Properties getProperties(Appearance appr,
                                   String baseKey)

copyCalculators

protected void copyCalculators(cytoscape.visual.AppearanceCalculator copy)

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.