Class SwingScatterPlotView<Row,C>
java.lang.Object
com.macrofocus.high_d.scatterplot.AbstractScatterPlotView<JComponent,Color,Font,Row,C>
com.macrofocus.high_d.scatterplot.swing.SwingScatterPlotView<Row,C>
- All Implemented Interfaces:
ScatterPlotView<JComponent,
Color, Font, Row, C>
public class SwingScatterPlotView<Row,C>
extends AbstractScatterPlotView<JComponent,Color,Font,Row,C>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.macrofocus.high_d.scatterplot.AbstractScatterPlotView
AbstractScatterPlotView.AbstractVisualLayerIDrawing
Nested classes/interfaces inherited from interface com.macrofocus.high_d.scatterplot.ScatterPlotView
ScatterPlotView.PropertyType
-
Field Summary
Fields inherited from class com.macrofocus.high_d.scatterplot.AbstractScatterPlotView
canvas, model, properties, rangesScreenTransformCoordinator, screenTransform, timer, xGuide, yGuide
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression.protected int
double[]
protected int
getWidth()
com.macrofocus.plot.guide.Guide
com.macrofocus.plot.guide.Guide
boolean
boolean
Returns whether information about refresh rate should be displayed.protected void
refresh()
protected void
repaint()
protected void
void
setLicenseModel
(LicenseModel licenseModel) void
setMaintainAspectRatio
(boolean maintainAspectRatio) void
setModel
(ScatterPlotModel model) Sets the data model and registers with it for listener notifications from the new data model.void
setShowTiming
(boolean showTiming) Sets whether information about refresh rate should be displayed.protected void
Methods inherited from class com.macrofocus.high_d.scatterplot.AbstractScatterPlotView
addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, createOverplots, getAntialiasing, getClosestRow, getColorTheme, getDisplayLabels, getGridThickness, getMarkerExtraSizeHighlight, getMarkerSize, getModel, getRegression, getRendering, getRows, getRubberBand, getScreenTransform, getShowColor, getShowFiltered, getShowGrid, getSizeProportion, getXRangeModel, getYRangeModel, isSelectionMode, populateOverplots, resetXAxis, resetYAxis, setAntialiasing, setColorTheme, setRendering, setSelectionMode, setShowFiltered, updateIntervals, zoom
-
Constructor Details
-
SwingScatterPlotView
public SwingScatterPlotView()
-
-
Method Details
-
scheduleUpdate
protected void scheduleUpdate()- Specified by:
scheduleUpdate
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C>
-
updateAxisType
protected void updateAxisType()- Specified by:
updateAxisType
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C>
-
getWidth
protected int getWidth()- Specified by:
getWidth
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C>
-
getHeight
protected int getHeight()- Specified by:
getHeight
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C>
-
repaint
protected void repaint()- Specified by:
repaint
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C>
-
getNativeComponent
-
setModel
Sets the data model and registers with it for listener notifications from the new data model.- Specified by:
setModel
in interfaceScatterPlotView<JComponent,
Color, Font, Row, C> - Overrides:
setModel
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C> - Parameters:
model
- the new data model- See Also:
-
setLicenseModel
-
isShowTiming
public boolean isShowTiming()Description copied from interface:ScatterPlotView
Returns whether information about refresh rate should be displayed.- Returns:
- true to display refresh rate information, false otherwise
-
setShowTiming
public void setShowTiming(boolean showTiming) Description copied from interface:ScatterPlotView
Sets whether information about refresh rate should be displayed.- Parameters:
showTiming
- true to display refresh rate information, false otherwise
-
getXGuide
public com.macrofocus.plot.guide.Guide getXGuide()- Specified by:
getXGuide
in interfaceScatterPlotView<JComponent,
Color, Font, Row, C> - Overrides:
getXGuide
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C>
-
getYGuide
public com.macrofocus.plot.guide.Guide getYGuide()- Specified by:
getYGuide
in interfaceScatterPlotView<JComponent,
Color, Font, Row, C> - Overrides:
getYGuide
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C>
-
refresh
protected void refresh()- Specified by:
refresh
in classAbstractScatterPlotView<JComponent,
Color, Font, Row, C>
-
setMaintainAspectRatio
public void setMaintainAspectRatio(boolean maintainAspectRatio) -
isMaintainAspectRatio
public boolean isMaintainAspectRatio() -
getProperties
-
getOLSRegression
public double[] getOLSRegression() -
computeOLSRegression
public double[] computeOLSRegression()Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression. The result is returned as a double[], where result[0] --> a, and result[1] --> b.- Returns:
- The parameters.
-