Cytoscape 2.8.0 API

cytoscape.visual
Class Appearance

java.lang.Object
  extended by cytoscape.visual.Appearance
Direct Known Subclasses:
EdgeAppearance, NodeAppearance

public class Appearance
extends Object

A class that holds the appearance information for NodeViews and EdgeViews. The class is indexed on VisualPropertyType, so to access the node shape you would use the VisualPropertyType.NODE_SHAPE enum to get and set node shape values for this Appearance.


Field Summary
protected  Map<VisualPropertyType,Object> vizProps
           
 
Constructor Summary
Appearance()
          Creates a new Appearance object.
 
Method Summary
 void applyAppearance(EdgeView edgeView, VisualPropertyDependency fdeps)
          Applies this appearance to the specified EdgeView.
 void applyAppearance(NodeView nodeView, VisualPropertyDependency fdeps)
          Applies this appearance to the specified NodeView.
 void applyBypass(GraphObject n, List<VisualPropertyType> bypassedVPs)
          Applies the visual bypass values specified in the node (edge) attributes for the specified node (edge) to the node (edge).
 void applyDefaultProperties(Properties nacProps, String baseKey)
          Applies the specified properties as default values for this appearance.
 Object clone()
          Returns a clone of this Appearance.
 void copy(Appearance na)
          Copies the specified Appearance into this Appearance object.
 Object get(VisualPropertyType p)
          Gets the appearance for the specified VisualPropertyType.
 Properties getDefaultProperties(String baseKey)
          Returns a Properties object that defines this appearance.
 String getDescription()
          Returns a string describing this appearance with no identifying prefix.
 String getDescription(String prefix)
          Returns a string describing this appearance.
 void set(VisualPropertyType p, Object o)
          Sets the appearance for the specified VisualPropertyType.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vizProps

protected Map<VisualPropertyType,Object> vizProps
Constructor Detail

Appearance

public Appearance()
Creates a new Appearance object.

Method Detail

set

public void set(VisualPropertyType p,
                Object o)
Sets the appearance for the specified VisualPropertyType.

Parameters:
p - The VisualPropertyType that identifies which aspect of the appearance this particular object should be applied to.
o - The object the defines the appearance for the aspect of the appearance defined by parameter p.

get

public Object get(VisualPropertyType p)
Gets the appearance for the specified VisualPropertyType.

Parameters:
p - The VisualPropertyType that identifies which aspect of the appearance to get.
Returns:
An Object of varying type depending on the VisualPropertyType. The VisualPropertyType enum defines what the type of this object will be.

applyAppearance

public void applyAppearance(NodeView nodeView,
                            VisualPropertyDependency fdeps)
Applies this appearance to the specified NodeView.

Parameters:
nodeView - The NodeView that this appearance will be applied to.

applyAppearance

public void applyAppearance(EdgeView edgeView,
                            VisualPropertyDependency fdeps)
Applies this appearance to the specified EdgeView.

Parameters:
edgeView - The EdgeView that this appearance will be applied to.

applyDefaultProperties

public void applyDefaultProperties(Properties nacProps,
                                   String baseKey)
Applies the specified properties as default values for this appearance.

Parameters:
nacProps - The properties used to specify the default appearance.
baseKey - A string identifying which specific properties should be used for the appearance.

getDefaultProperties

public Properties getDefaultProperties(String baseKey)
Returns a Properties object that defines this appearance.

Parameters:
baseKey - The key to use to identify the specific properties for this appearance.
Returns:
A Properties object that defines this appearance.

getDescription

public String getDescription(String prefix)
Returns a string describing this appearance.

Parameters:
prefix - Can be used to apply an identifying prefix to the output strings.
Returns:
A string describing the appearance.

getDescription

public String getDescription()
Returns a string describing this appearance with no identifying prefix.

Returns:
A string describing the appearance.

copy

public void copy(Appearance na)
Copies the specified Appearance into this Appearance object.

Parameters:
na - The Appearance object that will be copied into this Appearance object.

clone

public Object clone()
Returns a clone of this Appearance.

Overrides:
clone in class Object
Returns:
A clone of this Appearance.

applyBypass

public void applyBypass(GraphObject n,
                        List<VisualPropertyType> bypassedVPs)
Applies the visual bypass values specified in the node (edge) attributes for the specified node (edge) to the node (edge).

Parameters:
n - The Node or Edge object that the visual bypass should be applied to.

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.