edu.swri.swiftvis.sources
Class AbstractSource
java.lang.Object
edu.swri.swiftvis.sources.AbstractSource
- All Implemented Interfaces:
- DataSource, GraphElement, java.io.Serializable
- Direct Known Subclasses:
- BinaryPositionData, CartAndRadSource, DiscardData, DumpSource, EncounterData, Fixed2DBinnedSource, GeneralData, MercurySource, Particle2DBinnedSource, SchemeSource, ScriptSource, SequenceSource, SPHSource
public abstract class AbstractSource
- extends java.lang.Object
- implements DataSource
- Author:
- Mark Lewis
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
dataVect
protected java.util.ArrayList<DataElement> dataVect
sinkVector
protected java.util.ArrayList<DataSink> sinkVector
propPanel
protected transient javax.swing.JTabbedPane propPanel
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.
getBounds
public java.awt.Rectangle getBounds()
- Specified by:
getBounds in interface GraphElement
translate
public void translate(int dx,
int dy)
- Specified by:
translate 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()
drawNode
public void drawNode(java.awt.Graphics2D g)
- Specified by:
drawNode 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()
redo
public void redo()
- Specified by:
redo in interface GraphElement
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
abstractRedoAllElements
protected void abstractRedoAllElements()
abstractRedo2
protected void abstractRedo2()
redoAllElements
protected abstract void redoAllElements()
setupSpecificPanelProperties
protected abstract void setupSpecificPanelProperties()
getOutputInfoPanel
protected OutputInfoPanel getOutputInfoPanel()