Class SwingScatterPlotView<Row,C>
- java.lang.Object
-
- com.macrofocus.high_d.scatterplot.AbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
- com.macrofocus.high_d.scatterplot.swing.SwingScatterPlotView<Row,C>
-
- All Implemented Interfaces:
ScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
public class SwingScatterPlotView<Row,C> extends AbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.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 Constructor Description SwingScatterPlotView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
computeOLSRegression()
Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression.protected int
getHeight()
javax.swing.JComponent
getNativeComponent()
double[]
getOLSRegression()
MutableProperties
getProperties()
protected int
getWidth()
com.macrofocus.plot.guide.Guide
getXGuide()
com.macrofocus.plot.guide.Guide
getYGuide()
boolean
isMaintainAspectRatio()
boolean
isShowTiming()
Returns whether information about refresh rate should be displayed.protected void
refresh()
protected void
repaint()
protected void
scheduleUpdate()
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
updateAxisType()
-
Methods inherited from class com.macrofocus.high_d.scatterplot.AbstractScatterPlotView
addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, createOverplots, getAntialiasing, getClosestRow, getColorTheme, getDisplayLabels, getGridThickness, getMarkerSize, getModel, getRegression, getRendering, getRows, getRubberBand, getScreenTransform, getShowColor, getShowFiltered, getShowGrid, getXRangeModel, getYRangeModel, isSelectionMode, populateOverplots, resetXAxis, resetYAxis, setAntialiasing, setColorTheme, setRendering, setSelectionMode, setShowFiltered, updateIntervals, zoom
-
-
-
-
Method Detail
-
scheduleUpdate
protected void scheduleUpdate()
- Specified by:
scheduleUpdate
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
updateAxisType
protected void updateAxisType()
- Specified by:
updateAxisType
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
getWidth
protected int getWidth()
- Specified by:
getWidth
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
getHeight
protected int getHeight()
- Specified by:
getHeight
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
repaint
protected void repaint()
- Specified by:
repaint
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
getNativeComponent
public javax.swing.JComponent getNativeComponent()
-
setModel
public void setModel(ScatterPlotModel model)
Sets the data model and registers with it for listener notifications from the new data model.- Specified by:
setModel
in interfaceScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
- Overrides:
setModel
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
- Parameters:
model
- the new data model- See Also:
ScatterPlotView.getModel()
-
setLicenseModel
public void setLicenseModel(LicenseModel licenseModel)
-
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<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
- Overrides:
getXGuide
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
getYGuide
public com.macrofocus.plot.guide.Guide getYGuide()
- Specified by:
getYGuide
in interfaceScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
- Overrides:
getYGuide
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
refresh
protected void refresh()
- Specified by:
refresh
in classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
setMaintainAspectRatio
public void setMaintainAspectRatio(boolean maintainAspectRatio)
-
isMaintainAspectRatio
public boolean isMaintainAspectRatio()
-
getProperties
public MutableProperties 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.
-
-