edu.swri.swiftvis.filters
Class MergeFilter

java.lang.Object
  extended by edu.swri.swiftvis.filters.AbstractMultipleSourceFilter
      extended by edu.swri.swiftvis.filters.MergeFilter
All Implemented Interfaces:
DataSink, DataSource, Filter, GraphElement, java.io.Serializable

public class MergeFilter
extends AbstractMultipleSourceFilter

This class gives the user a way to merge two or more data sets together in a serial manner. They can use a FunctionFilter to merge things in parallel so that the elements are twice as large. If two or more data sets are related such that they can be put end to end, this is the method for putting them together.

Author:
Mark Lewis
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Fields inherited from class edu.swri.swiftvis.filters.AbstractMultipleSourceFilter
bounds, changed, dataVect, inputVector, propPanel, sinkVector
 
Constructor Summary
  MergeFilter()
           
private MergeFilter(MergeFilter c, java.util.List<GraphElement> l)
           
 
Method Summary
 MergeFilter copy(java.util.List<GraphElement> l)
           
 java.lang.String getDescription()
           
 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 getNumParameters()
           
 int getNumValues()
           
 java.lang.String getParameterDescription(int which)
          Tells you what a particular parameter is used for.
 java.lang.String getParameterName(int which, int paramVal)
          Tells you the text that should be used to describe a particular value of a given parameter.
static java.lang.String getTypeDescription()
           
 java.lang.String getValueDescription(int which)
          Tells you what a particular value is used for.
protected  void redoAllElements()
          This method is intended to reprocess all the input elements to redo the output.
protected  void setupSpecificPanelProperties()
          This method should add any tabbed panes to the propPanel that are specific to the given filter.
 boolean useParameterNameString(int which)
          If this returns true then the value of a parameter for this type should be listed as the strong value returned by getParameterName.
 
Methods inherited from class edu.swri.swiftvis.filters.AbstractMultipleSourceFilter
abstractRedoAllElements, addInput, addOutput, clearData, getBounds, getNumOutputs, getNumSources, getOutput, getOutputInfoPanel, getPaint, getPropertiesPanel, getSource, getSourceInfoPanel, relink, removeInput, removeOutput, setBounds, sourceAltered, validInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

MergeFilter

public MergeFilter()

MergeFilter

private MergeFilter(MergeFilter c,
                    java.util.List<GraphElement> l)
Method Detail

getDescription

public java.lang.String getDescription()

getTypeDescription

public static java.lang.String getTypeDescription()

setupSpecificPanelProperties

protected void setupSpecificPanelProperties()
Description copied from class: AbstractMultipleSourceFilter
This method should add any tabbed panes to the propPanel that are specific to the given filter. This is called when the propPanel is created. After it is called, the source and output info panels are added.

Specified by:
setupSpecificPanelProperties in class AbstractMultipleSourceFilter

getParameterDescription

public java.lang.String getParameterDescription(int which)
Tells you what a particular parameter is used for.


useParameterNameString

public boolean useParameterNameString(int which)
If this returns true then the value of a parameter for this type should be listed as the strong value returned by getParameterName. Otherwise just the number should be displayed.


getParameterName

public java.lang.String getParameterName(int which,
                                         int paramVal)
Tells you the text that should be used to describe a particular value of a given parameter.


getValueDescription

public java.lang.String getValueDescription(int which)
Tells you what a particular value is used for.


getNumParameters

public int getNumParameters()
Specified by:
getNumParameters in interface DataSource
Overrides:
getNumParameters in class AbstractMultipleSourceFilter

getNumValues

public int getNumValues()
Specified by:
getNumValues in interface DataSource
Overrides:
getNumValues in class AbstractMultipleSourceFilter

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
Overrides:
getElement in class AbstractMultipleSourceFilter
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
Overrides:
getNumElements in class AbstractMultipleSourceFilter
Returns:
The number of data elements in this source.

copy

public MergeFilter copy(java.util.List<GraphElement> l)

redoAllElements

protected void redoAllElements()
Description copied from class: AbstractMultipleSourceFilter
This method is intended to reprocess all the input elements to redo the output. It must be properly implemented by all extending classes.

Specified by:
redoAllElements in class AbstractMultipleSourceFilter