public class ComplexDataset extends javax.swing.table.AbstractTableModel implements Drawable, Measurable, Data
| Modifier and Type | Field and Description |
|---|---|
static int |
AMP_CURVE
AMP height equal to |z|..
|
protected double[] |
amp_points |
protected double[] |
im_points |
protected int |
index |
static int |
PHASE_BAR
PHASE_BAR the phase is shown as the bar's color
|
static int |
PHASE_CURVE
PHASE_CURVE the phase is shown as color.
|
static int |
PHASE_POST
Field POST
|
static int |
RE_IM_CURVE
RE_IM real and imaginary curves.
|
protected double[] |
re_points |
protected double[] |
xpoints |
| Constructor and Description |
|---|
ComplexDataset()
Dataset contructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(double[] _xpoints,
double[] _zpoints)
Appends x and z data to the Dataset.
|
void |
append(double[] _xpoints,
double[] _repoints,
double[] _impoints)
Appends x, real, and imaginary arrays to the Dataset.
|
void |
append(double x,
double re,
double im)
Appends (x, re, im) datum to the Dataset.
|
void |
clear()
Clear all data from this Dataset.
|
void |
draw(DrawingPanel drawingPanel,
java.awt.Graphics g)
Draw this Dataset in the drawing panel.
|
protected void |
drawLinePlot(DrawingPanel drawingPanel,
java.awt.Graphics2D g2)
Draw the lines connecting the data points.
|
protected void |
drawPhaseBars(DrawingPanel drawingPanel,
java.awt.Graphics2D g2)
Draw the phase as a colored bar.
|
protected void |
drawPhaseCurve(DrawingPanel drawingPanel,
java.awt.Graphics2D g2)
Draw the phase as color.
|
protected void |
drawPhasePosts(DrawingPanel drawingPanel,
java.awt.Graphics2D g2)
Draw the phase as a colored post.
|
protected void |
drawReImPlot(DrawingPanel drawingPanel,
java.awt.Graphics2D g2)
Draw the lines connecting the data points.
|
java.lang.Class |
getColumnClass(int columnIndex)
Gets the type of object for JTable entry.
|
int |
getColumnCount()
Gets the number of columns for rendering in a JTable.
|
java.lang.String |
getColumnName(int columnIndex)
Gets the name of the colummn for rendering in a JTable
|
java.util.ArrayList |
getComplexDatasets()
Gets a list of complex datasets.
|
double[][] |
getData2D()
Gets a 2D array of data.
|
double[][][] |
getData3D()
Gets a 3D array of data.
|
java.util.ArrayList |
getDatasets()
Gets a list of datasets.
|
double[] |
getImPoints()
Gets a copy of the imaginary points array.
|
static XML.ObjectLoader |
getLoader()
Returns the XML.ObjectLoader for this class.
|
int |
getMarkerShape()
Gets the marker shape.
|
int |
getMarkerSize()
Gets the marker size.
|
double[][] |
getPoints()
Gets a data array containing both x and y values.
|
double[] |
getRePoints()
Gets a copy of the real points array.
|
int |
getRowCount()
Gets the number of rows for rendering in a JTable.
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Gets an x or y value for rendering in a JTable.
|
double |
getXMax()
Gets the x world coordinate for the right hand side of the panel.
|
double |
getXMin()
Gets the x world coordinate for the left hand side of the panel.
|
double[] |
getXPoints()
Gets a copy of the xpoints array.
|
double |
getYMax()
Gets y world coordinate for the top of the panel.
|
double |
getYMin()
Gets y world coordinate for the bottom of the panel.
|
double[] |
getYPoints()
Gets a copy of the ypoints array.
|
protected void |
insertionSort()
Perform an insertion sort of the data set.
|
boolean |
isConnected()
Gets the data connected flag.
|
boolean |
isMeasured()
Gets the valid measure flag.
|
boolean |
isSorted()
Gets the sorted flag.
|
protected void |
moveDatum(int loc)
Move an out-of-place datum into its correct position.
|
protected void |
recalculatePath()
Recalcualte the general path.
|
void |
setCentered(boolean _centered)
Sets the centered flag.
|
void |
setConnected(boolean _connected)
Sets the data connected flag.
|
void |
setLineColor(java.awt.Color _lineColor)
Sets the color of the lines connecting data points.
|
void |
setLineColor(java.awt.Color reColor,
java.awt.Color imColor)
Sets the color of the lines connecting data points.
|
void |
setMarkerShape(int _markerShape)
Sets the data point marker.
|
void |
setMarkerSize(int size)
Sets the marker size.
|
void |
setSorted(boolean _sorted)
Sets the sorted flag.
|
void |
setStride(int _stride)
Sets the data stride for table view.
|
void |
setXYColumnNames(java.lang.String _xColumnName,
java.lang.String _reColumnName,
java.lang.String _imColumnName)
Sets the column names when rendering this dataset in a JTable.
|
void |
setXYColumnNames(java.lang.String _xColumnName,
java.lang.String _reColumnName,
java.lang.String _imColumnName,
java.lang.String datasetName)
Sets the column names when rendering this dataset in a JTable.
|
javax.swing.JFrame |
showLegend()
Shows the phase legend.
|
java.lang.String |
toString()
Create a string representation of the data.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtpublic static final int AMP_CURVE
public static final int RE_IM_CURVE
public static final int PHASE_CURVE
public static final int PHASE_BAR
public static final int PHASE_POST
protected double[] xpoints
protected double[] re_points
protected double[] im_points
protected double[] amp_points
protected int index
public javax.swing.JFrame showLegend()
public boolean isMeasured()
isMeasured in interface Measurabletrue<\code> if measure is validpublic double getXMin()
getXMin in interface Measurablepublic double getXMax()
getXMax in interface Measurablepublic double getYMin()
getYMin in interface Measurablepublic double getYMax()
getYMax in interface Measurablepublic double[] getXPoints()
public double[] getRePoints()
public double[] getImPoints()
public double[] getYPoints()
public double[][] getPoints()
public void setMarkerShape(int _markerShape)
_markerShape - public int getMarkerShape()
public int getMarkerSize()
public void setMarkerSize(int size)
size - intpublic void setSorted(boolean _sorted)
_sorted - true<\code> to sortpublic void setStride(int _stride)
_stride - public boolean isSorted()
true<\code> if the data is sortedpublic void setConnected(boolean _connected)
_connected - true<\code> if points are connectedpublic void setCentered(boolean _centered)
_centered - true<\code> if data is centeredpublic boolean isConnected()
true<\code> if points are connectedpublic void setLineColor(java.awt.Color _lineColor)
_lineColor - public void setLineColor(java.awt.Color reColor,
java.awt.Color imColor)
reColor - the real component colorimColor - the imaginary component colorpublic void setXYColumnNames(java.lang.String _xColumnName,
java.lang.String _reColumnName,
java.lang.String _imColumnName)
_xColumnName - String_reColumnName - String_imColumnName - Stringpublic void setXYColumnNames(java.lang.String _xColumnName,
java.lang.String _reColumnName,
java.lang.String _imColumnName,
java.lang.String datasetName)
_xColumnName - String_reColumnName - String_imColumnName - StringdatasetName - Stringpublic void append(double x,
double re,
double im)
x - doublere - doubleim - doublepublic void append(double[] _xpoints,
double[] _repoints,
double[] _impoints)
_xpoints - _repoints - _impoints - public void append(double[] _xpoints,
double[] _zpoints)
Re(z) = z[2*i]
Im(z) = z[2*i + 1]
_xpoints - _zpoints - public void draw(DrawingPanel drawingPanel, java.awt.Graphics g)
public void clear()
public java.lang.String toString()
toString in class java.lang.Objectpublic int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelpublic int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic java.lang.String getColumnName(int columnIndex)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumnIndex - public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModelrowIndex - columnIndex - public java.lang.Class getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelcolumnIndex - protected void insertionSort()
protected void recalculatePath()
protected void moveDatum(int loc)
loc - the datumprotected void drawLinePlot(DrawingPanel drawingPanel, java.awt.Graphics2D g2)
drawingPanel - g2 - protected void drawReImPlot(DrawingPanel drawingPanel, java.awt.Graphics2D g2)
drawingPanel - g2 - protected void drawPhaseCurve(DrawingPanel drawingPanel, java.awt.Graphics2D g2)
drawingPanel - g2 - protected void drawPhaseBars(DrawingPanel drawingPanel, java.awt.Graphics2D g2)
drawingPanel - g2 - protected void drawPhasePosts(DrawingPanel drawingPanel, java.awt.Graphics2D g2)
drawingPanel - g2 - public static XML.ObjectLoader getLoader()
public double[][] getData2D()
Datapublic double[][][] getData3D()
Datapublic java.util.ArrayList getDatasets()
DatagetDatasets in interface Datapublic java.util.ArrayList getComplexDatasets()
DatagetComplexDatasets in interface Data