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 doubleprotected Stringprotected Stringprotected doubleFields 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.voidsetCoordinateLabels(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:
setCoordinateLabelsin classCoordinateStringBuilder
-
getCoordinateString
Converts a the pixel coordinates in a mouse event into world coordinates and return these coordinates in a string.- Specified by:
getCoordinateStringin classCoordinateStringBuilder- Parameters:
e- the mouse event- Returns:
- the coordinate string
-