Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.visual
Class NodeAppearanceCalculator

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

public class NodeAppearanceCalculator
extends Object

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


Constructor Summary
NodeAppearanceCalculator()
          Creates a new NodeAppearanceCalculator object.
NodeAppearanceCalculator(NodeAppearanceCalculator toCopy)
          Copy constructor.
NodeAppearanceCalculator(String name, Properties nacProps, String baseKey, CalculatorCatalog catalog)
          Creates a new NodeAppearanceCalculator and immediately customizes it by calling applyProperties with the supplied arguments.
 
Method Summary
 void applyProperties(String name, Properties nacProps, String baseKey, CalculatorCatalog catalog)
          DOCUMENT ME!
 void calculateNodeAppearance(NodeAppearance appr, Node node, CyNetwork network)
          Using the rules defined by the default values and calculators in this object, compute an appearance for the requested Node in the supplied CyNetwork.
 NodeAppearance calculateNodeAppearance(Node node, CyNetwork network)
          Using the rules defined by the default values and calculators in this object, compute an appearance for the requested Node in the supplied CyNetwork.
 Object clone()
          Create deep copy of the object.
 Object clone(String vsName)
          Make deep copy of this object
 Calculator getCalculator(byte type)
          Deprecated. Will be removed 5/2008
 Calculator getCalculator(VisualPropertyType type)
          DOCUMENT ME!
 List<Calculator> getCalculators()
          DOCUMENT ME!
 NodeAppearance getDefaultAppearance()
          DOCUMENT ME!
 String getDescription()
          Returns a text description of the current default values and calculator names.
 boolean getNodeSizeLocked()
          DOCUMENT ME!
 Properties getProperties(String baseKey)
          DOCUMENT ME!
 void removeCalculator(byte type)
          Deprecated. Will be removed 5/2008
 void removeCalculator(VisualPropertyType type)
          DOCUMENT ME!
 void setCalculator(Calculator c)
          DOCUMENT ME!
 void setDefaultAppearance(NodeAppearance n)
          DOCUMENT ME!
 void setNodeSizeLocked(boolean b)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeAppearanceCalculator

public NodeAppearanceCalculator()
Creates a new NodeAppearanceCalculator object.


NodeAppearanceCalculator

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


NodeAppearanceCalculator

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

Method Detail

calculateNodeAppearance

public NodeAppearance calculateNodeAppearance(Node node,
                                              CyNetwork network)
Using the rules defined by the default values and calculators in this object, compute an appearance for the requested Node in the supplied CyNetwork. A new NodeApperance object will be created.


clone

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


calculateNodeAppearance

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


getDefaultAppearance

public NodeAppearance getDefaultAppearance()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setDefaultAppearance

public void setDefaultAppearance(NodeAppearance n)
DOCUMENT ME!

Parameters:
n - DOCUMENT ME!

getDescription

public String getDescription()
Returns a text description of the current default values and calculator names.


applyProperties

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

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

getProperties

public Properties getProperties(String baseKey)
DOCUMENT ME!

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

getNodeSizeLocked

public boolean getNodeSizeLocked()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setNodeSizeLocked

public void setNodeSizeLocked(boolean b)
DOCUMENT ME!

Parameters:
b - DOCUMENT ME!

clone

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


getCalculator

@Deprecated
public Calculator getCalculator(byte type)
Deprecated. Will be removed 5/2008

Use Calculator getCalculator(final VisualPropertyType type) instead.

Parameters:
type -
Returns:

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

@Deprecated
public void removeCalculator(byte type)
Deprecated. Will be removed 5/2008

Use removeCalculator(final VisualPropertyType type) instead.

Parameters:
type -

removeCalculator

public void removeCalculator(VisualPropertyType type)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!

setCalculator

public void setCalculator(Calculator c)
DOCUMENT ME!

Parameters:
c - DOCUMENT ME!

www.cytoscape.org