|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.opensourcephysics.display.Dataset
org.opensourcephysics.display.HighlightableDataset
A Dataset that can highlight selected points.
Field Summary |
Fields inherited from class org.opensourcephysics.display.Dataset |
AREA, BAR, CIRCLE, CUSTOM, customMarker, datasetID, errorBars, generalPath, index, maxPoints, NO_MARKER, PIXEL, POST, sorted, SQUARE, xmax, xmin, xpoints, ymax, ymin, ypoints |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
HighlightableDataset()
Default contructor. |
|
HighlightableDataset(java.awt.Color markerColor)
Contructor specifying the marker color. |
|
HighlightableDataset(java.awt.Color markerColor,
java.awt.Color lineColor,
boolean connected)
Contructor specifying the marker color, line color, and whether points are connected. |
Method Summary | |
void |
append(double[] xarray,
double[] yarray)
Appends (x,y) arrays to the Dataset. |
void |
append(double x,
double y)
Appends an (x,y) datum to the Dataset. |
void |
clear()
Clear all data from this Dataset. |
void |
clearHighlights()
. |
void |
draw(DrawingPanel drawingPanel,
java.awt.Graphics g)
Draw this Dataset in the drawing panel. |
static XML.ObjectLoader |
getLoader()
Returns the XML.ObjectLoader for this class. |
boolean |
isHighlighted(int i)
Gets the highlighted flag for the specified point. |
protected void |
moveDatum(int loc)
Move an out-of-place datum into its correct position. |
void |
restoreHighlights()
Restores previous highlights. |
void |
setHighlightColor(java.awt.Color color)
Sets the highlight color. |
void |
setHighlighted(int i,
boolean highlight)
Sets the highlighted flag for the specified point. |
void |
setHighlighted(int start,
int end,
boolean highlight)
Sets the highlighted flag for the specified point range. |
Methods inherited from class org.opensourcephysics.display.Dataset |
append, append, convertTableColumnIndex, countColumnsVisible, drawFilledPlot, drawLinePlot, drawScatterPlot, getColumnClass, getColumnCount, getColumnName, getEdgeColor, getFillColor, getID, getIndex, getLineColor, getMarkerShape, getMarkerSize, getName, getPoints, getRowCount, getValidXPoints, getValidYPoints, getValueAt, getXMax, getXMin, getXPoints, getYMax, getYMin, getYPoints, insertionSort, isConnected, isMeasured, isSorted, isXColumnVisible, isYColumnVisible, read, recalculatePath, setConnected, setCustomMarker, setID, setLineColor, setMarkerColor, setMarkerColor, setMarkerColor, setMarkerShape, setMarkerSize, setMaximumPoints, setName, setSorted, setStride, setXColumnVisible, setXYColumnNames, setXYColumnNames, setYColumnVisible, toString, write |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public HighlightableDataset()
public HighlightableDataset(java.awt.Color markerColor)
markerColor
- marker colorpublic HighlightableDataset(java.awt.Color markerColor, java.awt.Color lineColor, boolean connected)
markerColor
- marker colorlineColor
- line colorconnected
- true to connect points with lineMethod Detail |
public void append(double x, double y)
append
in class Dataset
x
- the x valuey
- the y valuepublic void append(double[] xarray, double[] yarray)
append
in class Dataset
xarray
- the x arrayyarray
- the y arraypublic void clear()
clear
in class Dataset
public void restoreHighlights()
public void clearHighlights()
public void setHighlighted(int i, boolean highlight)
i
- the array indexhighlight
- true to highlight the pointpublic void setHighlighted(int start, int end, boolean highlight)
start
- the start array indexend
- the start array indexhighlight
- true to highlight the pointspublic boolean isHighlighted(int i)
i
- the array index
public void setHighlightColor(java.awt.Color color)
color
- the colorprotected void moveDatum(int loc)
moveDatum
in class Dataset
loc
- the datumpublic void draw(DrawingPanel drawingPanel, java.awt.Graphics g)
draw
in interface Drawable
draw
in class Dataset
drawingPanel
- the drawing panelg
- the graphicspublic static XML.ObjectLoader getLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |