edu.swri.swiftvis.filters
Class KeySelectionFilter

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

public class KeySelectionFilter
extends AbstractMultipleSourceFilter

This filter is intended to be used with multiple inputs to do selections. It was born from a desire by users to be able to have a discard file and select all of the particles that collide with a particular body. For example, you want to take a discard file and a bin.dat file and select from the bin.dat only the particles that wound up colliding with Jupiter. The way this works is that you enter a boolean formula and a data formula for the data file you are using for the selection. In this case, the discard file. The boolean expression tells if that index in the selecting input should be used. In this example, it would be an expression asking if the body that was hit was Juptier. If it is true, then the data formula is evalutated to produce a "key". For this example, the "key" would be the particle number that ran into Jupiter. The first step is that the entire selecting input has is run through and all the keys are collected. The user also provides a formula for the selected input that needs to match the keys. The filter then passes through the selected iput and every element for which the selected formula matches a stored key, that element is kept. In the example, the selected data formula would simply be p[0], the number of the particle in the bin.dat input. The user specifies which input is the selecting input just with the formulas. The one that is being selected must also be selected with a drop box. If the first input is for selecting, then the boolean formula and the key formula should use d[0] while the key matching formula should use d[1].

Author:
Mark Lewis
See Also:
Serialized Form

Field Summary
private  BooleanFormula boolFormula
           
private  javax.swing.JComboBox comboBox
           
private  DataFormula keyFormula
           
private  DataFormula keyMatchFormula
           
private  int pullSource
           
private static long serialVersionUID
           
 
Fields inherited from class edu.swri.swiftvis.filters.AbstractMultipleSourceFilter
bounds, changed, dataVect, inputVector, propPanel, sinkVector
 
Constructor Summary
  KeySelectionFilter()
           
private KeySelectionFilter(KeySelectionFilter c, java.util.List<GraphElement> l)
           
 
Method Summary
 void addInput(DataSource ds)
           
 KeySelectionFilter copy(java.util.List<GraphElement> l)
           
 java.lang.String getDescription()
           
 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.
 void removeInput(DataSource ds)
           
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, addOutput, clearData, getBounds, getElement, getNumElements, getNumOutputs, getNumParameters, getNumSources, getNumValues, getOutput, getOutputInfoPanel, getPaint, getPropertiesPanel, getSource, getSourceInfoPanel, relink, removeOutput, setBounds, sourceAltered, validInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boolFormula

private BooleanFormula boolFormula

keyFormula

private DataFormula keyFormula

pullSource

private int pullSource

keyMatchFormula

private DataFormula keyMatchFormula

comboBox

private transient javax.swing.JComboBox comboBox

serialVersionUID

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

KeySelectionFilter

public KeySelectionFilter()

KeySelectionFilter

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

addInput

public void addInput(DataSource ds)
Specified by:
addInput in interface DataSink
Overrides:
addInput in class AbstractMultipleSourceFilter

removeInput

public void removeInput(DataSource ds)
Specified by:
removeInput in interface DataSink
Overrides:
removeInput in class AbstractMultipleSourceFilter

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

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)
Description copied from interface: DataSource
Tells you what a particular parameter is used for.


useParameterNameString

public boolean useParameterNameString(int which)
Description copied from interface: DataSource
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)
Description copied from interface: DataSource
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)
Description copied from interface: DataSource
Tells you what a particular value is used for.


getDescription

public java.lang.String getDescription()

getTypeDescription

public static java.lang.String getTypeDescription()

copy

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