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

cytoscape.visual
Class GlobalAppearanceCalculator

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

public class GlobalAppearanceCalculator
extends SubjectBase
implements Cloneable

This class calculates global visual attributes such as the background color of the graph window. Currently dynamic calculators for these values are not supported, only default values.


Constructor Summary
GlobalAppearanceCalculator()
           
GlobalAppearanceCalculator(GlobalAppearanceCalculator toCopy)
          Copy constructor.
GlobalAppearanceCalculator(String name, Properties gProps, String baseKey, CalculatorCatalog catalog)
          Creates a new GlobalAppearanceCalculator and immediately customizes it by calling applyProperties with the supplied arguments.
 
Method Summary
 void applyProperties(String name, Properties nacProps, String baseKey, CalculatorCatalog catalog)
          This method customizes this object by searching the supplied properties object for keys identifying default values and calculators.
 Color calculateBackgroundColor(CyNetwork network)
          Currently no calculators are supported for global visual attributes, so this method simply returns the default background color.
 Color calculateEdgeReverseSelectionColor(CyNetwork network)
           
 Color calculateEdgeSelectionColor(CyNetwork network)
           
 GlobalAppearance calculateGlobalAppearance(CyNetwork network)
          Constructs a new GlobalAppearance object containing the values for the known global visual attributes.
 void calculateGlobalAppearance(GlobalAppearance appr, CyNetwork network)
          The supplied GlobalAppearance object will be changed to hold new values for the known global visual attributes.
 Color calculateNodeReverseSelectionColor(CyNetwork network)
           
 Color calculateNodeSelectionColor(CyNetwork network)
           
 Color calculateSloppySelectionColor(CyNetwork network)
          Currently no calculators are supported for global visual attributes, so this method simply returns the default sloppy selection color.
 Object clone()
          Make shallow copy of this object
 Color getDefaultBackgroundColor()
           
 Color getDefaultEdgeReverseSelectionColor()
           
 Color getDefaultEdgeSelectionColor()
           
 Color getDefaultNodeReverseSelectionColor()
           
 Color getDefaultNodeSelectionColor()
           
 Color getDefaultSloppySelectionColor()
           
 String getDescription()
          Returns a text description of this object's current state.
 Properties getProperties(String baseKey)
          Returns a Properties description of this object, suitable for customization by the applyProperties method.
 void setDefaultBackgroundColor(Color c)
           
 void setDefaultEdgeReverseSelectionColor(Color c)
           
 void setDefaultEdgeSelectionColor(Color c)
           
 void setDefaultNodeReverseSelectionColor(Color c)
           
 void setDefaultNodeSelectionColor(Color c)
           
 void setDefaultSloppySelectionColor(Color c)
           
 
Methods inherited from class cytoscape.visual.SubjectBase
addChangeListener, fireStateChanged, removeChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalAppearanceCalculator

public GlobalAppearanceCalculator()

GlobalAppearanceCalculator

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


GlobalAppearanceCalculator

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

Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Make shallow copy of this object

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

calculateGlobalAppearance

public GlobalAppearance calculateGlobalAppearance(CyNetwork network)
Constructs a new GlobalAppearance object containing the values for the known global visual attributes.


calculateGlobalAppearance

public void calculateGlobalAppearance(GlobalAppearance appr,
                                      CyNetwork network)
The supplied GlobalAppearance object will be changed to hold new values for the known global visual attributes.


getDefaultBackgroundColor

public Color getDefaultBackgroundColor()

setDefaultBackgroundColor

public void setDefaultBackgroundColor(Color c)

calculateBackgroundColor

public Color calculateBackgroundColor(CyNetwork network)
Currently no calculators are supported for global visual attributes, so this method simply returns the default background color.


getDefaultSloppySelectionColor

public Color getDefaultSloppySelectionColor()

setDefaultSloppySelectionColor

public void setDefaultSloppySelectionColor(Color c)

getDefaultNodeSelectionColor

public Color getDefaultNodeSelectionColor()

setDefaultNodeSelectionColor

public void setDefaultNodeSelectionColor(Color c)

getDefaultNodeReverseSelectionColor

public Color getDefaultNodeReverseSelectionColor()

setDefaultNodeReverseSelectionColor

public void setDefaultNodeReverseSelectionColor(Color c)

getDefaultEdgeSelectionColor

public Color getDefaultEdgeSelectionColor()

setDefaultEdgeSelectionColor

public void setDefaultEdgeSelectionColor(Color c)

getDefaultEdgeReverseSelectionColor

public Color getDefaultEdgeReverseSelectionColor()

setDefaultEdgeReverseSelectionColor

public void setDefaultEdgeReverseSelectionColor(Color c)

calculateSloppySelectionColor

public Color calculateSloppySelectionColor(CyNetwork network)
Currently no calculators are supported for global visual attributes, so this method simply returns the default sloppy selection color.


calculateNodeSelectionColor

public Color calculateNodeSelectionColor(CyNetwork network)

calculateNodeReverseSelectionColor

public Color calculateNodeReverseSelectionColor(CyNetwork network)

calculateEdgeSelectionColor

public Color calculateEdgeSelectionColor(CyNetwork network)

calculateEdgeReverseSelectionColor

public Color calculateEdgeReverseSelectionColor(CyNetwork network)

getDescription

public String getDescription()
Returns a text description of this object's current state.


applyProperties

public void applyProperties(String name,
                            Properties nacProps,
                            String baseKey,
                            CalculatorCatalog catalog)
This method customizes this object by searching the supplied properties object for keys identifying default values and calculators. Recognized keys are of the form "globalAppearanceCalculator." + name + ident, where name is a supplied argument and ident is a String indicating a default value for a specific visual attribute. Since calculators are not supported for global visual attributes, the catalog argument is currently ignored.


getProperties

public Properties getProperties(String baseKey)
Returns a Properties description of this object, suitable for customization by the applyProperties method.


www.cytoscape.org