|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.swri.swiftvis.filters.AbstractSingleSourceFilter
edu.swri.swiftvis.filters.RegionSelectionFilter
public class RegionSelectionFilter
This is a filter that takes a single source and selects elements in a certain region. This filter type implements PlotListener so it takes inputs from the user clicking on plots or key presses on the plots. These are used to relocate the the region that is selected. The filter uses two formulas and uses the values of those as Cartesian coordinates for doing selection on rectangular regions. The clicks can be set to either relocate the view region, or to resize it.
| Field Summary | |
|---|---|
private EditableDouble |
center1
|
private EditableDouble |
center2
|
private EditableBoolean |
clickZoom
|
private DataFormula |
f1
|
private DataFormula |
f2
|
private EditableString |
name
|
private EditableBoolean |
redoOnDrag
|
private static long |
serialVersionUID
|
private EditableDouble |
size1
|
private EditableDouble |
size2
|
private double |
startV1
|
private double |
startV2
|
private javax.swing.JLabel |
v1Label
|
private javax.swing.JLabel |
v2Label
|
private EditableDouble |
zoomFactor
|
| Fields inherited from class edu.swri.swiftvis.filters.AbstractSingleSourceFilter |
|---|
bounds, changed, dataVect, input, propPanel, sinkVector |
| Constructor Summary | |
|---|---|
RegionSelectionFilter()
|
|
RegionSelectionFilter(RegionSelectionFilter c,
java.util.List<GraphElement> l)
|
|
| Method Summary | |
|---|---|
void |
addInput(DataSource in)
|
RegionSelectionFilter |
copy(java.util.List<GraphElement> l)
|
java.lang.String |
getDescription()
|
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. |
java.awt.Shape |
getSelectionRegion()
This method can be used by plot listeners to tell a certain plot style what region is being investigated. |
static java.lang.String |
getTypeDescription()
|
java.lang.String |
getValueDescription(int which)
Tells you what a particular value is used for. |
void |
keyPressed(java.awt.event.KeyEvent e)
This is called when a key is pressed. |
void |
keyReleased(java.awt.event.KeyEvent e)
This is called when a key is released. |
void |
keyTyped(java.awt.event.KeyEvent e)
This is called when a key is typed. |
void |
mouseClicked(double v1,
double v2,
java.awt.event.MouseEvent e)
This is called when a mouse button is clicked. |
void |
mouseDragged(double v1,
double v2,
java.awt.event.MouseEvent e)
This is called when the mouse is dragged. |
void |
mouseMoved(double v1,
double v2,
java.awt.event.MouseEvent e)
This is called when the mouse is moved. |
void |
mousePressed(double v1,
double v2,
java.awt.event.MouseEvent e)
This is called when a mouse button is pressed. |
void |
mouseReleased(double v1,
double v2,
java.awt.event.MouseEvent e)
This is called when a mouse button is released. |
protected void |
redoAllElements()
This method is intended to reprocess all the input elements to redo the output. |
private void |
redoDataBounds()
|
void |
removeInput(DataSource in)
|
protected void |
setupSpecificPanelProperties()
This method should add any tabbed panes to the propPanel that are specific to the given filter. |
java.lang.String |
toString()
|
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.AbstractSingleSourceFilter |
|---|
abstractRedoAllElements, addOutput, clearData, getBounds, getElement, getNumElements, getNumOutputs, getNumSources, 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, wait, wait, wait |
| Methods inherited from interface edu.swri.swiftvis.GraphElement |
|---|
clearData, getBounds, getPaint, getPropertiesPanel, relink, setBounds |
| Field Detail |
|---|
private EditableString name
private DataFormula f1
private DataFormula f2
private EditableDouble center1
private EditableDouble size1
private EditableDouble center2
private EditableDouble size2
private EditableDouble zoomFactor
private EditableBoolean clickZoom
private EditableBoolean redoOnDrag
private transient double startV1
private transient double startV2
private transient javax.swing.JLabel v1Label
private transient javax.swing.JLabel v2Label
private static final long serialVersionUID
| Constructor Detail |
|---|
public RegionSelectionFilter()
public RegionSelectionFilter(RegionSelectionFilter c,
java.util.List<GraphElement> l)
| Method Detail |
|---|
public void addInput(DataSource in)
addInput in interface DataSinkaddInput in class AbstractSingleSourceFilterpublic void removeInput(DataSource in)
removeInput in interface DataSinkremoveInput in class AbstractSingleSourceFilterprotected void redoAllElements()
AbstractSingleSourceFilter
redoAllElements in class AbstractSingleSourceFilterprotected void setupSpecificPanelProperties()
AbstractSingleSourceFilter
setupSpecificPanelProperties in class AbstractSingleSourceFilter
public void mousePressed(double v1,
double v2,
java.awt.event.MouseEvent e)
PlotListener
mousePressed in interface PlotListenerv1 - The primary coordinate in the plot where it was pressed.v2 - The secondary coordinate in the plot where it was pressed.e - The event that triggered the call.
public void mouseReleased(double v1,
double v2,
java.awt.event.MouseEvent e)
PlotListener
mouseReleased in interface PlotListenerv1 - The primary coordinate in the plot where it was pressed.v2 - The secondary coordinate in the plot where it was pressed.e - The event that triggered the call.
public void mouseClicked(double v1,
double v2,
java.awt.event.MouseEvent e)
PlotListener
mouseClicked in interface PlotListenerv1 - The primary coordinate in the plot where it was pressed.v2 - The secondary coordinate in the plot where it was pressed.e - The event that triggered the call.
public void mouseMoved(double v1,
double v2,
java.awt.event.MouseEvent e)
PlotListener
mouseMoved in interface PlotListenerv1 - The primary coordinate in the plot where it was pressed.v2 - The secondary coordinate in the plot where it was pressed.e - The event that triggered the call.
public void mouseDragged(double v1,
double v2,
java.awt.event.MouseEvent e)
PlotListener
mouseDragged in interface PlotListenerv1 - The primary coordinate in the plot where it was pressed.v2 - The secondary coordinate in the plot where it was pressed.e - The event that triggered the call.public void keyPressed(java.awt.event.KeyEvent e)
PlotListener
keyPressed in interface PlotListenere - The event that triggered the call.public void keyReleased(java.awt.event.KeyEvent e)
PlotListener
keyReleased in interface PlotListenere - The event that triggered the call.public void keyTyped(java.awt.event.KeyEvent e)
PlotListener
keyTyped in interface PlotListenere - The event that triggered the call.public java.awt.Shape getSelectionRegion()
PlotListener
getSelectionRegion in interface PlotListenerpublic java.lang.String getDescription()
getDescription in interface GraphElementpublic static java.lang.String getTypeDescription()
public RegionSelectionFilter copy(java.util.List<GraphElement> l)
copy in interface GraphElementpublic int getNumParameters()
getNumParameters in interface DataSourcepublic java.lang.String getParameterDescription(int which)
DataSource
getParameterDescription in interface DataSourcepublic boolean useParameterNameString(int which)
DataSource
useParameterNameString in interface DataSource
public java.lang.String getParameterName(int which,
int paramVal)
DataSource
getParameterName in interface DataSourcepublic int getNumValues()
getNumValues in interface DataSourcepublic java.lang.String getValueDescription(int which)
DataSource
getValueDescription in interface DataSourcepublic java.lang.String toString()
toString in class java.lang.Objectprivate void redoDataBounds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||