org.opensourcephysics.display.axes
Class PolarCoordinateStringBuilder
java.lang.Object
org.opensourcephysics.display.axes.CoordinateStringBuilder
org.opensourcephysics.display.axes.PolarCoordinateStringBuilder
public class PolarCoordinateStringBuilder
- extends CoordinateStringBuilder
Builds a coordinate string from a mouse event for an axis type.
Field Summary |
protected double |
cos
|
protected java.lang.String |
phiLabel
|
protected java.lang.String |
rLabel
|
protected double |
sin
|
Method Summary |
java.lang.String |
getCoordinateString(DrawingPanel panel,
java.awt.event.MouseEvent e)
Converts a the pixel coordinates in a mouse event into world coordinates and
return these coordinates in a string. |
void |
setCoordinateLabels(java.lang.String rLabel,
java.lang.String phiLabel)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rLabel
protected java.lang.String rLabel
phiLabel
protected java.lang.String phiLabel
sin
protected double sin
cos
protected double cos
PolarCoordinateStringBuilder
public PolarCoordinateStringBuilder()
- Constructor PolarCoordinateStringBuilder
PolarCoordinateStringBuilder
public PolarCoordinateStringBuilder(java.lang.String rLabel,
java.lang.String phiLabel,
double phiZero)
- Constructor PolarCoordinateStringBuilder
- Parameters:
rLabel
- phiLabel
- phiZero
-
PolarCoordinateStringBuilder
public PolarCoordinateStringBuilder(java.lang.String rLabel,
java.lang.String phiLabel)
- Constructor PolarCoordinateStringBuilder
- Parameters:
rLabel
- phiLabel
-
setCoordinateLabels
public void setCoordinateLabels(java.lang.String rLabel,
java.lang.String phiLabel)
- Overrides:
setCoordinateLabels
in class CoordinateStringBuilder
getCoordinateString
public java.lang.String getCoordinateString(DrawingPanel panel,
java.awt.event.MouseEvent e)
- Converts a the pixel coordinates in a mouse event into world coordinates and
return these coordinates in a string.
- Specified by:
getCoordinateString
in class CoordinateStringBuilder
- Parameters:
e
- the mouse event
- Returns:
- the coordinate string