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.AbstractVisualLayerIDrawingNested 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 intdouble[]protected intgetWidth()com.macrofocus.plot.guide.Guidecom.macrofocus.plot.guide.GuidebooleanbooleanReturns whether information about refresh rate should be displayed.protected voidrefresh()protected voidrepaint()protected voidvoidsetLicenseModel(LicenseModel licenseModel) voidsetMaintainAspectRatio(boolean maintainAspectRatio) voidsetModel(ScatterPlotModel model) Sets the data model and registers with it for listener notifications from the new data model.voidsetShowTiming(boolean showTiming) Sets whether information about refresh rate should be displayed.protected voidMethods 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:
scheduleUpdatein classAbstractScatterPlotView<JComponent,Color, Font, Row, C>
-
updateAxisType
protected void updateAxisType()- Specified by:
updateAxisTypein classAbstractScatterPlotView<JComponent,Color, Font, Row, C>
-
getWidth
protected int getWidth()- Specified by:
getWidthin classAbstractScatterPlotView<JComponent,Color, Font, Row, C>
-
getHeight
protected int getHeight()- Specified by:
getHeightin classAbstractScatterPlotView<JComponent,Color, Font, Row, C>
-
repaint
protected void repaint()- Specified by:
repaintin 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:
setModelin interfaceScatterPlotView<JComponent,Color, Font, Row, C> - Overrides:
setModelin classAbstractScatterPlotView<JComponent,Color, Font, Row, C> - Parameters:
model- the new data model- See Also:
-
setLicenseModel
-
isShowTiming
public boolean isShowTiming()Description copied from interface:ScatterPlotViewReturns 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:ScatterPlotViewSets 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:
getXGuidein interfaceScatterPlotView<JComponent,Color, Font, Row, C> - Overrides:
getXGuidein classAbstractScatterPlotView<JComponent,Color, Font, Row, C>
-
getYGuide
public com.macrofocus.plot.guide.Guide getYGuide()- Specified by:
getYGuidein interfaceScatterPlotView<JComponent,Color, Font, Row, C> - Overrides:
getYGuidein classAbstractScatterPlotView<JComponent,Color, Font, Row, C>
-
refresh
protected void refresh()- Specified by:
refreshin 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.
-