Data, Drawable, Measurablepublic class ComplexDataset extends javax.swing.table.AbstractTableModel implements Drawable, Measurable, Data
| Modifier and Type | Field | Description |
|---|---|---|
static int |
AMP_CURVE |
AMP height equal to |z|..
|
protected double[] |
amp_points |
|
protected double[] |
im_points |
|
protected int |
index |
|
protected boolean |
measurable |
affect autoscaled drawing panels
|
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 boolean |
visible |
visible in drawing panel
|
protected double[] |
xpoints |
| Constructor | Description |
|---|---|
ComplexDataset() |
Dataset constructor.
|
| Modifier and Type | Method | 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.lang.String[] |
getColumnNames() |
The column names to be used in the data display tool
|
double[][] |
getData2D() |
Gets a 2D array of data.
|
double[][][] |
getData3D() |
Gets a 3D array of data.
|
java.util.List<Data> |
getDataList() |
Some elements (a Group, for instance) do not contain data, but a list of subelements which do.
|
java.util.ArrayList<Dataset> |
getDatasets() |
Gets a list of OSP Datasets.
|
java.awt.Color |
getFillColor() |
Fill color to use for this data
|
java.awt.Color[] |
getFillColors() |
Fill colors to Data interface.
|
int |
getID() |
Returns a unique identifier for this Data.
|
double[] |
getImPoints() |
Gets a copy of the imaginary points array.
|
java.awt.Color |
getLineColor() |
Gets the line color.
|
java.awt.Color[] |
getLineColors() |
Line colors for Data interface.
|
static XML.ObjectLoader |
getLoader() |
Returns the XML.ObjectLoader for this class.
|
int |
getMarkerShape() |
Gets the marker shape.
|
int |
getMarkerSize() |
Gets the marker size.
|
boolean |
getMeasurable() |
Gets the measurable property.
|
java.lang.String |
getName() |
Gets the name.
|
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.
|
boolean |
getVisible() |
Gets the visibility of this dataset in the DrawingPanel.
|
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 |
setID(int id) |
Sets the ID number of this Data.
|
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 |
setMeasurable(boolean b) |
Sets the measurable property.
|
void |
setName(java.lang.String name) |
Sets a name that can be used to identify the dataset.
|
void |
setSorted(boolean _sorted) |
Sets the sorted flag.
|
void |
setStride(int _stride) |
Sets the data stride for table view.
|
void |
setVisible(boolean b) |
Sets the visibility of this Dataset in a DrawingPanel.
|
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 boolean visible
protected boolean measurable
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 setVisible(boolean b)
b - true<\code> if dataset is visiblepublic boolean getVisible()
public void setMeasurable(boolean b)
b - true<\code> if points are connectedpublic boolean getMeasurable()
public 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 java.awt.Color[] getLineColors()
getLineColors in interface Datapublic java.awt.Color getLineColor()
public java.awt.Color[] getFillColors()
getFillColors in interface Datapublic java.awt.Color getFillColor()
public 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 setID(int id)
public int getID()
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()
public int getRowCount()
public java.lang.String getColumnName(int columnIndex)
getColumnName in class javax.swing.table.AbstractTableModelcolumnIndex - public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
rowIndex - columnIndex - public java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass 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 void setName(java.lang.String name)
name - Stringpublic java.lang.String getName()
public java.lang.String[] getColumnNames()
getColumnNames in interface Datapublic double[][] getData2D()
Datapublic double[][][] getData3D()
Datapublic java.util.ArrayList<Dataset> getDatasets()
DatagetDatasets in interface Datapublic java.util.List<Data> getDataList()
getDataList in interface Data