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 modifiedAxisMouseListener
subclass.- Author:
- ulman
-
-
Constructor Summary
Constructors Constructor Description CrosshairPainter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doPaintTo(GlimpseContext context)
void
setCursorColor(float[] rgba)
void
setCursorColor(float r, float g, float b, float a)
void
setHideHorizontalHairs(boolean doHide)
void
setHideVerticalHairs(boolean doHide)
void
setLineWidth(float width)
void
setLookAndFeel(LookAndFeel laf)
Sets display options for the painter based on the provided LookAndFeel.void
setShadeColor(float[] rgba)
void
setShadeColor(float r, float g, float b, float a)
void
setShadeSelectionBox(boolean doShade)
void
setXor(boolean xor)
void
showSelectionBox(boolean show)
void
showSelectionCrosshairs(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:GlimpsePainter
Sets display options for the painter based on the provided LookAndFeel.- Specified by:
setLookAndFeel
in interfaceGlimpsePainter
- Overrides:
setLookAndFeel
in classGlimpsePainterBase
-
doPaintTo
public void doPaintTo(GlimpseContext context)
-
-