Class PolarPlot
- All Implemented Interfaces:
Serializable,Cloneable,EventListener,AnnotationChangeListener,AxisChangeListener,MarkerChangeListener,RendererChangeListener,LegendItemSource,ValueAxisPlot,Zoomable,PublicCloneable,DatasetChangeListener
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe default angle offset.static final doubleThe default angle tick unit size.static final PaintThe default grid line paint.static final StrokeThe default grid line stroke.protected static ResourceBundleThe resourceBundle for the localization.Fields inherited from class org.jfree.chart.plot.Plot
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PolarPlot(XYDataset dataset, ValueAxis radiusAxis, PolarItemRenderer renderer) Creates a new plot. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCornerTextItem(String text) Add text to be displayed in the lower right hand corner and sends aPlotChangeEventto all registered listeners.protected ListbuildRadialTicks(List allTicks) Create a list of ticks based on the given list and plot properties.protected TextAnchorcalculateTextAnchor(double angleDegrees) Calculate the text position for the given degrees.voidClear the list of corner text items and sends aPlotChangeEventto all registered listeners.clone()Returns a clone of the plot.voiddatasetChanged(DatasetChangeEvent event) Receives notification of a change to the plot's m_Dataset.voiddraw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info) Draws the plot on a Java 2D graphics device (such as the screen or a printer).protected AxisStatedrawAxis(ValueAxis axis, PolarAxisLocation location, Graphics2D g2, Rectangle2D plotArea) Draws the axis with the specified index.protected voiddrawCornerTextItems(Graphics2D g2, Rectangle2D area) Draws the corner text items.protected voiddrawGridlines(Graphics2D g2, Rectangle2D dataArea, List angularTicks, List radialTicks) Draws the gridlines for the plot, if they are visible.booleanTests this plot for equality with another object.Returns the paint for the grid lines (if any) plotted against the angular axis.Returns the stroke for the grid-lines (if any) plotted against the angular axis.Returns the font used to display the angle labels.Returns the paint used to display the angle labels.doubleReturns the offset that is used for all angles.Returns the tick unit that controls the spacing of the angular grid lines.getAxis()Returns the primary axis for the plot.getAxis(int index) Returns an axis for the plot.intReturns the number of domain axes.getAxisForDataset(int index) Returns the axis for a dataset.intgetAxisIndex(ValueAxis axis) Returns the index of the given axis.Returns the location of the primary axis.getAxisLocation(int index) Returns the location for an axis.getDataRange(ValueAxis axis) Returns the range for the specified axis.Returns the primary dataset for the plot.getDataset(int index) Returns the dataset with the specified index, if any.intReturns the number of datasets.Returns the fixed legend items, if any.intgetIndexOf(PolarItemRenderer renderer) Returns the index of the specified renderer, or-1if the renderer is not assigned to this plot.Returns the legend items for the plot.intReturns the margin around the plot area.Returns the orientation of the plot.Returns the plot type as a string.Returns the paint for the grid lines (if any) plotted against the radius axis.Returns the stroke for the grid lines (if any) plotted against the radius axis.Returns the primary renderer.getRenderer(int index) Returns the renderer at the specified index, if there is one.intReturns the index of the specified dataset, or-1if the dataset does not belong to the plot.booleanReturnstrueif the angular gridlines are visible, andfalseotherwise.booleanReturns a flag that controls whether or not the angle labels are visible.booleanGet the direction for growing angle degrees.booleanReturnsfalsealways.booleanReturnstrueif the radius axis grid is visible, andfalseotherwise.booleanReturn the current value of the flag indicating if radial minor grid-lines will be drawn or not.booleanReturnstrueto indicate that the range axis is zoomable.voidmapDatasetToAxes(int index, List axisIndices) Maps the specified dataset to the axes in the list.voidmapDatasetToAxis(int index, int axisIndex) Maps a dataset to a particular axis.protected ListGenerates a list of tick values for the angular tick marks.voidremoveCornerTextItem(String text) Remove the given text from the list of corner text items and sends aPlotChangeEventto all registered listeners.protected voidrender(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info) Draws a representation of the data within the dataArea region, using the current m_Renderer.voidNotifies all registered listeners of a property change.voidsetAngleGridlinePaint(Paint paint) Sets the paint for the grid lines plotted against the angular axis.voidsetAngleGridlineStroke(Stroke stroke) Sets the stroke for the grid lines plotted against the angular axis and sends aPlotChangeEventto all registered listeners.voidsetAngleGridlinesVisible(boolean visible) Sets the flag that controls whether or not the angular grid-lines are visible.voidsetAngleLabelFont(Font font) Sets the font used to display the angle labels and sends aPlotChangeEventto all registered listeners.voidsetAngleLabelPaint(Paint paint) Sets the paint used to display the angle labels and sends aPlotChangeEventto all registered listeners.voidsetAngleLabelsVisible(boolean visible) Sets the flag that controls whether or not the angle labels are visible, and sends aPlotChangeEventto all registered listeners.voidsetAngleOffset(double offset) Sets the offset that is used for all angles and sends aPlotChangeEventto all registered listeners.voidsetAngleTickUnit(TickUnit unit) Sets the tick unit that controls the spacing of the angular grid lines, and sends aPlotChangeEventto all registered listeners.voidSets an axis for the plot and sends aPlotChangeEventto all registered listeners.voidSets an axis for the plot and, if requested, sends aPlotChangeEventto all registered listeners.voidSets the primary axis for the plot and sends aPlotChangeEventto all registered listeners.voidsetAxisLocation(int index, PolarAxisLocation location) Sets the location for an axis and sends aPlotChangeEventto all registered listeners.voidsetAxisLocation(int index, PolarAxisLocation location, boolean notify) Sets the axis location for an axis and, if requested, sends aPlotChangeEventto all registered listeners.voidsetAxisLocation(PolarAxisLocation location) Sets the location of the primary axis and sends aPlotChangeEventto all registered listeners.voidsetAxisLocation(PolarAxisLocation location, boolean notify) Sets the location of the primary axis and, if requested, sends aPlotChangeEventto all registered listeners.voidsetCounterClockwise(boolean counterClockwise) Sets the flag for increasing angle degrees direction.voidsetDataset(int index, XYDataset dataset) Sets a dataset for the plot, replacing the existing dataset at the same index if there is one, and sends alink PlotChangeEventto all registered listeners.voidsetDataset(XYDataset dataset) Sets the primary dataset for the plot, replacing the existing dataset if there is one, and sends alink PlotChangeEventto all registered listeners.voidSets the fixed legend items for the plot.voidsetMargin(int margin) Set the margin around the plot area and sends aPlotChangeEventto all registered listeners.voidsetRadiusGridlinePaint(Paint paint) Sets the paint for the grid lines plotted against the radius axis and sends aPlotChangeEventto all registered listeners.voidsetRadiusGridlineStroke(Stroke stroke) Sets the stroke for the grid lines plotted against the radius axis and sends aPlotChangeEventto all registered listeners.voidsetRadiusGridlinesVisible(boolean visible) Sets the flag that controls whether or not the radius axis grid lines are visible.voidsetRadiusMinorGridlinesVisible(boolean flag) Set the flag that determines if radial minor grid-lines will be drawn, and sends aPlotChangeEventto all registered listeners.voidsetRenderer(int index, PolarItemRenderer renderer) Sets a renderer and sends aPlotChangeEventto all registered listeners.voidsetRenderer(int index, PolarItemRenderer renderer, boolean notify) Sets a renderer and, if requested, sends aPlotChangeEventto all registered listeners.voidsetRenderer(PolarItemRenderer renderer) Sets the primary renderer, and notifies all listeners of a change to the plot.translateToJava2D(double angleDegrees, double radius, ValueAxis axis, Rectangle2D dataArea) Translates a (theta, radius) pair into Java2D coordinates.voidzoom(double percent) Zooms the axis ranges by the specified percentage about the anchor point.voidzoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source) This method is required by theZoomableinterface, but since the plot does not have any domain axes, it does nothing.voidzoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source) This method is required by theZoomableinterface, but since the plot does not have any domain axes, it does nothing.voidzoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source, boolean useAnchor) This method is required by theZoomableinterface, but since the plot does not have any domain axes, it does nothing.voidzoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source) Zooms in on the range axes.voidzoomRangeAxes(double factor, PlotRenderingInfo state, Point2D source) Multiplies the range on the range axis/axes by the specified factor.voidzoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source, boolean useAnchor) Multiplies the range on the range axis by the specified factor.Methods inherited from class org.jfree.chart.plot.Plot
addChangeListener, annotationChanged, axisChanged, canEqual, createAndAddEntity, drawBackground, drawBackgroundImage, drawNoDataMessage, drawOutline, fetchElementHintingFlag, fillBackground, fillBackground, fireChangeEvent, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getChart, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, handleClick, hashCode, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setChart, setDatasetGroup, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent
-
Field Details
-
DEFAULT_ANGLE_TICK_UNIT_SIZE
The default angle tick unit size.- See Also:
-
DEFAULT_ANGLE_OFFSET
The default angle offset.- See Also:
-
DEFAULT_GRIDLINE_STROKE
The default grid line stroke. -
DEFAULT_GRIDLINE_PAINT
The default grid line paint. -
localizationResources
The resourceBundle for the localization.
-
-
Constructor Details
-
PolarPlot
public PolarPlot()Default constructor. -
PolarPlot
Creates a new plot.- Parameters:
dataset- the dataset (nullpermitted).radiusAxis- the radius axis (nullpermitted).renderer- the renderer (nullpermitted).
-
-
Method Details
-
getPlotType
Returns the plot type as a string.- Specified by:
getPlotTypein classPlot- Returns:
- A short string describing the type of plot.
-
getAxis
Returns the primary axis for the plot.- Returns:
- The primary axis (possibly
null). - See Also:
-
getAxis
Returns an axis for the plot.- Parameters:
index- the axis index.- Returns:
- The axis (
nullpossible). - See Also:
-
setAxis
Sets the primary axis for the plot and sends aPlotChangeEventto all registered listeners.- Parameters:
axis- the new primary axis (nullpermitted).
-
setAxis
Sets an axis for the plot and sends aPlotChangeEventto all registered listeners.- Parameters:
index- the axis index.axis- the axis (nullpermitted).- See Also:
-
setAxis
Sets an axis for the plot and, if requested, sends aPlotChangeEventto all registered listeners.- Parameters:
index- the axis index.axis- the axis (nullpermitted).notify- notify listeners?- See Also:
-
getAxisLocation
Returns the location of the primary axis.- Returns:
- The location (never
null). - See Also:
-
getAxisLocation
Returns the location for an axis.- Parameters:
index- the axis index.- Returns:
- The location (never
null). - See Also:
-
setAxisLocation
Sets the location of the primary axis and sends aPlotChangeEventto all registered listeners.- Parameters:
location- the location (nullnot permitted).- See Also:
-
setAxisLocation
Sets the location of the primary axis and, if requested, sends aPlotChangeEventto all registered listeners.- Parameters:
location- the location (nullnot permitted).notify- notify listeners?- See Also:
-
setAxisLocation
Sets the location for an axis and sends aPlotChangeEventto all registered listeners.- Parameters:
index- the axis index.location- the location (nullnot permitted).- See Also:
-
setAxisLocation
Sets the axis location for an axis and, if requested, sends aPlotChangeEventto all registered listeners.- Parameters:
index- the axis index.location- the location (nullnot permitted).notify- notify listeners?
-
getAxisCount
Returns the number of domain axes.- Returns:
- The axis count.
-
getDataset
Returns the primary dataset for the plot.- Returns:
- The primary dataset (possibly
null). - See Also:
-
getDataset
Returns the dataset with the specified index, if any.- Parameters:
index- the dataset index.- Returns:
- The dataset (possibly
null). - See Also:
-
setDataset
Sets the primary dataset for the plot, replacing the existing dataset if there is one, and sends alink PlotChangeEventto all registered listeners.- Parameters:
dataset- the dataset (nullpermitted).- See Also:
-
setDataset
Sets a dataset for the plot, replacing the existing dataset at the same index if there is one, and sends alink PlotChangeEventto all registered listeners.- Parameters:
index- the dataset index.dataset- the dataset (nullpermitted).- See Also:
-
getDatasetCount
Returns the number of datasets.- Returns:
- The number of datasets.
-
indexOf
Returns the index of the specified dataset, or-1if the dataset does not belong to the plot.- Parameters:
dataset- the dataset (nullnot permitted).- Returns:
- The index.
-
getRenderer
Returns the primary renderer.- Returns:
- The renderer (possibly
null). - See Also:
-
getRenderer
Returns the renderer at the specified index, if there is one.- Parameters:
index- the renderer index.- Returns:
- The renderer (possibly
null). - See Also:
-
setRenderer
Sets the primary renderer, and notifies all listeners of a change to the plot. If the renderer is set tonull, no data items will be drawn for the corresponding dataset.- Parameters:
renderer- the new renderer (nullpermitted).- See Also:
-
setRenderer
Sets a renderer and sends aPlotChangeEventto all registered listeners.- Parameters:
index- the index.renderer- the renderer.- See Also:
-
setRenderer
Sets a renderer and, if requested, sends aPlotChangeEventto all registered listeners.- Parameters:
index- the index.renderer- the renderer.notify- notify listeners?- See Also:
-
getAngleTickUnit
Returns the tick unit that controls the spacing of the angular grid lines.- Returns:
- The tick unit (never
null).
-
setAngleTickUnit
Sets the tick unit that controls the spacing of the angular grid lines, and sends aPlotChangeEventto all registered listeners.- Parameters:
unit- the tick unit (nullnot permitted).
-
getAngleOffset
Returns the offset that is used for all angles.- Returns:
- The offset for the angles.
-
setAngleOffset
Sets the offset that is used for all angles and sends aPlotChangeEventto all registered listeners. This is useful to let 0 degrees be at the north, east, south or west side of the chart.- Parameters:
offset- The offset
-
isCounterClockwise
Get the direction for growing angle degrees.- Returns:
trueif angle increases counterclockwise,falseotherwise.
-
setCounterClockwise
Sets the flag for increasing angle degrees direction.truefor counterclockwise,falsefor clockwise.- Parameters:
counterClockwise- The flag.
-
isAngleLabelsVisible
Returns a flag that controls whether or not the angle labels are visible.- Returns:
- A boolean.
- See Also:
-
setAngleLabelsVisible
Sets the flag that controls whether or not the angle labels are visible, and sends aPlotChangeEventto all registered listeners.- Parameters:
visible- the flag.- See Also:
-
getAngleLabelFont
Returns the font used to display the angle labels.- Returns:
- A font (never
null). - See Also:
-
setAngleLabelFont
Sets the font used to display the angle labels and sends aPlotChangeEventto all registered listeners.- Parameters:
font- the font (nullnot permitted).- See Also:
-
getAngleLabelPaint
Returns the paint used to display the angle labels.- Returns:
- A paint (never
null). - See Also:
-
setAngleLabelPaint
Sets the paint used to display the angle labels and sends aPlotChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).
-
isAngleGridlinesVisible
Returnstrueif the angular gridlines are visible, andfalseotherwise.- Returns:
trueorfalse.- See Also:
-
setAngleGridlinesVisible
Sets the flag that controls whether or not the angular grid-lines are visible.If the flag value is changed, a
PlotChangeEventis sent to all registered listeners.- Parameters:
visible- the new value of the flag.- See Also:
-
getAngleGridlineStroke
Returns the stroke for the grid-lines (if any) plotted against the angular axis.- Returns:
- The stroke (possibly
null). - See Also:
-
setAngleGridlineStroke
Sets the stroke for the grid lines plotted against the angular axis and sends aPlotChangeEventto all registered listeners.If you set this to
null, no grid lines will be drawn.- Parameters:
stroke- the stroke (nullpermitted).- See Also:
-
getAngleGridlinePaint
Returns the paint for the grid lines (if any) plotted against the angular axis.- Returns:
- The paint (possibly
null). - See Also:
-
setAngleGridlinePaint
Sets the paint for the grid lines plotted against the angular axis.If you set this to
null, no grid lines will be drawn.- Parameters:
paint- the paint (nullpermitted).- See Also:
-
isRadiusGridlinesVisible
Returnstrueif the radius axis grid is visible, andfalseotherwise.- Returns:
trueorfalse.- See Also:
-
setRadiusGridlinesVisible
Sets the flag that controls whether or not the radius axis grid lines are visible.If the flag value is changed, a
PlotChangeEventis sent to all registered listeners.- Parameters:
visible- the new value of the flag.- See Also:
-
getRadiusGridlineStroke
Returns the stroke for the grid lines (if any) plotted against the radius axis.- Returns:
- The stroke (possibly
null). - See Also:
-
setRadiusGridlineStroke
Sets the stroke for the grid lines plotted against the radius axis and sends aPlotChangeEventto all registered listeners.If you set this to
null, no grid lines will be drawn.- Parameters:
stroke- the stroke (nullpermitted).- See Also:
-
getRadiusGridlinePaint
Returns the paint for the grid lines (if any) plotted against the radius axis.- Returns:
- The paint (possibly
null). - See Also:
-
setRadiusGridlinePaint
Sets the paint for the grid lines plotted against the radius axis and sends aPlotChangeEventto all registered listeners.If you set this to
null, no grid lines will be drawn.- Parameters:
paint- the paint (nullpermitted).- See Also:
-
isRadiusMinorGridlinesVisible
Return the current value of the flag indicating if radial minor grid-lines will be drawn or not.- Returns:
- Returns
trueif radial minor grid-lines are drawn.
-
setRadiusMinorGridlinesVisible
Set the flag that determines if radial minor grid-lines will be drawn, and sends aPlotChangeEventto all registered listeners.- Parameters:
flag-trueto draw the radial minor grid-lines,falseto hide them.
-
getMargin
Returns the margin around the plot area.- Returns:
- The actual margin in pixels.
-
setMargin
Set the margin around the plot area and sends aPlotChangeEventto all registered listeners.- Parameters:
margin- The new margin in pixels.
-
getFixedLegendItems
Returns the fixed legend items, if any.- Returns:
- The legend items (possibly
null). - See Also:
-
setFixedLegendItems
Sets the fixed legend items for the plot. Leave this set tonullif you prefer the legend items to be created automatically.- Parameters:
items- the legend items (nullpermitted).- See Also:
-
addCornerTextItem
Add text to be displayed in the lower right hand corner and sends aPlotChangeEventto all registered listeners.- Parameters:
text- the text to display (nullnot permitted).- See Also:
-
removeCornerTextItem
Remove the given text from the list of corner text items and sends aPlotChangeEventto all registered listeners.- Parameters:
text- the text to remove (nullignored).- See Also:
-
clearCornerTextItems
Clear the list of corner text items and sends aPlotChangeEventto all registered listeners. -
refreshAngleTicks
Generates a list of tick values for the angular tick marks.- Returns:
- A list of
NumberTickinstances.
-
calculateTextAnchor
Calculate the text position for the given degrees.- Parameters:
angleDegrees- the angle in degrees.- Returns:
- The optimal text anchor.
-
mapDatasetToAxis
Maps a dataset to a particular axis. All data will be plotted against axis zero by default, no mapping is required for this case.- Parameters:
index- the dataset index (zero-based).axisIndex- the axis index.
-
mapDatasetToAxes
Maps the specified dataset to the axes in the list. Note that the conversion of data values into Java2D space is always performed using the first axis in the list.- Parameters:
index- the dataset index (zero-based).axisIndices- the axis indices (nullpermitted).
-
getAxisForDataset
Returns the axis for a dataset.- Parameters:
index- the dataset index.- Returns:
- The axis.
-
getAxisIndex
Returns the index of the given axis.- Parameters:
axis- the axis.- Returns:
- The axis index or -1 if axis is not used in this plot.
-
getIndexOf
Returns the index of the specified renderer, or-1if the renderer is not assigned to this plot.- Parameters:
renderer- the renderer (nullpermitted).- Returns:
- The renderer index.
-
draw
public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info) Draws the plot on a Java 2D graphics device (such as the screen or a printer).This plot relies on a
PolarItemRendererto draw each item in the plot. This allows the visual representation of the data to be changed easily.The optional info argument collects information about the rendering of the plot (dimensions, tooltip information etc). Just pass in
nullif you do not need this information. -
drawCornerTextItems
Draws the corner text items.- Parameters:
g2- the drawing surface.area- the area.
-
drawAxis
protected AxisState drawAxis(ValueAxis axis, PolarAxisLocation location, Graphics2D g2, Rectangle2D plotArea) Draws the axis with the specified index.- Parameters:
axis- the axis.location- the axis location.g2- the graphics target.plotArea- the plot area.- Returns:
- The axis state.
-
render
Draws a representation of the data within the dataArea region, using the current m_Renderer.- Parameters:
g2- the graphics device.dataArea- the region in which the data is to be drawn.info- an optional object for collection dimension information (nullpermitted).
-
drawGridlines
protected void drawGridlines(Graphics2D g2, Rectangle2D dataArea, List angularTicks, List radialTicks) Draws the gridlines for the plot, if they are visible.- Parameters:
g2- the graphics device.dataArea- the data area.angularTicks- the ticks for the angular axis.radialTicks- the ticks for the radial axis.
-
buildRadialTicks
Create a list of ticks based on the given list and plot properties. Only ticks of a specific type may be in the result list.- Parameters:
allTicks- A list of all available ticks for the primary axis.nullnot permitted.- Returns:
- Ticks to use for radial gridlines.
-
zoom
Zooms the axis ranges by the specified percentage about the anchor point. -
getDataRange
Returns the range for the specified axis.- Specified by:
getDataRangein interfaceValueAxisPlot- Parameters:
axis- the axis.- Returns:
- The range.
-
datasetChanged
Receives notification of a change to the plot's m_Dataset.The axis ranges are updated if necessary.
- Specified by:
datasetChangedin interfaceDatasetChangeListener- Overrides:
datasetChangedin classPlot- Parameters:
event- information about the event (not used here).
-
rendererChanged
Notifies all registered listeners of a property change.One source of property change events is the plot's m_Renderer.
- Specified by:
rendererChangedin interfaceRendererChangeListener- Parameters:
event- information about the property change.
-
getLegendItems
Returns the legend items for the plot. Each legend item is generated by the plot's m_Renderer, since the m_Renderer is responsible for the visual representation of the data.- Specified by:
getLegendItemsin interfaceLegendItemSource- Overrides:
getLegendItemsin classPlot- Returns:
- The legend items.
-
equals
Tests this plot for equality with another object. -
clone
Returns a clone of the plot.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classPlot- Returns:
- A clone.
- Throws:
CloneNotSupportedException- this can occur if some component of the plot cannot be cloned.
-
zoomDomainAxes
This method is required by theZoomableinterface, but since the plot does not have any domain axes, it does nothing.- Specified by:
zoomDomainAxesin interfaceZoomable- Parameters:
factor- the zoom factor.state- the plot state.source- the source point (in Java2D coordinates).- See Also:
-
zoomDomainAxes
public void zoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source, boolean useAnchor) This method is required by theZoomableinterface, but since the plot does not have any domain axes, it does nothing.- Specified by:
zoomDomainAxesin interfaceZoomable- Parameters:
factor- the zoom factor.state- the plot state.source- the source point (in Java2D coordinates).useAnchor- use source point as zoom anchor?- See Also:
-
zoomDomainAxes
public void zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source) This method is required by theZoomableinterface, but since the plot does not have any domain axes, it does nothing.- Specified by:
zoomDomainAxesin interfaceZoomable- Parameters:
lowerPercent- the new lower bound.upperPercent- the new upper bound.state- the plot state.source- the source point (in Java2D coordinates).- See Also:
-
zoomRangeAxes
Multiplies the range on the range axis/axes by the specified factor.- Specified by:
zoomRangeAxesin interfaceZoomable- Parameters:
factor- the zoom factor.state- the plot state.source- the source point (in Java2D coordinates).- See Also:
-
zoomRangeAxes
Multiplies the range on the range axis by the specified factor.- Specified by:
zoomRangeAxesin interfaceZoomable- Parameters:
factor- the zoom factor.info- the plot rendering info.source- the source point (in Java2D space).useAnchor- use source point as zoom anchor?- See Also:
-
zoomRangeAxes
public void zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source) Zooms in on the range axes.- Specified by:
zoomRangeAxesin interfaceZoomable- Parameters:
lowerPercent- the new lower bound.upperPercent- the new upper bound.state- the plot state.source- the source point (in Java2D coordinates).- See Also:
-
isDomainZoomable
Returnsfalsealways.- Specified by:
isDomainZoomablein interfaceZoomable- Returns:
falsealways.- See Also:
-
isRangeZoomable
Returnstrueto indicate that the range axis is zoomable.- Specified by:
isRangeZoomablein interfaceZoomable- Returns:
true.- See Also:
-
getOrientation
Returns the orientation of the plot.- Specified by:
getOrientationin interfaceZoomable- Returns:
- The orientation.
-
translateToJava2D
public Point translateToJava2D(double angleDegrees, double radius, ValueAxis axis, Rectangle2D dataArea) Translates a (theta, radius) pair into Java2D coordinates. Ifradiusis less than the lower bound of the axis, then this method returns the centre point.- Parameters:
angleDegrees- the angle in degrees.radius- the radius.axis- the axis.dataArea- the data area.- Returns:
- A point in Java2D space.
-