org.jfree.chart

Class PolarChartPanel

Implemented Interfaces:
ActionListener, ChartChangeListener, EventListener, ChartProgressListener, MouseListener, MouseMotionListener, Printable, Serializable

public class PolarChartPanel
extends ChartPanel

PolarChartPanel is the top level object for using the PolarPlot. Since this class has a JPanel in the inheritance hierarchy, one uses this class to integrate the Polar plot into their application.

The main modification to ChartPanel is the popup menu. It removes ChartPanel's versions of:

and replaces them with versions more appropriate for PolarPlot.

Field Summary

Fields inherited from class org.jfree.chart.ChartPanel

DEFAULT_BUFFER_USED, DEFAULT_HEIGHT, DEFAULT_MAXIMUM_DRAW_HEIGHT, DEFAULT_MAXIMUM_DRAW_WIDTH, DEFAULT_MINIMUM_DRAW_HEIGHT, DEFAULT_MINIMUM_DRAW_WIDTH, DEFAULT_WIDTH, DEFAULT_ZOOM_TRIGGER_DISTANCE, PRINT_COMMAND, PROPERTIES_COMMAND, SAVE_COMMAND, ZOOM_IN_BOTH_COMMAND, ZOOM_IN_DOMAIN_COMMAND, ZOOM_IN_RANGE_COMMAND, ZOOM_OUT_BOTH_COMMAND, ZOOM_OUT_DOMAIN_COMMAND, ZOOM_OUT_RANGE_COMMAND, ZOOM_RESET_BOTH_COMMAND, ZOOM_RESET_DOMAIN_COMMAND, ZOOM_RESET_RANGE_COMMAND, localizationResources

Constructor Summary

PolarChartPanel(JFreeChart chart)
Constructs a JFreeChart panel.
PolarChartPanel(JFreeChart chart, boolean useBuffer)
Creates a new panel.

Method Summary

void
actionPerformed(ActionEvent event)
Handles action events generated by the popup menu.
protected JPopupMenu
createPopupMenu(boolean properties, boolean save, boolean print, boolean zoom)
Creates a popup menu for the panel.
void
setChart(JFreeChart chart)
Sets the chart that is displayed in the panel.

Methods inherited from class org.jfree.chart.ChartPanel

actionPerformed, addChartMouseListener, chartChanged, chartProgress, createChartPrintJob, createPopupMenu, displayPopupMenu, doEditChartProperties, doSaveAs, getAnchor, getChart, getChartRenderingInfo, getDismissDelay, getEntityForPoint, getFillZoomRectangle, getHorizontalAxisTrace, getHorizontalTraceLine, getInitialDelay, getListeners, getMaximumDrawHeight, getMaximumDrawWidth, getMinimumDrawHeight, getMinimumDrawWidth, getPopupMenu, getRefreshBuffer, getReshowDelay, getScaleX, getScaleY, getScreenDataArea, getScreenDataArea, getToolTipText, getVerticalAxisTrace, getVerticalTraceLine, getZoomInFactor, getZoomOutFactor, getZoomTriggerDistance, isDomainZoomable, isEnforceFileExtensions, isRangeZoomable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintComponent, print, removeChartMouseListener, restoreAutoBounds, restoreAutoDomainBounds, restoreAutoRangeBounds, scale, setAnchor, setChart, setDismissDelay, setDisplayToolTips, setDomainZoomable, setEnforceFileExtensions, setFillZoomRectangle, setHorizontalAxisTrace, setHorizontalTraceLine, setInitialDelay, setMaximumDrawHeight, setMaximumDrawWidth, setMinimumDrawHeight, setMinimumDrawWidth, setMouseZoomable, setMouseZoomable, setPopupMenu, setRangeZoomable, setRefreshBuffer, setReshowDelay, setVerticalAxisTrace, setVerticalTraceLine, setZoomInFactor, setZoomOutFactor, setZoomTriggerDistance, translateJava2DToScreen, translateScreenToJava2D, zoom, zoomInBoth, zoomInDomain, zoomInRange, zoomOutBoth, zoomOutDomain, zoomOutRange

Constructor Details

PolarChartPanel

public PolarChartPanel(JFreeChart chart)
Constructs a JFreeChart panel.
Parameters:
chart - the chart.

PolarChartPanel

public PolarChartPanel(JFreeChart chart,
                       boolean useBuffer)
Creates a new panel.
Parameters:
chart - the chart.
useBuffer - buffered?

Method Details

actionPerformed

public void actionPerformed(ActionEvent event)
Handles action events generated by the popup menu.
Overrides:
actionPerformed in interface ChartPanel
Parameters:
event - the event.

createPopupMenu

protected JPopupMenu createPopupMenu(boolean properties,
                                     boolean save,
                                     boolean print,
                                     boolean zoom)
Creates a popup menu for the panel.
Overrides:
createPopupMenu in interface ChartPanel
Parameters:
properties - include a menu item for the chart property editor.
save - include a menu item for saving the chart.
print - include a menu item for printing the chart.
zoom - include menu items for zooming.
Returns:
The popup menu.

setChart

public void setChart(JFreeChart chart)
Sets the chart that is displayed in the panel.
Overrides:
setChart in interface ChartPanel
Parameters:
chart - The chart.