|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.display.axes.CoordinateStringBuilder
public abstract class CoordinateStringBuilder
Builds a coordinate string from a mouse event for an axis type.
| Field Summary | |
|---|---|
protected java.text.DecimalFormat |
decimalFormat
|
protected java.text.DecimalFormat |
scientificFormat
|
protected java.lang.String |
xLabel
|
protected java.lang.String |
yLabel
|
| Constructor Summary | |
|---|---|
CoordinateStringBuilder()
|
|
| Method Summary | |
|---|---|
static CoordinateStringBuilder |
createCartesian()
Creates the default builder for cartesian coordiantes. |
static CoordinateStringBuilder |
createPolar()
Creates the default builder for polar coordinates. |
static CoordinateStringBuilder |
createPolar(java.lang.String rLabel,
java.lang.String phiLabel,
double phiOffset)
Creates the default builder for polar coordinates. |
abstract 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 xLabel,
java.lang.String yLabel)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.text.DecimalFormat scientificFormat
protected java.text.DecimalFormat decimalFormat
protected java.lang.String xLabel
protected java.lang.String yLabel
| Constructor Detail |
|---|
public CoordinateStringBuilder()
| Method Detail |
|---|
public void setCoordinateLabels(java.lang.String xLabel,
java.lang.String yLabel)
public abstract java.lang.String getCoordinateString(DrawingPanel panel,
java.awt.event.MouseEvent e)
e - the mouse event
public static CoordinateStringBuilder createCartesian()
public static CoordinateStringBuilder createPolar()
public static CoordinateStringBuilder createPolar(java.lang.String rLabel,
java.lang.String phiLabel,
double phiOffset)
rLabel - StringphiLabel - StringphiOffset - double
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||