|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcytoscape.visual.calculators.AbstractCalculator
public abstract class AbstractCalculator
AbstractCalculator is the top of the tree for the Calculator classes. DO NOT
extend this class directly! All calculators should extend one of NodeCalculator
or EdgeCalculator AND implement one of the 11 attribute calculator
interfaces.
| Nested Class Summary | |
|---|---|
protected class |
AbstractCalculator.CalculatorUI
UI class for the calculator. |
protected class |
AbstractCalculator.MappingListener
Listens to changes in the mapping and forwards them on to whatever listeners are attached to the calculator. |
| 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. |
static String |
ID
String literal used to refer to the generic "ID" attribute. |
protected Vector |
mappings
Vector of all mappings contained by this calculator. |
protected String |
name
|
| Constructor Summary | |
|---|---|
AbstractCalculator(String name,
ObjectMapping m)
Create a calculator with the specified object mapping and name. |
|
| 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. |
Object |
clone()
Clone the calculator. |
protected void |
fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. |
protected Map |
getAttrBundle(String canonicalName,
CyAttributes cyAttrs)
Returns a map of attribute names to single values. |
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 |
getMappings()
Get all mappings contained by this calculator. |
Properties |
getProperties(String baseKey)
Returns a properties description of this calculator. |
protected JPanel |
getUI(CyAttributes attr,
JDialog parent,
CyNetwork network)
Get the UI for calculators. |
abstract JPanel |
getUI(JDialog parent,
CyNetwork network)
Get the UI for the calculator. |
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 |
|---|
public static final String ID
protected Vector mappings
protected Vector acceptedDataClasses
mappings vector at the same index.
protected String name
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)
m - Object mapping for this calculator, or nullname - Name of this calculator| Method Detail |
|---|
public void addMapping(ObjectMapping m)
m - Mapping to add.public Vector getMappings()
public ObjectMapping getMapping(int i)
i - index of mapping to retrieve
public int getDupeCount()
public Object clone()
throws CloneNotSupportedException
clone in interface Calculatorclone in class ObjectCloneNotSupportedException - if something is seriously borked.public final String toString()
toString in interface CalculatortoString in class Objectpublic void setName(String newName)
setName in interface CalculatornewName - the new name for this calculator. Must be unique.public Properties getProperties(String baseKey)
getProperties in interface Calculator
public abstract JPanel getUI(JDialog parent,
CyNetwork network)
getUI in interface Calculatorparent - Parent JDialog for the UInetwork - CyNetwork object containing underlying graph data
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 Calculatorl - ChangeListener to addpublic void removeChangeListener(ChangeListener l)
removeChangeListener in interface Calculatorl - ChangeListener to addprotected void fireStateChanged()
protected Map getAttrBundle(String canonicalName,
CyAttributes cyAttrs)
canonicalName - The attribute name returned from the CyNode or CyEdge.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||