- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- org.jfree.chart.swing.ChartPanel
-
- org.jfree.chart.swing.PolarChartPanel
-
- All Implemented Interfaces:
ActionListener,MouseListener,MouseMotionListener,ImageObserver,MenuContainer,Printable,Serializable,EventListener,Accessible,ChartChangeListener,ChartProgressListener,OverlayChangeListener
public class PolarChartPanel extends ChartPanel
PolarChartPanelis the top level object for using thePolarPlot. Since this class has aJPanelin the inheritance hierarchy, one uses this class to integrate the Polar plot into their application.The main modification to
ChartPanelis the popup menu. It removesChartPanel's versions of:Zoom InZoom OutAuto Range
PolarPlot.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
-
Fields inherited from class org.jfree.chart.swing.ChartPanel
anchor, chart, chartBuffer, chartBufferHeight, chartBufferWidth, chartMouseListeners, COPY_COMMAND, DEFAULT_BUFFER_USED, DEFAULT_HEIGHT, DEFAULT_MAXIMUM_DRAW_HEIGHT, DEFAULT_MAXIMUM_DRAW_WIDTH, DEFAULT_MINIMUM_DRAW_HEIGHT, DEFAULT_MINIMUM_DRAW_WIDTH, DEFAULT_WIDTH, defaultDirectoryForSaveAs, domainZoomable, enforceFileExtensions, info, localizationResources, maximumDrawHeight, maximumDrawWidth, minimumDrawHeight, minimumDrawWidth, mouseWheelHandler, orientation, originalToolTipDismissDelay, originalToolTipInitialDelay, originalToolTipReshowDelay, overlays, ownToolTipDelaysActive, ownToolTipDismissDelay, ownToolTipInitialDelay, ownToolTipReshowDelay, panButtonMasks, panH, panLast, panMask, panW, popup, PRINT_COMMAND, PROPERTIES_COMMAND, rangeZoomable, refreshBuffer, SAVE_AS_PDF_COMMAND, SAVE_AS_PNG_COMMAND, SAVE_AS_PNG_SIZE_COMMAND, SAVE_AS_SVG_COMMAND, SAVE_COMMAND, scaleX, scaleY, serialVersionUID, useBuffer, 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, zoomAroundAnchor, zoomButtonMasks, zoomInBothMenuItem, zoomInDomainMenuItem, zoomInFactor, zoomInRangeMenuItem, zoomMask, zoomOutBothMenuItem, zoomOutDomainMenuItem, zoomOutFactor, zoomOutRangeMenuItem, zoomResetBothMenuItem, zoomResetDomainMenuItem, zoomResetRangeMenuItem
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
-
-
Constructor Summary
Constructors Constructor Description PolarChartPanel(JFreeChart chart)Constructs a JFreeChart panel.PolarChartPanel(JFreeChart chart, boolean useBuffer)Creates a new panel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent event)Handles action events generated by the popup menu.protected JPopupMenucreatePopupMenu(boolean properties, boolean copy, boolean save, boolean print, boolean zoom)Creates a popup menu for the panel.voidsetChart(JFreeChart chart)Sets the chart that is displayed in the panel.-
Methods inherited from class org.jfree.chart.swing.ChartPanel
addChartMouseListener, addOverlay, chartChanged, chartProgress, createChartPrintJob, createSVGGraphics2D, displayPopupMenu, doCopy, doEditChartProperties, doSaveAs, doSaveAs, generateSVG, getAnchor, getChart, getChartRenderingInfo, getDefaultDirectoryForSaveAs, getDefaultDragModifiersEx, getDismissDelay, getEntityForPoint, getFillZoomRectangle, getInitialDelay, getListeners, getMaximumDrawHeight, getMaximumDrawWidth, getMinimumDrawHeight, getMinimumDrawWidth, getPointInRectangle, getPopupMenu, getRefreshBuffer, getReshowDelay, getScaleX, getScaleY, getScreenDataArea, getScreenDataArea, getSelectionZoomStrategy, getToolTipText, getZoomAroundAnchor, getZoomFillPaint, getZoomInFactor, getZoomOutFactor, getZoomOutlinePaint, getZoomTriggerDistance, isDomainZoomable, isEnforceFileExtensions, isMouseWheelEnabled, isRangeZoomable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, overlayChanged, paintComponent, print, readObject, removeChartMouseListener, removeOverlay, restoreAutoBounds, restoreAutoDomainBounds, restoreAutoRangeBounds, saveAsPDF, saveAsSVG, scale, setAnchor, setDefaultDirectoryForSaveAs, setDefaultPanModifiersEx, setDefaultZoomModifiersEx, setDismissDelay, setDisplayToolTips, setDomainZoomable, setEnforceFileExtensions, setFillZoomRectangle, setInitialDelay, setMaximumDrawHeight, setMaximumDrawWidth, setMinimumDrawHeight, setMinimumDrawWidth, setMouseWheelEnabled, setMouseZoomable, setMouseZoomable, setPanModifiersEx, setPopupMenu, setRangeZoomable, setRefreshBuffer, setReshowDelay, setSelectionZoomStrategy, setZoomAroundAnchor, setZoomFillPaint, setZoomInFactor, setZoomModifiersEx, setZoomOutFactor, setZoomOutlinePaint, setZoomTriggerDistance, translateJava2DToScreen, translateScreenToJava2D, updateUI, writeObject, zoom, zoomInBoth, zoomInDomain, zoomInRange, zoomOutBoth, zoomOutDomain, zoomOutRange
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Constructor Detail
-
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 Detail
-
setChart
public void setChart(JFreeChart chart)
Sets the chart that is displayed in the panel.- Overrides:
setChartin classChartPanel- Parameters:
chart- The chart.
-
createPopupMenu
protected JPopupMenu createPopupMenu(boolean properties, boolean copy, boolean save, boolean print, boolean zoom)
Creates a popup menu for the panel.- Overrides:
createPopupMenuin classChartPanel- Parameters:
properties- include a menu item for the chart property editor.copy- include a menu item for copying the chart.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.
-
actionPerformed
public void actionPerformed(ActionEvent event)
Handles action events generated by the popup menu.- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classChartPanel- Parameters:
event- the event.
-
-