public abstract class EqAreaPlot extends Plot
Modifier and Type | Field and Description |
---|---|
protected java.awt.Graphics2D |
g
The graphics object to which to draw the plot.
|
protected java.util.prefs.Preferences |
prefs
The preferences governing various options for this plot.
|
protected int |
radius
The radius of the projection.
|
protected int |
xo
The x co-ordinate of the projection's origin.
|
protected int |
yo
The y co-ordinate of the projection's origin.
|
DEFAULT_PLOT_POSITIONS, dimensions, params, PLOT_POINT_SIZE
Modifier | Constructor and Description |
---|---|
protected |
EqAreaPlot(GraphDisplay parent,
PlotParams params,
java.util.prefs.Preferences prefs)
Creates a new equal-area plot with the supplies parameters.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawAxes()
Draws the axes of the plot.
|
protected void |
drawGreatCircle(Vec3 pole,
boolean drawPole)
Projects and draws a great circle
|
protected void |
drawGreatCircleSegment(Vec3 v0,
Vec3 v1)
Draws the projection of a specified great-circle segment.
|
protected void |
drawGreatCircleSegment(Vec3 v0,
Vec3 v1,
Vec3 dir)
Draws the projection of a specified great-circle segment.
|
protected void |
drawLineSegments(java.util.List<Vec3> vs)
Projects and draws the supplied vectors.
|
abstract java.lang.String |
getShortName()
Returns a short, human-readable name for this plot.
|
protected java.awt.geom.Point2D.Double |
project(Vec3 v)
Projects the direction of a three-dimensional vector into plot co-ordinates.
|
protected LineCache |
projectGreatCircleSegment(Vec3 v0,
Vec3 v1)
Create a projection of a great-circle segment.
|
protected void |
projectLineSegments(java.util.List<Vec3> vs,
LineCache cache)
Project and cache line segments.
|
protected void |
updatePlotDimensions(java.awt.Graphics2D g)
|
protected java.awt.geom.Path2D.Double |
vectorsToPath(java.util.List<Vec3> vectors)
Projects a list of three-dimensional vectors into a two-dimensional
path in the current plot co-ordinates.
|
addPoint, addSampleClickListener, applyTextAttributes, areTreatmentStepsLabelled, clearPoints, cropRectangle, draw, drawPoints, getDashedStroke, getDatumForPosition, getDimensions, getDimensionsAsString, getFontSize, getMargin, getName, getNiceName, getStroke, getTextAttributes, getTickLength, getUnitSize, isVisible, mouseClicked, putText, putText, removeSampleClickListener, selectByRectangle, setDimensions, setDimensionsToDefault, setVisible, timesTenToThe, timesTenToThe, writeString, writeString
protected java.awt.Graphics2D g
updatePlotDimensions(Graphics2D)
.protected int xo
updatePlotDimensions(Graphics2D)
.protected int yo
updatePlotDimensions(Graphics2D)
.protected int radius
updatePlotDimensions(Graphics2D)
.protected java.util.prefs.Preferences prefs
protected EqAreaPlot(GraphDisplay parent, PlotParams params, java.util.prefs.Preferences prefs)
parent
- the graph display containing the plotparams
- the plot parametersprefs
- the preferences containing the plot configurationprotected void updatePlotDimensions(java.awt.Graphics2D g)
g
, radius
, xo
,
and yo
according to the supplied argument and the
current plot dimensions.
This method should be called before redrawing the plot.g
- the field g
will be set to this valueprotected void drawAxes()
protected java.awt.geom.Path2D.Double vectorsToPath(java.util.List<Vec3> vectors)
vectors
- the vectors to projectprotected void projectLineSegments(java.util.List<Vec3> vs, LineCache cache)
vs
- vectors to projectcache
- line cache in which to store projected vector pathprotected void drawLineSegments(java.util.List<Vec3> vs)
vs
- the vectors to drawprotected LineCache projectGreatCircleSegment(Vec3 v0, Vec3 v1)
v0
- first endpoint of the great-circle segmentv1
- second endpoint of the great-circle segmentprotected void drawGreatCircleSegment(Vec3 v0, Vec3 v1)
v0
- one end of a great-circle segmentv1
- the other end of a great-circle segmentprotected void drawGreatCircleSegment(Vec3 v0, Vec3 v1, Vec3 dir)
dir
will be drawn.v0
- one end of a great-circle segmentv1
- the other end of a great-circle segmentdir
- vector used to choose which path to drawprotected void drawGreatCircle(Vec3 pole, boolean drawPole)
pole
- the pole to the great circle which is to be drawndrawPole
- true
to mark the pole on the plotprotected java.awt.geom.Point2D.Double project(Vec3 v)
v
- a well-formed vectorpublic abstract java.lang.String getShortName()