|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.visual.calculators.AbstractCalculator
public abstract class AbstractCalculator
Nested Class Summary | |
---|---|
protected class |
AbstractCalculator.CalculatorUI
Deprecated. Do not use. This UI was replaced by new VizMap GUI. |
Field Summary | |
---|---|
protected Vector |
acceptedDataClasses
The domain classes accepted by the mappings underlying this calculator. |
protected ChangeEvent |
changeEvent
Only one ChangeEvent is needed per calculator instance
since the event's only state is the source property. |
protected List |
changeListeners
keep track of interested UI classes. |
protected Vector<ObjectMapping> |
mappings
Vector of all mappings contained by this calculator. |
protected String |
name
|
protected VisualPropertyType |
type
Type of this visual property. |
Fields inherited from interface cytoscape.visual.calculators.Calculator |
---|
ID |
Constructor Summary | |
---|---|
AbstractCalculator(String name,
ObjectMapping m,
VisualPropertyType type)
Creates a new AbstractCalculator object. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
Add a ChangeListener to the calcaultor. |
void |
addMapping(ObjectMapping m)
Add a mapping to the mappings contained by the calculator. |
void |
apply(Appearance appr,
Edge e,
CyNetwork net)
DOCUMENT ME! |
void |
apply(Appearance appr,
Node n,
CyNetwork net)
DOCUMENT ME! |
Object |
clone()
Clone the calculator. |
protected void |
fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. |
protected Map<String,Object> |
getAttrBundle(String canonicalName)
|
protected Map<String,Object> |
getAttrBundle(String canonicalName,
CyAttributes cyAttrs)
Returns a map of attribute names to single values. |
protected String |
getClassName()
This exists so that it can be overridden in legacy classes (GenericNodeSizeCalculator, GenericColorCalculator, GenericArrowCalculator) such that they return the a new class name instead of a legacy class name. |
int |
getDupeCount()
Get how many times this calculator has been duplicated. |
ObjectMapping |
getMapping(int i)
Get the mapping at a specific index in this calculator. |
Vector<ObjectMapping> |
getMappings()
Get all mappings contained by this calculator. |
Properties |
getProperties()
Returns a properties description of this calculator. |
protected Object |
getRangeValue(GraphObject obj)
|
protected JPanel |
getUI(CyAttributes attr,
JDialog parent,
CyNetwork network)
Deprecated. will be removed in the next release (2.8 or 3.0) |
JPanel |
getUI(JDialog parent,
CyNetwork network)
Deprecated. Will be removed next release (2.8 or 3.0) |
VisualPropertyType |
getVisualPropertyType()
Replaces the following 3 methods: public byte getType(); public String getTypeName(); public String getPropertyLabel(); The returned enum VisualPropertyType has replacement for these methods. |
void |
removeChangeListener(ChangeListener l)
Remove a ChangeListener from the calcaultor. |
void |
setName(String newName)
Set the name of this calculator. |
String |
toString()
Get the name of this calculator. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Vector<ObjectMapping> mappings
protected Vector acceptedDataClasses
mappings
vector at the same index.
protected String name
protected VisualPropertyType type
protected List changeListeners
protected transient ChangeEvent changeEvent
ChangeEvent
is needed per calculator instance
since the event's only state is the source property.
Constructor Detail |
---|
public AbstractCalculator(String name, ObjectMapping m, VisualPropertyType type)
name
- DOCUMENT ME!m
- DOCUMENT ME!c
- DOCUMENT ME!type
- DOCUMENT ME!Method Detail |
---|
public void addMapping(ObjectMapping m)
m
- Mapping to add.public Vector<ObjectMapping> getMappings()
getMappings
in interface Calculator
public ObjectMapping getMapping(int i)
getMapping
in interface Calculator
i
- index of mapping to retrieve
public int getDupeCount()
public Object clone() throws CloneNotSupportedException
clone
in interface Calculator
clone
in class Object
CloneNotSupportedException
- if something is seriously borked.public final String toString()
toString
in interface Calculator
toString
in class Object
public void setName(String newName)
setName
in interface Calculator
newName
- the new name for this calculator. Must be unique.public Properties getProperties()
getProperties
in interface Calculator
protected String getClassName()
@Deprecated public JPanel getUI(JDialog parent, CyNetwork network)
getUI
in interface Calculator
parent
- Parent JDialog for the UInetwork
- CyNetwork object containing underlying graph data@Deprecated protected JPanel getUI(CyAttributes attr, JDialog parent, CyNetwork network)
updateAttribute(String, CyNetwork, int)
when frobbed.
attr
- CyAttributes to look up attributes from
public void addChangeListener(ChangeListener l)
addChangeListener
in interface Calculator
l
- ChangeListener to addpublic void removeChangeListener(ChangeListener l)
removeChangeListener
in interface Calculator
l
- ChangeListener to addprotected void fireStateChanged()
protected Map<String,Object> getAttrBundle(String canonicalName, CyAttributes cyAttrs)
canonicalName
- The attribute name returned from the CyNode or CyEdge.
protected Map<String,Object> getAttrBundle(String canonicalName)
public void apply(Appearance appr, Edge e, CyNetwork net)
apply
in interface Calculator
appr
- DOCUMENT ME!e
- DOCUMENT ME!net
- DOCUMENT ME!public void apply(Appearance appr, Node n, CyNetwork net)
apply
in interface Calculator
appr
- DOCUMENT ME!n
- DOCUMENT ME!net
- DOCUMENT ME!protected Object getRangeValue(GraphObject obj)
public VisualPropertyType getVisualPropertyType()
getVisualPropertyType
in interface Calculator
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |