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 intgetHeight()javax.swing.JComponentgetNativeComponent()double[]getOLSRegression()MutablePropertiesgetProperties()protected intgetWidth()com.macrofocus.plot.guide.GuidegetXGuide()com.macrofocus.plot.guide.GuidegetYGuide()booleanisMaintainAspectRatio()booleanisShowTiming()Returns whether information about refresh rate should be displayed.protected voidrefresh()protected voidrepaint()protected voidscheduleUpdate()voidsetLicenseModel(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 voidupdateAxisType()-
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, getSizeProportion, getXRangeModel, getYRangeModel, isSelectionMode, populateOverplots, resetXAxis, resetYAxis, setAntialiasing, setColorTheme, setRendering, setSelectionMode, setShowFiltered, updateIntervals, zoom
-
-
-
-
Method Detail
-
scheduleUpdate
protected void scheduleUpdate()
- Specified by:
scheduleUpdatein classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
updateAxisType
protected void updateAxisType()
- Specified by:
updateAxisTypein classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
getWidth
protected int getWidth()
- Specified by:
getWidthin classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
getHeight
protected int getHeight()
- Specified by:
getHeightin classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
repaint
protected void repaint()
- Specified by:
repaintin 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:
setModelin interfaceScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>- Overrides:
setModelin 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: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<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>- Overrides:
getXGuidein classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
getYGuide
public com.macrofocus.plot.guide.Guide getYGuide()
- Specified by:
getYGuidein interfaceScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>- Overrides:
getYGuidein classAbstractScatterPlotView<javax.swing.JComponent,java.awt.Color,java.awt.Font,Row,C>
-
refresh
protected void refresh()
- Specified by:
refreshin 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.
-
-