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

cytoscape.visual.calculators
Interface Calculator

All Superinterfaces:
Cloneable
All Known Subinterfaces:
EdgeArrowCalculator, EdgeColorCalculator, EdgeFontFaceCalculator, EdgeFontSizeCalculator, EdgeLabelCalculator, EdgeLineTypeCalculator, EdgeToolTipCalculator, NodeColorCalculator, NodeFontFaceCalculator, NodeFontSizeCalculator, NodeLabelCalculator, NodeLabelColorCalculator, NodeLineTypeCalculator, NodeShapeCalculator, NodeSizeCalculator, NodeToolTipCalculator
All Known Implementing Classes:
AbstractCalculator, EdgeCalculator, GenericEdgeArrowCalculator, GenericEdgeColorCalculator, GenericEdgeFontFaceCalculator, GenericEdgeFontSizeCalculator, GenericEdgeLabelCalculator, GenericEdgeLabelColorCalculator, GenericEdgeLineTypeCalculator, GenericEdgeSourceArrowCalculator, GenericEdgeTargetArrowCalculator, GenericEdgeToolTipCalculator, GenericNodeBorderColorCalculator, GenericNodeColorCalculator, GenericNodeFillColorCalculator, GenericNodeFontFaceCalculator, GenericNodeFontSizeCalculator, GenericNodeHeightCalculator, GenericNodeLabelCalculator, GenericNodeLabelColorCalculator, GenericNodeLabelPositionCalculator, GenericNodeLineTypeCalculator, GenericNodeShapeCalculator, GenericNodeSizeCalculator, GenericNodeToolTipCalculator, GenericNodeUniformSizeCalculator, GenericNodeWidthCalculator, NodeCalculator

public interface Calculator
extends Cloneable

Calculator specifies a super-interface for all calculator interfaces. DO NOT create classes that only implement Calculator! When writing calculators, you MUST extend one of NodeCalculator or EdgeCalculator and implement one of the 11 attribute calculator interfaces.


Method Summary
 void addChangeListener(ChangeListener l)
          Add a ChangeListener to the calcaultor.
 void apply(EdgeAppearance appr, Edge e, CyNetwork net)
           
 void apply(NodeAppearance appr, Node n, CyNetwork net)
           
 Object clone()
          Clone the calculator.
 ObjectMapping getMapping(int i)
           
 Vector getMappings()
           
 Properties getProperties()
          Get a description of this calculator as a Properties object.
 String getPropertyLabel()
           
 byte getType()
           
 String getTypeName()
           
 JPanel getUI(JDialog parent, CyNetwork network)
          Get the UI for a calculator.
 void removeChangeListener(ChangeListener l)
          Remove a ChangeListener from the calcaultor.
 void setName(String newName)
          Set calculator name.
 String toString()
          Gets calculator name.
 

Method Detail

getUI

JPanel getUI(JDialog parent,
             CyNetwork network)
Get the UI for a calculator.

Parameters:
parent - Parent JDialog for the UI
network - CyNetwork object containing underlying graph data

toString

String toString()
Gets calculator name.

Overrides:
toString in class Object

setName

void setName(String newName)
Set calculator name. DO NOT CALL THIS METHOD unless you first get a valid name from the CalculatorCatalog. Even if you have a guaranteed valid name from the CalculatorCatalog, it is still preferrable to use the renameCalculator method in the CalculatorCatalog.


clone

Object clone()
             throws CloneNotSupportedException
Clone the calculator.

Throws:
CloneNotSupportedException

getProperties

Properties getProperties()
Get a description of this calculator as a Properties object.


addChangeListener

void addChangeListener(ChangeListener l)
Add a ChangeListener to the calcaultor. When the state underlying the calculator changes, all ChangeListeners will be notified. This is used in the UI classes to ensure that the UI panes stay consistent with the data held in the mappings.

Parameters:
l - ChangeListener to add

removeChangeListener

void removeChangeListener(ChangeListener l)
Remove a ChangeListener from the calcaultor. When the state underlying the calculator changes, all ChangeListeners will be notified. This is used in the UI classes to ensure that the UI panes stay consistent with the data held in the mappings.

Parameters:
l - ChangeListener to add

getPropertyLabel

String getPropertyLabel()

getType

byte getType()

apply

void apply(EdgeAppearance appr,
           Edge e,
           CyNetwork net)

apply

void apply(NodeAppearance appr,
           Node n,
           CyNetwork net)

getMappings

Vector getMappings()

getMapping

ObjectMapping getMapping(int i)

getTypeName

String getTypeName()

www.cytoscape.org