Method Summary |
|
public void | actionPerformed(ActionEvent event) Handles action events generated by the popup menu. |
public void | addChartMouseListener(ChartMouseListener listener) Adds a listener to the list of objects listening for chart mouse events. |
public void | chartChanged(ChartChangeEvent event) Receives notification of changes to the chart, and redraws the chart. |
public void | chartProgress(ChartProgressEvent event) Receives notification of a chart progress event. |
public void | createChartPrintJob() Creates a print job for the chart. |
protected JPopupMenu | createPopupMenu(boolean properties, boolean save, boolean print, boolean zoom) Creates a popup menu for the panel.
Parameters: properties - include a menu item for the chart property editor. Parameters: save - include a menu item for saving the chart. Parameters: print - include a menu item for printing the chart. Parameters: zoom - include menu items for zooming. |
protected void | displayPopupMenu(int x, int y) The idea is to modify the zooming options depending on the type of chart
being displayed by the panel. |
public void | doEditChartProperties() Displays a dialog that allows the user to edit the properties for the
current chart. |
public void | doSaveAs() Opens a file chooser and gives the user an opportunity to save the chart
in PNG format. |
public Point2D | getAnchor() Returns the anchor point. |
public JFreeChart | getChart() Returns the chart contained in the panel. |
public ChartRenderingInfo | getChartRenderingInfo() Returns the chart rendering info from the most recent chart redraw. |
public int | getDismissDelay() Returns the dismissal tooltip delay value used inside this chart panel. |
public ChartEntity | getEntityForPoint(int viewX, int viewY) Returns the chart entity at a given point.
This method will return null if there is (a) no entity at the given
point, or (b) no entity collection has been generated.
Parameters: viewX - the x-coordinate. Parameters: viewY - the y-coordinate. |
public boolean | getFillZoomRectangle() Returns the flag that controls whether or not the zoom rectangle is
filled when drawn. |
public boolean | getHorizontalAxisTrace() Returns the flag that controls whether or not a horizontal axis trace
line is drawn over the plot area at the current mouse location. |
protected Line2D | getHorizontalTraceLine() Returns the horizontal trace line. |
public int | getInitialDelay() Returns the initial tooltip delay value used inside this chart panel. |
public EventListener[] | getListeners(Class listenerType) Returns an array of the listeners of the given type registered with the
panel.
Parameters: listenerType - the listener type. |
public int | getMaximumDrawHeight() Returns the maximum drawing height for charts. |
public int | getMaximumDrawWidth() Returns the maximum drawing width for charts. |
public int | getMinimumDrawHeight() Returns the minimum drawing height for charts. |
public int | getMinimumDrawWidth() Returns the minimum drawing width for charts. |
public JPopupMenu | getPopupMenu() Returns the popup menu. |
public boolean | getRefreshBuffer() Returns the flag that controls whether or not the offscreen buffer
needs to be refreshed. |
public int | getReshowDelay() Returns the reshow tooltip delay value used inside this chart panel. |
public double | getScaleX() Returns the X scale factor for the chart. |
public double | getScaleY() Returns the Y scale factory for the chart. |
public Rectangle2D | getScreenDataArea() Returns the data area for the chart (the area inside the axes) with the
current scaling applied (that is, the area as it appears on screen). |
public Rectangle2D | getScreenDataArea(int x, int y) Returns the data area (the area inside the axes) for the plot or subplot,
with the current scaling applied.
Parameters: x - the x-coordinate (for subplot selection). Parameters: y - the y-coordinate (for subplot selection). |
public String | getToolTipText(MouseEvent e) Returns a string for the tooltip.
Parameters: e - the mouse event. |
public boolean | getVerticalAxisTrace() Returns the flag that controls whether or not a vertical axis trace
line is drawn over the plot area at the current mouse location. |
protected Line2D | getVerticalTraceLine() Returns the vertical trace line. |
public double | getZoomInFactor() Returns the zoom in factor. |
public double | getZoomOutFactor() Returns the zoom out factor. |
public int | getZoomTriggerDistance() Returns the zoom trigger distance. |
public boolean | isDomainZoomable() Returns the flag that determines whether or not zooming is enabled for
the domain axis. |
public boolean | isEnforceFileExtensions() Returns true if file extensions should be enforced, and
false otherwise. |
public boolean | isRangeZoomable() Returns the flag that determines whether or not zooming is enabled for
the range axis. |
public void | mouseClicked(MouseEvent event) Receives notification of mouse clicks on the panel. |
public void | mouseDragged(MouseEvent e) Handles a 'mouse dragged' event. |
public void | mouseEntered(MouseEvent e) Handles a 'mouse entered' event. |
public void | mouseExited(MouseEvent e) Handles a 'mouse exited' event. |
public void | mouseMoved(MouseEvent e) Implementation of the MouseMotionListener's method. |
public void | mousePressed(MouseEvent e) Handles a 'mouse pressed' event.
This event is the popup trigger on Unix/Linux. |
public void | mouseReleased(MouseEvent e) Handles a 'mouse released' event. |
public void | paintComponent(Graphics g) Paints the component by drawing the chart to fill the entire component,
but allowing for the insets (which will be non-zero if a border has been
set for this component). |
public int | print(Graphics g, PageFormat pf, int pageIndex) Prints the chart on a single page.
Parameters: g - the graphics context. Parameters: pf - the page format to use. Parameters: pageIndex - the index of the page. |
public void | removeChartMouseListener(ChartMouseListener listener) Removes a listener from the list of objects listening for chart mouse
events. |
public void | restoreAutoBounds() Restores the auto-range calculation on both axes. |
public void | restoreAutoDomainBounds() Restores the auto-range calculation on the domain axis. |
public void | restoreAutoRangeBounds() Restores the auto-range calculation on the range axis. |
public Rectangle2D | scale(Rectangle2D rect) Applies any scaling that is in effect for the chart drawing to the
given rectangle.
Parameters: rect - the rectangle. |
protected void | setAnchor(Point2D anchor) Sets the anchor point. |
public void | setChart(JFreeChart chart) Sets the chart that is displayed in the panel. |
public void | setDismissDelay(int delay) Specifies the dismissal delay value for this chart panel. |
public void | setDisplayToolTips(boolean flag) Switches the display of tooltips for the panel on or off. |
public void | setDomainZoomable(boolean flag) Sets the flag that controls whether or not zooming is enable for the
domain axis. |
public void | setEnforceFileExtensions(boolean enforce) Sets a flag that controls whether or not file extensions are enforced. |
public void | setFillZoomRectangle(boolean flag) A flag that controls how the zoom rectangle is drawn. |
public void | setHorizontalAxisTrace(boolean flag) A flag that controls trace lines on the horizontal axis. |
protected void | setHorizontalTraceLine(Line2D line) Sets the horizontal trace line. |
public void | setInitialDelay(int delay) Specifies the initial delay value for this chart panel.
Parameters: delay - the number of milliseconds to delay (after the cursor has paused) before displaying. |
public void | setMaximumDrawHeight(int height) Sets the maximum drawing height for the chart on this panel. |
public void | setMaximumDrawWidth(int width) Sets the maximum drawing width for the chart on this panel. |
public void | setMinimumDrawHeight(int height) Sets the minimum drawing height for the chart on this panel. |
public void | setMinimumDrawWidth(int width) Sets the minimum drawing width for the chart on this panel. |
public void | setMouseZoomable(boolean flag) A convenience method that switches on mouse-based zooming. |
public void | setMouseZoomable(boolean flag, boolean fillRectangle) A convenience method that switches on mouse-based zooming. |
public void | setPopupMenu(JPopupMenu popup) Sets the popup menu for the panel. |
public void | setRangeZoomable(boolean flag) A flag that controls mouse-based zooming on the vertical axis. |
public void | setRefreshBuffer(boolean flag) Sets the refresh buffer flag. |
public void | setReshowDelay(int delay) Specifies the amount of time before the user has to wait initialDelay
milliseconds before a tooltip will be shown. |
public void | setVerticalAxisTrace(boolean flag) A flag that controls trace lines on the vertical axis. |
protected void | setVerticalTraceLine(Line2D line) Sets the vertical trace line. |
public void | setZoomInFactor(double factor) Sets the zoom in factor. |
public void | setZoomOutFactor(double factor) Sets the zoom out factor. |
public void | setZoomTriggerDistance(int distance) Sets the zoom trigger distance. |
public Point | translateJava2DToScreen(Point2D java2DPoint) Translates a Java2D point on the chart to a screen location.
Parameters: java2DPoint - the Java2D point. |
public Point2D | translateScreenToJava2D(Point screenPoint) Translates a screen location to a Java2D point.
Parameters: screenPoint - the screen location. |
public void | updateUI() |
public void | zoom(Rectangle2D selection) Zooms in on a selected region. |
public void | zoomInBoth(double x, double y) Zooms in on an anchor point (specified in screen coordinate space). |
public void | zoomInDomain(double x, double y) Decreases the length of the domain axis, centered about the given
coordinate on the screen. |
public void | zoomInRange(double x, double y) Decreases the length of the range axis, centered about the given
coordinate on the screen. |
public void | zoomOutBoth(double x, double y) Zooms out on an anchor point (specified in screen coordinate space). |
public void | zoomOutDomain(double x, double y) Increases the length of the domain axis, centered about the given
coordinate on the screen. |
public void | zoomOutRange(double x, double y) Increases the length the range axis, centered about the given
coordinate on the screen. |