Data, Drawable, Interactive, LogMeasurable, Measurablepublic class HighlightableDataset extends Dataset implements Interactive
AREA, BAR, CIRCLE, columnID, CUSTOM, customMarker, datasetID, errorBars, generalPath, index, maxPoints, maxPointsMultiplier, NO_MARKER, PIXEL, POST, sorted, SQUARE, visible, xColumnDescription, xmax, xmaxLogscale, xmin, xminLogscale, xpoints, yColumnDescription, ymax, ymaxLogscale, ymin, yminLogscale, ypoints| Constructor | Description |
|---|---|
HighlightableDataset() |
Default constructor.
|
HighlightableDataset(java.awt.Color markerColor) |
Constructor specifying the marker color.
|
HighlightableDataset(java.awt.Color markerColor,
java.awt.Color lineColor,
boolean connected) |
Constructor specifying the marker color, line color, and whether
points are connected.
|
| Modifier and Type | Method | Description |
|---|---|---|
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() |
Clears highlights.
|
void |
draw(DrawingPanel drawingPanel,
java.awt.Graphics g) |
Draw this Dataset in the drawing panel.
|
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix) |
Returns the Interactive object at a specified pixel position.
|
int |
getHitIndex() |
Gets the most recent hit index.
|
static XML.ObjectLoader |
getLoader() |
Returns the XML.ObjectLoader for this class.
|
double[][] |
getScreenCoordinates() |
Gets the screen coordinates of all data points.
|
double |
getX() |
Implements Interactive.
|
double |
getY() |
Implements Interactive.
|
boolean |
isEnabled() |
Implements Interactive.
|
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 |
setEnabled(boolean enabled) |
Implements Interactive.
|
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 |
setX(double x) |
Implements Interactive.
|
void |
setXY(double x,
double y) |
Implements Interactive.
|
void |
setY(double y) |
Implements Interactive.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtappend, append, convertTableColumnIndex, countColumnsVisible, drawFilledPlot, drawLinePlot, drawScatterPlot, getColumnClass, getColumnCount, getColumnID, getColumnName, getColumnNames, getData2D, getData3D, getDataList, getDatasets, getEdgeColor, getFillColor, getFillColors, getID, getIndex, getLineColor, getLineColors, getMarkerShape, getMarkerSize, getName, getPoints, getRowCount, getValidXPoints, getValidYPoints, getValueAt, getVisible, getXColumnDescription, getXColumnName, getXMax, getXMaxLogscale, getXMin, getXMinLogscale, getXPoints, getYColumnDescription, getYColumnName, getYMax, getYMaxLogscale, getYMin, getYMinLogscale, getYPoints, insertionSort, isConnected, isMeasured, isSorted, isXColumnVisible, isYColumnVisible, read, recalculatePath, setColumnID, setConnected, setCustomMarker, setID, setLineColor, setMarkerColor, setMarkerColor, setMarkerColor, setMarkerShape, setMarkerSize, setMaximumPoints, setName, setSorted, setStride, setVisible, setXColumnDescription, setXColumnVisible, setXYColumnNames, setXYColumnNames, setYColumnDescription, setYColumnVisible, toString, writegetXMax, getXMin, getYMax, getYMin, isMeasuredpublic 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 linepublic void append(double x,
double y)
public void append(double[] xarray,
double[] yarray)
public void restoreHighlights()
public void clearHighlights()
public void setHighlighted(int i,
boolean highlight)
i - the array indexhighlight - true to highlight the pointpublic boolean isHighlighted(int i)
i - the array indexpublic void setHighlightColor(java.awt.Color color)
color - the colorprotected void moveDatum(int loc)
public void draw(DrawingPanel drawingPanel, java.awt.Graphics g)
public Interactive findInteractive(DrawingPanel panel, int xpix, int ypix)
findInteractive in interface Interactivepanel - the drawing panelxpix - the x pixel position on the panelypix - the y pixel position on the panelpublic int getHitIndex()
public double[][] getScreenCoordinates()
public void setEnabled(boolean enabled)
setEnabled in interface Interactiveenabled - ignoredpublic boolean isEnabled()
isEnabled in interface Interactivepublic void setXY(double x,
double y)
setXY in interface Interactivex - ignoredy - ignoredpublic void setX(double x)
setX in interface Interactivex - ignoredpublic void setY(double y)
setY in interface Interactivey - ignoredpublic double getX()
getX in interface Interactivepublic double getY()
getY in interface Interactivepublic static XML.ObjectLoader getLoader()