public abstract class EqualAreaPlot extends Plot
Modifier and Type | Field and Description |
---|---|
protected java.awt.Graphics2D |
cachedGraphics
The graphics object to which the plot is currently being drawn.
|
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 |
EqualAreaPlot(PlotParams parameters)
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)
Sets the fields
cachedGraphics , radius , xo , and yo
according to the supplied argument and the current plot dimensions. |
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, addVisibilityChangedListener, applyTextAttributes, areTreatmentStepsLabelled, clearPoints, cropRectangle, draw, drawPoints, getDashedStroke, getDimensions, getDimensionsAsString, getFontSize, getMargin, getName, getNiceName, getStroke, getTextAttributes, getTickLength, getTreatmentStepForPosition, getUnitSize, isVisible, mouseClicked, putText, putText, removeSampleClickListener, removeVisibilityChangedListener, selectByRectangle, setDimensions, setDimensionsToDefault, setVisible, timesTenToThe, timesTenToThe, writeString, writeString
protected java.awt.Graphics2D cachedGraphics
updatePlotDimensions(Graphics2D)
at the start of the drawing
process, and is then available as a convenience to both EqualAreaPlot and
its subclasses, as an alternative to explicitly passing the current
Graphics object around.protected int xo
updatePlotDimensions(Graphics2D)
.protected int yo
updatePlotDimensions(Graphics2D)
.protected int radius
updatePlotDimensions(Graphics2D)
.protected EqualAreaPlot(PlotParams parameters)
parameters
- the plot parametersprotected void updatePlotDimensions(java.awt.Graphics2D g)
cachedGraphics
, 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 cachedGraphics
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()