com.metsci.glimpse.painter.decoration
Class CrosshairPainter

java.lang.Object
  extended by com.metsci.glimpse.painter.base.GlimpsePainterImpl
      extended by com.metsci.glimpse.painter.base.GlimpsePainter2D
          extended by com.metsci.glimpse.painter.base.GlimpseDataPainter2D
              extended by com.metsci.glimpse.painter.decoration.CrosshairPainter
All Implemented Interfaces:
GlimpsePainter

public class CrosshairPainter
extends GlimpseDataPainter2D

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 modified AxisMouseListener subclass.

Author:
ulman

Field Summary
 
Fields inherited from class com.metsci.glimpse.painter.base.GlimpsePainterImpl
BYTES_PER_FLOAT, logger
 
Constructor Summary
CrosshairPainter()
           
 
Method Summary
 void paintTo(javax.media.opengl.GL gl, GlimpseBounds bounds, Axis2D axis)
           
 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.painter.base.GlimpseDataPainter2D
paintTo
 
Methods inherited from class com.metsci.glimpse.painter.base.GlimpsePainter2D
paintTo
 
Methods inherited from class com.metsci.glimpse.painter.base.GlimpsePainterImpl
dispose, isDisposed, isVisible, paintTo, setErrorHandling, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrosshairPainter

public CrosshairPainter()
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 interface GlimpsePainter
Overrides:
setLookAndFeel in class GlimpsePainterImpl

paintTo

public void paintTo(javax.media.opengl.GL gl,
                    GlimpseBounds bounds,
                    Axis2D axis)
Specified by:
paintTo in class GlimpseDataPainter2D


Copyright © 2012 Metron, Inc.. All Rights Reserved.