Java Doc for ChartPanel.java in  » Chart » jfreechart » org » jfree » chart » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Chart » jfreechart » org.jfree.chart 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.JPanel
   org.jfree.chart.ChartPanel

All known Subclasses:   org.jfree.chart.PolarChartPanel,
ChartPanel
public class ChartPanel extends JPanel implements ChartChangeListener,ChartProgressListener,ActionListener,MouseListener,MouseMotionListener,Printable,Serializable(Code)
A Swing GUI component for displaying a JFreeChart object.

The panel registers with the chart to receive notification of changes to any component of the chart. The chart is redrawn automatically whenever this notification is received.



Field Summary
final public static  booleanDEFAULT_BUFFER_USED
     Default setting for buffer usage.
final public static  intDEFAULT_HEIGHT
     The default panel height.
final public static  intDEFAULT_MAXIMUM_DRAW_HEIGHT
     The default limit below which chart scaling kicks in.
final public static  intDEFAULT_MAXIMUM_DRAW_WIDTH
     The default limit below which chart scaling kicks in.
final public static  intDEFAULT_MINIMUM_DRAW_HEIGHT
     The default limit below which chart scaling kicks in.
final public static  intDEFAULT_MINIMUM_DRAW_WIDTH
     The default limit below which chart scaling kicks in.
final public static  intDEFAULT_WIDTH
     The default panel width.
final public static  intDEFAULT_ZOOM_TRIGGER_DISTANCE
    
final public static  StringPRINT_COMMAND
     Print action command.
final public static  StringPROPERTIES_COMMAND
     Properties action command.
final public static  StringSAVE_COMMAND
     Save action command.
final public static  StringZOOM_IN_BOTH_COMMAND
     Zoom in (both axes) action command.
final public static  StringZOOM_IN_DOMAIN_COMMAND
     Zoom in (domain axis only) action command.
final public static  StringZOOM_IN_RANGE_COMMAND
     Zoom in (range axis only) action command.
final public static  StringZOOM_OUT_BOTH_COMMAND
     Zoom out (both axes) action command.
final public static  StringZOOM_OUT_DOMAIN_COMMAND
     Zoom out (domain axis only) action command.
final public static  StringZOOM_OUT_RANGE_COMMAND
     Zoom out (range axis only) action command.
final public static  StringZOOM_RESET_BOTH_COMMAND
     Zoom reset (both axes) action command.
final public static  StringZOOM_RESET_DOMAIN_COMMAND
     Zoom reset (domain axis only) action command.
final public static  StringZOOM_RESET_RANGE_COMMAND
     Zoom reset (range axis only) action command.
protected static  ResourceBundlelocalizationResources
     The resourceBundle for the localization.

Constructor Summary
public  ChartPanel(JFreeChart chart)
     Constructs a panel that displays the specified chart.
public  ChartPanel(JFreeChart chart, boolean useBuffer)
     Constructs a panel containing a chart.
public  ChartPanel(JFreeChart chart, boolean properties, boolean save, boolean print, boolean zoom, boolean tooltips)
     Constructs a JFreeChart panel.
public  ChartPanel(JFreeChart chart, int width, int height, int minimumDrawWidth, int minimumDrawHeight, int maximumDrawWidth, int maximumDrawHeight, boolean useBuffer, boolean properties, boolean save, boolean print, boolean zoom, boolean tooltips)
     Constructs a JFreeChart panel.

Method Summary
public  voidactionPerformed(ActionEvent event)
     Handles action events generated by the popup menu.
public  voidaddChartMouseListener(ChartMouseListener listener)
     Adds a listener to the list of objects listening for chart mouse events.
public  voidchartChanged(ChartChangeEvent event)
     Receives notification of changes to the chart, and redraws the chart.
public  voidchartProgress(ChartProgressEvent event)
     Receives notification of a chart progress event.
public  voidcreateChartPrintJob()
     Creates a print job for the chart.
protected  JPopupMenucreatePopupMenu(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  voiddisplayPopupMenu(int x, int y)
     The idea is to modify the zooming options depending on the type of chart being displayed by the panel.
public  voiddoEditChartProperties()
     Displays a dialog that allows the user to edit the properties for the current chart.
public  voiddoSaveAs()
     Opens a file chooser and gives the user an opportunity to save the chart in PNG format.
public  Point2DgetAnchor()
     Returns the anchor point.
public  JFreeChartgetChart()
     Returns the chart contained in the panel.
public  ChartRenderingInfogetChartRenderingInfo()
     Returns the chart rendering info from the most recent chart redraw.
public  intgetDismissDelay()
     Returns the dismissal tooltip delay value used inside this chart panel.
public  ChartEntitygetEntityForPoint(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  booleangetFillZoomRectangle()
     Returns the flag that controls whether or not the zoom rectangle is filled when drawn.
public  booleangetHorizontalAxisTrace()
     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  Line2DgetHorizontalTraceLine()
     Returns the horizontal trace line.
public  intgetInitialDelay()
     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  intgetMaximumDrawHeight()
     Returns the maximum drawing height for charts.
public  intgetMaximumDrawWidth()
     Returns the maximum drawing width for charts.
public  intgetMinimumDrawHeight()
     Returns the minimum drawing height for charts.
public  intgetMinimumDrawWidth()
     Returns the minimum drawing width for charts.
public  JPopupMenugetPopupMenu()
     Returns the popup menu.
public  booleangetRefreshBuffer()
     Returns the flag that controls whether or not the offscreen buffer needs to be refreshed.
public  intgetReshowDelay()
     Returns the reshow tooltip delay value used inside this chart panel.
public  doublegetScaleX()
     Returns the X scale factor for the chart.
public  doublegetScaleY()
     Returns the Y scale factory for the chart.
public  Rectangle2DgetScreenDataArea()
     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  Rectangle2DgetScreenDataArea(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  StringgetToolTipText(MouseEvent e)
     Returns a string for the tooltip.
Parameters:
  e - the mouse event.
public  booleangetVerticalAxisTrace()
     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  Line2DgetVerticalTraceLine()
     Returns the vertical trace line.
public  doublegetZoomInFactor()
     Returns the zoom in factor.
public  doublegetZoomOutFactor()
     Returns the zoom out factor.
public  intgetZoomTriggerDistance()
     Returns the zoom trigger distance.
public  booleanisDomainZoomable()
     Returns the flag that determines whether or not zooming is enabled for the domain axis.
public  booleanisEnforceFileExtensions()
     Returns true if file extensions should be enforced, and false otherwise.
public  booleanisRangeZoomable()
     Returns the flag that determines whether or not zooming is enabled for the range axis.
public  voidmouseClicked(MouseEvent event)
     Receives notification of mouse clicks on the panel.
public  voidmouseDragged(MouseEvent e)
     Handles a 'mouse dragged' event.
public  voidmouseEntered(MouseEvent e)
     Handles a 'mouse entered' event.
public  voidmouseExited(MouseEvent e)
     Handles a 'mouse exited' event.
public  voidmouseMoved(MouseEvent e)
     Implementation of the MouseMotionListener's method.
public  voidmousePressed(MouseEvent e)
     Handles a 'mouse pressed' event.

This event is the popup trigger on Unix/Linux.

public  voidmouseReleased(MouseEvent e)
     Handles a 'mouse released' event.
public  voidpaintComponent(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  intprint(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  voidremoveChartMouseListener(ChartMouseListener listener)
     Removes a listener from the list of objects listening for chart mouse events.
public  voidrestoreAutoBounds()
     Restores the auto-range calculation on both axes.
public  voidrestoreAutoDomainBounds()
     Restores the auto-range calculation on the domain axis.
public  voidrestoreAutoRangeBounds()
     Restores the auto-range calculation on the range axis.
public  Rectangle2Dscale(Rectangle2D rect)
     Applies any scaling that is in effect for the chart drawing to the given rectangle.
Parameters:
  rect - the rectangle.
protected  voidsetAnchor(Point2D anchor)
     Sets the anchor point.
public  voidsetChart(JFreeChart chart)
     Sets the chart that is displayed in the panel.
public  voidsetDismissDelay(int delay)
     Specifies the dismissal delay value for this chart panel.
public  voidsetDisplayToolTips(boolean flag)
     Switches the display of tooltips for the panel on or off.
public  voidsetDomainZoomable(boolean flag)
     Sets the flag that controls whether or not zooming is enable for the domain axis.
public  voidsetEnforceFileExtensions(boolean enforce)
     Sets a flag that controls whether or not file extensions are enforced.
public  voidsetFillZoomRectangle(boolean flag)
     A flag that controls how the zoom rectangle is drawn.
public  voidsetHorizontalAxisTrace(boolean flag)
     A flag that controls trace lines on the horizontal axis.
protected  voidsetHorizontalTraceLine(Line2D line)
     Sets the horizontal trace line.
public  voidsetInitialDelay(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  voidsetMaximumDrawHeight(int height)
     Sets the maximum drawing height for the chart on this panel.
public  voidsetMaximumDrawWidth(int width)
     Sets the maximum drawing width for the chart on this panel.
public  voidsetMinimumDrawHeight(int height)
     Sets the minimum drawing height for the chart on this panel.
public  voidsetMinimumDrawWidth(int width)
     Sets the minimum drawing width for the chart on this panel.
public  voidsetMouseZoomable(boolean flag)
     A convenience method that switches on mouse-based zooming.
public  voidsetMouseZoomable(boolean flag, boolean fillRectangle)
     A convenience method that switches on mouse-based zooming.
public  voidsetPopupMenu(JPopupMenu popup)
     Sets the popup menu for the panel.
public  voidsetRangeZoomable(boolean flag)
     A flag that controls mouse-based zooming on the vertical axis.
public  voidsetRefreshBuffer(boolean flag)
     Sets the refresh buffer flag.
public  voidsetReshowDelay(int delay)
     Specifies the amount of time before the user has to wait initialDelay milliseconds before a tooltip will be shown.
public  voidsetVerticalAxisTrace(boolean flag)
     A flag that controls trace lines on the vertical axis.
protected  voidsetVerticalTraceLine(Line2D line)
     Sets the vertical trace line.
public  voidsetZoomInFactor(double factor)
     Sets the zoom in factor.
public  voidsetZoomOutFactor(double factor)
     Sets the zoom out factor.
public  voidsetZoomTriggerDistance(int distance)
     Sets the zoom trigger distance.
public  PointtranslateJava2DToScreen(Point2D java2DPoint)
     Translates a Java2D point on the chart to a screen location.
Parameters:
  java2DPoint - the Java2D point.
public  Point2DtranslateScreenToJava2D(Point screenPoint)
     Translates a screen location to a Java2D point.
Parameters:
  screenPoint - the screen location.
public  voidupdateUI()
    
public  voidzoom(Rectangle2D selection)
     Zooms in on a selected region.
public  voidzoomInBoth(double x, double y)
     Zooms in on an anchor point (specified in screen coordinate space).
public  voidzoomInDomain(double x, double y)
     Decreases the length of the domain axis, centered about the given coordinate on the screen.
public  voidzoomInRange(double x, double y)
     Decreases the length of the range axis, centered about the given coordinate on the screen.
public  voidzoomOutBoth(double x, double y)
     Zooms out on an anchor point (specified in screen coordinate space).
public  voidzoomOutDomain(double x, double y)
     Increases the length of the domain axis, centered about the given coordinate on the screen.
public  voidzoomOutRange(double x, double y)
     Increases the length the range axis, centered about the given coordinate on the screen.

Field Detail
DEFAULT_BUFFER_USED
final public static boolean DEFAULT_BUFFER_USED(Code)
Default setting for buffer usage.



DEFAULT_HEIGHT
final public static int DEFAULT_HEIGHT(Code)
The default panel height.



DEFAULT_MAXIMUM_DRAW_HEIGHT
final public static int DEFAULT_MAXIMUM_DRAW_HEIGHT(Code)
The default limit below which chart scaling kicks in.



DEFAULT_MAXIMUM_DRAW_WIDTH
final public static int DEFAULT_MAXIMUM_DRAW_WIDTH(Code)
The default limit below which chart scaling kicks in.



DEFAULT_MINIMUM_DRAW_HEIGHT
final public static int DEFAULT_MINIMUM_DRAW_HEIGHT(Code)
The default limit below which chart scaling kicks in.



DEFAULT_MINIMUM_DRAW_WIDTH
final public static int DEFAULT_MINIMUM_DRAW_WIDTH(Code)
The default limit below which chart scaling kicks in.



DEFAULT_WIDTH
final public static int DEFAULT_WIDTH(Code)
The default panel width.



DEFAULT_ZOOM_TRIGGER_DISTANCE
final public static int DEFAULT_ZOOM_TRIGGER_DISTANCE(Code)
The minimum size required to perform a zoom on a rectangle



PRINT_COMMAND
final public static String PRINT_COMMAND(Code)
Print action command.



PROPERTIES_COMMAND
final public static String PROPERTIES_COMMAND(Code)
Properties action command.



SAVE_COMMAND
final public static String SAVE_COMMAND(Code)
Save action command.



ZOOM_IN_BOTH_COMMAND
final public static String ZOOM_IN_BOTH_COMMAND(Code)
Zoom in (both axes) action command.



ZOOM_IN_DOMAIN_COMMAND
final public static String ZOOM_IN_DOMAIN_COMMAND(Code)
Zoom in (domain axis only) action command.



ZOOM_IN_RANGE_COMMAND
final public static String ZOOM_IN_RANGE_COMMAND(Code)
Zoom in (range axis only) action command.



ZOOM_OUT_BOTH_COMMAND
final public static String ZOOM_OUT_BOTH_COMMAND(Code)
Zoom out (both axes) action command.



ZOOM_OUT_DOMAIN_COMMAND
final public static String ZOOM_OUT_DOMAIN_COMMAND(Code)
Zoom out (domain axis only) action command.



ZOOM_OUT_RANGE_COMMAND
final public static String ZOOM_OUT_RANGE_COMMAND(Code)
Zoom out (range axis only) action command.



ZOOM_RESET_BOTH_COMMAND
final public static String ZOOM_RESET_BOTH_COMMAND(Code)
Zoom reset (both axes) action command.



ZOOM_RESET_DOMAIN_COMMAND
final public static String ZOOM_RESET_DOMAIN_COMMAND(Code)
Zoom reset (domain axis only) action command.



ZOOM_RESET_RANGE_COMMAND
final public static String ZOOM_RESET_RANGE_COMMAND(Code)
Zoom reset (range axis only) action command.



localizationResources
protected static ResourceBundle localizationResources(Code)
The resourceBundle for the localization.




Constructor Detail
ChartPanel
public ChartPanel(JFreeChart chart)(Code)
Constructs a panel that displays the specified chart.
Parameters:
  chart - the chart.



ChartPanel
public ChartPanel(JFreeChart chart, boolean useBuffer)(Code)
Constructs a panel containing a chart.
Parameters:
  chart - the chart.
Parameters:
  useBuffer - a flag controlling whether or not an off-screen bufferis used.



ChartPanel
public ChartPanel(JFreeChart chart, boolean properties, boolean save, boolean print, boolean zoom, boolean tooltips)(Code)
Constructs a JFreeChart panel.
Parameters:
  chart - the chart.
Parameters:
  properties - a flag indicating whether or not the chart propertyeditor should be available via the popup menu.
Parameters:
  save - a flag indicating whether or not save options should beavailable via the popup menu.
Parameters:
  print - a flag indicating whether or not the print optionshould be available via the popup menu.
Parameters:
  zoom - a flag indicating whether or not zoom options shouldbe added to the popup menu.
Parameters:
  tooltips - a flag indicating whether or not tooltips should beenabled for the chart.



ChartPanel
public ChartPanel(JFreeChart chart, int width, int height, int minimumDrawWidth, int minimumDrawHeight, int maximumDrawWidth, int maximumDrawHeight, boolean useBuffer, boolean properties, boolean save, boolean print, boolean zoom, boolean tooltips)(Code)
Constructs a JFreeChart panel.
Parameters:
  chart - the chart.
Parameters:
  width - the preferred width of the panel.
Parameters:
  height - the preferred height of the panel.
Parameters:
  minimumDrawWidth - the minimum drawing width.
Parameters:
  minimumDrawHeight - the minimum drawing height.
Parameters:
  maximumDrawWidth - the maximum drawing width.
Parameters:
  maximumDrawHeight - the maximum drawing height.
Parameters:
  useBuffer - a flag that indicates whether to use the off-screenbuffer to improve performance (at the expense of memory).
Parameters:
  properties - a flag indicating whether or not the chart propertyeditor should be available via the popup menu.
Parameters:
  save - a flag indicating whether or not save options should beavailable via the popup menu.
Parameters:
  print - a flag indicating whether or not the print optionshould be available via the popup menu.
Parameters:
  zoom - a flag indicating whether or not zoom options should be added to the popup menu.
Parameters:
  tooltips - a flag indicating whether or not tooltips should be enabled for the chart.




Method Detail
actionPerformed
public void actionPerformed(ActionEvent event)(Code)
Handles action events generated by the popup menu.
Parameters:
  event - the event.



addChartMouseListener
public void addChartMouseListener(ChartMouseListener listener)(Code)
Adds a listener to the list of objects listening for chart mouse events.
Parameters:
  listener - the listener (null not permitted).



chartChanged
public void chartChanged(ChartChangeEvent event)(Code)
Receives notification of changes to the chart, and redraws the chart.
Parameters:
  event - details of the chart change event.



chartProgress
public void chartProgress(ChartProgressEvent event)(Code)
Receives notification of a chart progress event.
Parameters:
  event - the event.



createChartPrintJob
public void createChartPrintJob()(Code)
Creates a print job for the chart.



createPopupMenu
protected JPopupMenu createPopupMenu(boolean properties, boolean save, boolean print, boolean zoom)(Code)
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. The popup menu.



displayPopupMenu
protected void displayPopupMenu(int x, int y)(Code)
The idea is to modify the zooming options depending on the type of chart being displayed by the panel.
Parameters:
  x - horizontal position of the popup.
Parameters:
  y - vertical position of the popup.



doEditChartProperties
public void doEditChartProperties()(Code)
Displays a dialog that allows the user to edit the properties for the current chart.
since:
   1.0.3



doSaveAs
public void doSaveAs() throws IOException(Code)
Opens a file chooser and gives the user an opportunity to save the chart in PNG format.
throws:
  IOException - if there is an I/O error.



getAnchor
public Point2D getAnchor()(Code)
Returns the anchor point. The anchor point (possibly null).



getChart
public JFreeChart getChart()(Code)
Returns the chart contained in the panel. The chart (possibly null).



getChartRenderingInfo
public ChartRenderingInfo getChartRenderingInfo()(Code)
Returns the chart rendering info from the most recent chart redraw. The chart rendering info.



getDismissDelay
public int getDismissDelay()(Code)
Returns the dismissal tooltip delay value used inside this chart panel. An integer representing the dismissal delay value, in milliseconds.
See Also:   javax.swing.ToolTipManager.getDismissDelay



getEntityForPoint
public ChartEntity getEntityForPoint(int viewX, int viewY)(Code)
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. The chart entity (possibly null).




getFillZoomRectangle
public boolean getFillZoomRectangle()(Code)
Returns the flag that controls whether or not the zoom rectangle is filled when drawn. A boolean.



getHorizontalAxisTrace
public boolean getHorizontalAxisTrace()(Code)
Returns the flag that controls whether or not a horizontal axis trace line is drawn over the plot area at the current mouse location. A boolean.



getHorizontalTraceLine
protected Line2D getHorizontalTraceLine()(Code)
Returns the horizontal trace line. The horizontal trace line (possibly null).



getInitialDelay
public int getInitialDelay()(Code)
Returns the initial tooltip delay value used inside this chart panel. An integer representing the initial delay value, in milliseconds.
See Also:   javax.swing.ToolTipManager.getInitialDelay



getListeners
public EventListener[] getListeners(Class listenerType)(Code)
Returns an array of the listeners of the given type registered with the panel.
Parameters:
  listenerType - the listener type. An array of listeners.



getMaximumDrawHeight
public int getMaximumDrawHeight()(Code)
Returns the maximum drawing height for charts.

If the height available on the panel is greater than this, then the chart is drawn at the maximum height then scaled up to fit. The maximum drawing height.




getMaximumDrawWidth
public int getMaximumDrawWidth()(Code)
Returns the maximum drawing width for charts.

If the width available on the panel is greater than this, then the chart is drawn at the maximum width then scaled up to fit. The maximum drawing width.




getMinimumDrawHeight
public int getMinimumDrawHeight()(Code)
Returns the minimum drawing height for charts.

If the height available on the panel is less than this, then the chart is drawn at the minimum height then scaled down to fit. The minimum drawing height.




getMinimumDrawWidth
public int getMinimumDrawWidth()(Code)
Returns the minimum drawing width for charts.

If the width available on the panel is less than this, then the chart is drawn at the minimum width then scaled down to fit. The minimum drawing width.




getPopupMenu
public JPopupMenu getPopupMenu()(Code)
Returns the popup menu. The popup menu.



getRefreshBuffer
public boolean getRefreshBuffer()(Code)
Returns the flag that controls whether or not the offscreen buffer needs to be refreshed. A boolean.



getReshowDelay
public int getReshowDelay()(Code)
Returns the reshow tooltip delay value used inside this chart panel. An integer representing the reshow delay value, in milliseconds.
See Also:   javax.swing.ToolTipManager.getReshowDelay



getScaleX
public double getScaleX()(Code)
Returns the X scale factor for the chart. This will be 1.0 if no scaling has been used. The scale factor.



getScaleY
public double getScaleY()(Code)
Returns the Y scale factory for the chart. This will be 1.0 if no scaling has been used. The scale factor.



getScreenDataArea
public Rectangle2D getScreenDataArea()(Code)
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). The scaled data area.



getScreenDataArea
public Rectangle2D getScreenDataArea(int x, int y)(Code)
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). The scaled data area.



getToolTipText
public String getToolTipText(MouseEvent e)(Code)
Returns a string for the tooltip.
Parameters:
  e - the mouse event. A tool tip or null if no tooltip is available.



getVerticalAxisTrace
public boolean getVerticalAxisTrace()(Code)
Returns the flag that controls whether or not a vertical axis trace line is drawn over the plot area at the current mouse location. A boolean.



getVerticalTraceLine
protected Line2D getVerticalTraceLine()(Code)
Returns the vertical trace line. The vertical trace line (possibly null).



getZoomInFactor
public double getZoomInFactor()(Code)
Returns the zoom in factor. The zoom in factor.
See Also:   ChartPanel.setZoomInFactor(double)



getZoomOutFactor
public double getZoomOutFactor()(Code)
Returns the zoom out factor. The zoom out factor.
See Also:   ChartPanel.setZoomOutFactor(double)



getZoomTriggerDistance
public int getZoomTriggerDistance()(Code)
Returns the zoom trigger distance. This controls how far the mouse must move before a zoom action is triggered. The distance (in Java2D units).



isDomainZoomable
public boolean isDomainZoomable()(Code)
Returns the flag that determines whether or not zooming is enabled for the domain axis. A boolean.



isEnforceFileExtensions
public boolean isEnforceFileExtensions()(Code)
Returns true if file extensions should be enforced, and false otherwise. The flag.



isRangeZoomable
public boolean isRangeZoomable()(Code)
Returns the flag that determines whether or not zooming is enabled for the range axis. A boolean.



mouseClicked
public void mouseClicked(MouseEvent event)(Code)
Receives notification of mouse clicks on the panel. These are translated and passed on to any registered chart mouse click listeners.
Parameters:
  event - Information about the mouse event.



mouseDragged
public void mouseDragged(MouseEvent e)(Code)
Handles a 'mouse dragged' event.
Parameters:
  e - the mouse event.



mouseEntered
public void mouseEntered(MouseEvent e)(Code)
Handles a 'mouse entered' event. This method changes the tooltip delays of ToolTipManager.sharedInstance() to the possibly different values set for this chart panel.
Parameters:
  e - the mouse event.



mouseExited
public void mouseExited(MouseEvent e)(Code)
Handles a 'mouse exited' event. This method resets the tooltip delays of ToolTipManager.sharedInstance() to their original values in effect before mouseEntered()
Parameters:
  e - the mouse event.



mouseMoved
public void mouseMoved(MouseEvent e)(Code)
Implementation of the MouseMotionListener's method.
Parameters:
  e - the event.



mousePressed
public void mousePressed(MouseEvent e)(Code)
Handles a 'mouse pressed' event.

This event is the popup trigger on Unix/Linux. For Windows, the popup trigger is the 'mouse released' event.
Parameters:
  e - The mouse event.




mouseReleased
public void mouseReleased(MouseEvent e)(Code)
Handles a 'mouse released' event. On Windows, we need to check if this is a popup trigger, but only if we haven't already been tracking a zoom rectangle.
Parameters:
  e - information about the event.



paintComponent
public void paintComponent(Graphics g)(Code)
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). To increase performance (at the expense of memory), an off-screen buffer image can be used.
Parameters:
  g - the graphics device for drawing on.



print
public int print(Graphics g, PageFormat pf, int pageIndex)(Code)
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. If not 0, nothing gets print. The result of printing.



removeChartMouseListener
public void removeChartMouseListener(ChartMouseListener listener)(Code)
Removes a listener from the list of objects listening for chart mouse events.
Parameters:
  listener - the listener.



restoreAutoBounds
public void restoreAutoBounds()(Code)
Restores the auto-range calculation on both axes.



restoreAutoDomainBounds
public void restoreAutoDomainBounds()(Code)
Restores the auto-range calculation on the domain axis.



restoreAutoRangeBounds
public void restoreAutoRangeBounds()(Code)
Restores the auto-range calculation on the range axis.



scale
public Rectangle2D scale(Rectangle2D rect)(Code)
Applies any scaling that is in effect for the chart drawing to the given rectangle.
Parameters:
  rect - the rectangle. A new scaled rectangle.



setAnchor
protected void setAnchor(Point2D anchor)(Code)
Sets the anchor point. This method is provided for the use of subclasses, not end users.
Parameters:
  anchor - the anchor point (null permitted).



setChart
public void setChart(JFreeChart chart)(Code)
Sets the chart that is displayed in the panel.
Parameters:
  chart - the chart (null permitted).



setDismissDelay
public void setDismissDelay(int delay)(Code)
Specifies the dismissal delay value for this chart panel.
Parameters:
  delay - the number of milliseconds to delay before taking away the tooltip
See Also:   javax.swing.ToolTipManager.setDismissDelay(int)



setDisplayToolTips
public void setDisplayToolTips(boolean flag)(Code)
Switches the display of tooltips for the panel on or off. Note that tooltips can only be displayed if the chart has been configured to generate tooltip items.
Parameters:
  flag - true to enable tooltips, false todisable tooltips.



setDomainZoomable
public void setDomainZoomable(boolean flag)(Code)
Sets the flag that controls whether or not zooming is enable for the domain axis. A check is made to ensure that the current plot supports zooming for the domain values.
Parameters:
  flag - true enables zooming if possible.



setEnforceFileExtensions
public void setEnforceFileExtensions(boolean enforce)(Code)
Sets a flag that controls whether or not file extensions are enforced.
Parameters:
  enforce - the new flag value.



setFillZoomRectangle
public void setFillZoomRectangle(boolean flag)(Code)
A flag that controls how the zoom rectangle is drawn.
Parameters:
  flag - true instructs to fill the rectangle onzoom, otherwise it will be outlined.



setHorizontalAxisTrace
public void setHorizontalAxisTrace(boolean flag)(Code)
A flag that controls trace lines on the horizontal axis.
Parameters:
  flag - true enables trace lines for the mousepointer on the horizontal axis.



setHorizontalTraceLine
protected void setHorizontalTraceLine(Line2D line)(Code)
Sets the horizontal trace line.
Parameters:
  line - the line (null permitted).



setInitialDelay
public void setInitialDelay(int delay)(Code)
Specifies the initial delay value for this chart panel.
Parameters:
  delay - the number of milliseconds to delay (after the cursor has paused) before displaying.
See Also:   javax.swing.ToolTipManager.setInitialDelay(int)



setMaximumDrawHeight
public void setMaximumDrawHeight(int height)(Code)
Sets the maximum drawing height for the chart on this panel.

At the time the chart is drawn on the panel, if the available height is greater than this amount, the chart will be drawn using the maximum height then scaled up to fit the available space.
Parameters:
  height - The height.




setMaximumDrawWidth
public void setMaximumDrawWidth(int width)(Code)
Sets the maximum drawing width for the chart on this panel.

At the time the chart is drawn on the panel, if the available width is greater than this amount, the chart will be drawn using the maximum width then scaled up to fit the available space.
Parameters:
  width - The width.




setMinimumDrawHeight
public void setMinimumDrawHeight(int height)(Code)
Sets the minimum drawing height for the chart on this panel.

At the time the chart is drawn on the panel, if the available height is less than this amount, the chart will be drawn using the minimum height then scaled down to fit the available space.
Parameters:
  height - The height.




setMinimumDrawWidth
public void setMinimumDrawWidth(int width)(Code)
Sets the minimum drawing width for the chart on this panel.

At the time the chart is drawn on the panel, if the available width is less than this amount, the chart will be drawn using the minimum width then scaled down to fit the available space.
Parameters:
  width - The width.




setMouseZoomable
public void setMouseZoomable(boolean flag)(Code)
A convenience method that switches on mouse-based zooming.
Parameters:
  flag - true enables zooming and rectangle fill on zoom.



setMouseZoomable
public void setMouseZoomable(boolean flag, boolean fillRectangle)(Code)
A convenience method that switches on mouse-based zooming.
Parameters:
  flag - true if zooming enabled
Parameters:
  fillRectangle - true if zoom rectangle is filled,false if rectangle is shown as outline only.



setPopupMenu
public void setPopupMenu(JPopupMenu popup)(Code)
Sets the popup menu for the panel.
Parameters:
  popup - the popup menu (null permitted).



setRangeZoomable
public void setRangeZoomable(boolean flag)(Code)
A flag that controls mouse-based zooming on the vertical axis.
Parameters:
  flag - true enables zooming.



setRefreshBuffer
public void setRefreshBuffer(boolean flag)(Code)
Sets the refresh buffer flag. This flag is used to avoid unnecessary redrawing of the chart when the offscreen image buffer is used.
Parameters:
  flag - true indicates that the buffer should be refreshed.



setReshowDelay
public void setReshowDelay(int delay)(Code)
Specifies the amount of time before the user has to wait initialDelay milliseconds before a tooltip will be shown.
Parameters:
  delay - time in milliseconds
See Also:   javax.swing.ToolTipManager.setReshowDelay(int)



setVerticalAxisTrace
public void setVerticalAxisTrace(boolean flag)(Code)
A flag that controls trace lines on the vertical axis.
Parameters:
  flag - true enables trace lines for the mousepointer on the vertical axis.



setVerticalTraceLine
protected void setVerticalTraceLine(Line2D line)(Code)
Sets the vertical trace line.
Parameters:
  line - the line (null permitted).



setZoomInFactor
public void setZoomInFactor(double factor)(Code)
Sets the zoom in factor.
Parameters:
  factor - the factor.
See Also:   ChartPanel.getZoomInFactor()



setZoomOutFactor
public void setZoomOutFactor(double factor)(Code)
Sets the zoom out factor.
Parameters:
  factor - the factor.
See Also:   ChartPanel.getZoomOutFactor()



setZoomTriggerDistance
public void setZoomTriggerDistance(int distance)(Code)
Sets the zoom trigger distance. This controls how far the mouse must move before a zoom action is triggered.
Parameters:
  distance - the distance (in Java2D units).



translateJava2DToScreen
public Point translateJava2DToScreen(Point2D java2DPoint)(Code)
Translates a Java2D point on the chart to a screen location.
Parameters:
  java2DPoint - the Java2D point. The screen location.



translateScreenToJava2D
public Point2D translateScreenToJava2D(Point screenPoint)(Code)
Translates a screen location to a Java2D point.
Parameters:
  screenPoint - the screen location. The Java2D coordinates.



updateUI
public void updateUI()(Code)



zoom
public void zoom(Rectangle2D selection)(Code)
Zooms in on a selected region.
Parameters:
  selection - the selected region.



zoomInBoth
public void zoomInBoth(double x, double y)(Code)
Zooms in on an anchor point (specified in screen coordinate space).
Parameters:
  x - the x value (in screen coordinates).
Parameters:
  y - the y value (in screen coordinates).



zoomInDomain
public void zoomInDomain(double x, double y)(Code)
Decreases the length of the domain axis, centered about the given coordinate on the screen. The length of the domain axis is reduced by the value of ChartPanel.getZoomInFactor() .
Parameters:
  x - the x coordinate (in screen coordinates).
Parameters:
  y - the y-coordinate (in screen coordinates).



zoomInRange
public void zoomInRange(double x, double y)(Code)
Decreases the length of the range axis, centered about the given coordinate on the screen. The length of the range axis is reduced by the value of ChartPanel.getZoomInFactor() .
Parameters:
  x - the x-coordinate (in screen coordinates).
Parameters:
  y - the y coordinate (in screen coordinates).



zoomOutBoth
public void zoomOutBoth(double x, double y)(Code)
Zooms out on an anchor point (specified in screen coordinate space).
Parameters:
  x - the x value (in screen coordinates).
Parameters:
  y - the y value (in screen coordinates).



zoomOutDomain
public void zoomOutDomain(double x, double y)(Code)
Increases the length of the domain axis, centered about the given coordinate on the screen. The length of the domain axis is increased by the value of ChartPanel.getZoomOutFactor() .
Parameters:
  x - the x coordinate (in screen coordinates).
Parameters:
  y - the y-coordinate (in screen coordinates).



zoomOutRange
public void zoomOutRange(double x, double y)(Code)
Increases the length the range axis, centered about the given coordinate on the screen. The length of the range axis is increased by the value of ChartPanel.getZoomOutFactor() .
Parameters:
  x - the x coordinate (in screen coordinates).
Parameters:
  y - the y-coordinate (in screen coordinates).



Methods inherited from javax.swing.JPanel
public AccessibleContext getAccessibleContext()(Code)(Java Doc)
public PanelUI getUI()(Code)(Java Doc)
public String getUIClassID()(Code)(Java Doc)
protected String paramString()(Code)(Java Doc)
public void setUI(PanelUI ui)(Code)(Java Doc)
public void updateUI()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.