org.opensourcephysics.media.core
Class VidCartesianCoordinateStringBuilder

java.lang.Object
  extended by org.opensourcephysics.display.axes.CoordinateStringBuilder
      extended by org.opensourcephysics.display.axes.CartesianCoordinateStringBuilder
          extended by org.opensourcephysics.media.core.VidCartesianCoordinateStringBuilder

public class VidCartesianCoordinateStringBuilder
extends CartesianCoordinateStringBuilder

A coordinate string builder for a video panel.


Field Summary
 
Fields inherited from class org.opensourcephysics.display.axes.CoordinateStringBuilder
decimalFormat, scientificFormat, xLabel, yLabel
 
Constructor Summary
protected VidCartesianCoordinateStringBuilder()
           
protected VidCartesianCoordinateStringBuilder(java.lang.String xLabel, java.lang.String yLabel)
           
 
Method Summary
 java.lang.String getCoordinateString(double x, double y)
          Returns the specified xy coordinates in a string.
 java.lang.String getCoordinateString(DrawingPanel panel, java.awt.event.MouseEvent e)
          Converts the pixel coordinates in a mouse event into world coordinates and return these coordinates in a string.
 
Methods inherited from class org.opensourcephysics.display.axes.CartesianCoordinateStringBuilder
setCoordinateLabels
 
Methods inherited from class org.opensourcephysics.display.axes.CoordinateStringBuilder
createCartesian, createPolar, createPolar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VidCartesianCoordinateStringBuilder

protected VidCartesianCoordinateStringBuilder()

VidCartesianCoordinateStringBuilder

protected VidCartesianCoordinateStringBuilder(java.lang.String xLabel,
                                              java.lang.String yLabel)
Method Detail

getCoordinateString

public java.lang.String getCoordinateString(DrawingPanel panel,
                                            java.awt.event.MouseEvent e)
Converts the pixel coordinates in a mouse event into world coordinates and return these coordinates in a string.

Overrides:
getCoordinateString in class CartesianCoordinateStringBuilder
Parameters:
panel - the drawing panel
e - the mouse event
Returns:
the coordinate string

getCoordinateString

public java.lang.String getCoordinateString(double x,
                                            double y)
Returns the specified xy coordinates in a string.

Parameters:
x - the x
y - the y
Returns:
the coordinate string