Class PolarCoordinateStringBuilder
java.lang.Object
org.opensourcephysics.display.axes.CoordinateStringBuilder
org.opensourcephysics.display.axes.PolarCoordinateStringBuilder
Builds a coordinate string from a mouse event for an axis type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double
protected String
protected String
protected double
Fields inherited from class org.opensourcephysics.display.axes.CoordinateStringBuilder
decimalFormat, scientificFormat, xLabel, yLabel
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor PolarCoordinateStringBuilderPolarCoordinateStringBuilder
(String rLabel, String phiLabel) Constructor PolarCoordinateStringBuilderPolarCoordinateStringBuilder
(String rLabel, String phiLabel, double phiZero) Constructor PolarCoordinateStringBuilder -
Method Summary
Modifier and TypeMethodDescriptiongetCoordinateString
(DrawingPanel panel, MouseEvent e) Converts a the pixel coordinates in a mouse event into world coordinates and return these coordinates in a string.void
setCoordinateLabels
(String rLabel, String phiLabel) Methods inherited from class org.opensourcephysics.display.axes.CoordinateStringBuilder
createCartesian, createPolar, createPolar
-
Field Details
-
rLabel
-
phiLabel
-
sin
protected double sin -
cos
protected double cos
-
-
Constructor Details
-
PolarCoordinateStringBuilder
public PolarCoordinateStringBuilder()Constructor PolarCoordinateStringBuilder -
PolarCoordinateStringBuilder
Constructor PolarCoordinateStringBuilder- Parameters:
rLabel
-phiLabel
-phiZero
-
-
PolarCoordinateStringBuilder
Constructor PolarCoordinateStringBuilder- Parameters:
rLabel
-phiLabel
-
-
-
Method Details
-
setCoordinateLabels
- Overrides:
setCoordinateLabels
in classCoordinateStringBuilder
-
getCoordinateString
Converts a the pixel coordinates in a mouse event into world coordinates and return these coordinates in a string.- Specified by:
getCoordinateString
in classCoordinateStringBuilder
- Parameters:
e
- the mouse event- Returns:
- the coordinate string
-