edu.swri.swiftvis.sources
Class AbstractSource

java.lang.Object
  extended by edu.swri.swiftvis.sources.AbstractSource
All Implemented Interfaces:
DataSource, GraphElement, java.io.Serializable
Direct Known Subclasses:
BinaryPositionData, DiscardData, EncounterData, GeneralData, SequenceSource

public abstract class AbstractSource
extends java.lang.Object
implements DataSource

Author:
Mark Lewis
See Also:
Serialized Form

Field Summary
private  java.awt.Rectangle bounds
           
protected  java.util.Vector<DataElement> dataVect
           
private  OutputInfoPanel oip
           
protected  javax.swing.JTabbedPane propPanel
           
protected  java.util.Vector<DataSink> sinkVector
           
 
Constructor Summary
protected AbstractSource()
           
protected AbstractSource(AbstractSource c, java.util.List<GraphElement> l)
          This constructor is used by the copy method of subclasses.
 
Method Summary
protected  void abstractRedoAllElements()
           
 void addOutput(DataSink sink)
           
 void clearData()
          This method does what the name implies, it clears out data vectors.
 java.awt.Rectangle getBounds()
           
 DataElement getElement(int i)
          Returns the specified data element for this source.
 int getNumElements()
          Returns the number of data elements that this source has in it.
 int getNumOutputs()
           
 DataSink getOutput(int which)
           
protected  OutputInfoPanel getOutputInfoPanel()
           
 java.awt.Paint getPaint()
           
 javax.swing.JComponent getPropertiesPanel()
           
protected  void notifySinks()
           
protected abstract  void redoAllElements()
           
 void relink(java.util.Hashtable<GraphElement,GraphElement> linkHash)
           
 void removeOutput(DataSink sink)
           
 void setBounds(java.awt.Rectangle b)
           
protected abstract  void setupSpecificPanelProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.swri.swiftvis.DataSource
getNumParameters, getNumValues, getParameterDescription, getParameterName, getValueDescription, useParameterNameString
 
Methods inherited from interface edu.swri.swiftvis.GraphElement
copy, getDescription
 

Field Detail

bounds

private java.awt.Rectangle bounds

dataVect

protected java.util.Vector<DataElement> dataVect

sinkVector

protected java.util.Vector<DataSink> sinkVector

propPanel

protected transient javax.swing.JTabbedPane propPanel

oip

private transient OutputInfoPanel oip
Constructor Detail

AbstractSource

protected AbstractSource()

AbstractSource

protected AbstractSource(AbstractSource c,
                         java.util.List<GraphElement> l)
This constructor is used by the copy method of subclasses.

Parameters:
c - The filter we are copying.
l - A list of other elements being copied. Only links to these should go through.
Method Detail

getBounds

public java.awt.Rectangle getBounds()
Specified by:
getBounds in interface GraphElement

setBounds

public void setBounds(java.awt.Rectangle b)
Specified by:
setBounds in interface GraphElement

clearData

public void clearData()
Description copied from interface: GraphElement
This method does what the name implies, it clears out data vectors. It is used for saving templates which shouldn't have the data in them.

Specified by:
clearData in interface GraphElement

getPaint

public java.awt.Paint getPaint()
Specified by:
getPaint in interface GraphElement

addOutput

public void addOutput(DataSink sink)
Specified by:
addOutput in interface DataSource

removeOutput

public void removeOutput(DataSink sink)
Specified by:
removeOutput in interface DataSource

getNumOutputs

public int getNumOutputs()
Specified by:
getNumOutputs in interface DataSource

getOutput

public DataSink getOutput(int which)
Specified by:
getOutput in interface DataSource

getElement

public DataElement getElement(int i)
Description copied from interface: DataSource
Returns the specified data element for this source. I'm using this instead of an iterator because direct access is much more efficient when trying to make tables of data.

Specified by:
getElement in interface DataSource
Parameters:
i - Which data element to return. Should be between 0 and getNumElements()-1.
Returns:
The selected element.

getNumElements

public int getNumElements()
Returns the number of data elements that this source has in it. I'm using this instead of an iterator because direct access is much more efficient when trying to make tables of data.

Specified by:
getNumElements in interface DataSource
Returns:
The number of data elements in this source.

relink

public void relink(java.util.Hashtable<GraphElement,GraphElement> linkHash)
Specified by:
relink in interface GraphElement

getPropertiesPanel

public javax.swing.JComponent getPropertiesPanel()
Specified by:
getPropertiesPanel in interface GraphElement

notifySinks

protected void notifySinks()

abstractRedoAllElements

protected void abstractRedoAllElements()

redoAllElements

protected abstract void redoAllElements()

setupSpecificPanelProperties

protected abstract void setupSpecificPanelProperties()

getOutputInfoPanel

protected OutputInfoPanel getOutputInfoPanel()