Class CrosshairPainter
- java.lang.Object
-
- com.metsci.glimpse.core.painter.base.GlimpsePainterBase
-
- com.metsci.glimpse.core.painter.decoration.CrosshairPainter
-
- All Implemented Interfaces:
GlimpsePainter
public class CrosshairPainter extends GlimpsePainterBase
Displays crosshairs and a selection box centered over the position of the mouse cursor within the plot. The selected region of a plot can be locked using the middle mouse button. The size of the selection box can be increased or decreased by holding down the ctrl key and scrolling the mouse wheel. Either of these behaviors can be altered by using a modifiedAxisMouseListenersubclass.- Author:
- ulman
-
-
Constructor Summary
Constructors Constructor Description CrosshairPainter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoPaintTo(GlimpseContext context)voidsetCursorColor(float[] rgba)voidsetCursorColor(float r, float g, float b, float a)voidsetHideHorizontalHairs(boolean doHide)voidsetHideVerticalHairs(boolean doHide)voidsetLineWidth(float width)voidsetLookAndFeel(LookAndFeel laf)Sets display options for the painter based on the provided LookAndFeel.voidsetShadeColor(float[] rgba)voidsetShadeColor(float r, float g, float b, float a)voidsetShadeSelectionBox(boolean doShade)voidsetXor(boolean xor)voidshowSelectionBox(boolean show)voidshowSelectionCrosshairs(boolean show)-
Methods inherited from class com.metsci.glimpse.core.painter.base.GlimpsePainterBase
dispose, getAxis1D, getAxis2D, getBounds, getGL3, isDisposed, isVisible, paintTo, requireAxis1D, requireAxis2D, setVisible
-
-
-
-
Method Detail
-
setCursorColor
public void setCursorColor(float[] rgba)
-
setCursorColor
public void setCursorColor(float r, float g, float b, float a)
-
setShadeColor
public void setShadeColor(float[] rgba)
-
setShadeColor
public void setShadeColor(float r, float g, float b, float a)
-
setHideVerticalHairs
public void setHideVerticalHairs(boolean doHide)
-
setHideHorizontalHairs
public void setHideHorizontalHairs(boolean doHide)
-
setLineWidth
public void setLineWidth(float width)
-
showSelectionBox
public void showSelectionBox(boolean show)
-
setShadeSelectionBox
public void setShadeSelectionBox(boolean doShade)
-
showSelectionCrosshairs
public void showSelectionCrosshairs(boolean show)
-
setXor
public void setXor(boolean xor)
-
setLookAndFeel
public void setLookAndFeel(LookAndFeel laf)
Description copied from interface:GlimpsePainterSets display options for the painter based on the provided LookAndFeel.- Specified by:
setLookAndFeelin interfaceGlimpsePainter- Overrides:
setLookAndFeelin classGlimpsePainterBase
-
doPaintTo
public void doPaintTo(GlimpseContext context)
-
-