com.metsci.glimpse.painter.info
Class MeasurementPainter

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.info.MeasurementPainter
All Implemented Interfaces:
GlimpsePainter

public class MeasurementPainter
extends GlimpseDataPainter2D

Displays a protractor and ruler when the mouse cursor is locked via the middle mouse button.

Author:
ulman

Field Summary
 
Fields inherited from class com.metsci.glimpse.painter.base.GlimpsePainterImpl
BYTES_PER_FLOAT, logger
 
Constructor Summary
MeasurementPainter()
           
MeasurementPainter(java.text.DecimalFormat angleFormatter, java.text.DecimalFormat distanceFormatter)
           
MeasurementPainter(java.lang.String units)
           
 
Method Summary
 void dispose(javax.media.opengl.GLContext context)
           
 void paintTo(javax.media.opengl.GL gl, GlimpseBounds bounds, Axis2D axis)
           
 void setProtractorColor(float[] rgba)
           
 void setProtractorColor(float r, float g, float b, float a)
           
 void setRulerColor(float[] rgba)
           
 void setRulerColor(float r, float g, float b, float a)
           
 void setRulerWidth(float width)
           
 void setTextColor(float[] rgba)
           
 void setTextColor(float r, float g, float b, float a)
           
 
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, setLookAndFeel, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeasurementPainter

public MeasurementPainter()

MeasurementPainter

public MeasurementPainter(java.lang.String units)

MeasurementPainter

public MeasurementPainter(java.text.DecimalFormat angleFormatter,
                          java.text.DecimalFormat distanceFormatter)
Method Detail

setRulerWidth

public void setRulerWidth(float width)

setTextColor

public void setTextColor(float[] rgba)

setTextColor

public void setTextColor(float r,
                         float g,
                         float b,
                         float a)

setRulerColor

public void setRulerColor(float[] rgba)

setRulerColor

public void setRulerColor(float r,
                          float g,
                          float b,
                          float a)

setProtractorColor

public void setProtractorColor(float[] rgba)

setProtractorColor

public void setProtractorColor(float r,
                               float g,
                               float b,
                               float a)

dispose

public void dispose(javax.media.opengl.GLContext context)

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.