Example usage for Java org.jfree.chart ChartPanel fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | DEFAULT_BUFFER_USED Default setting for buffer usage. |
int | DEFAULT_WIDTH The default panel width. |
int | DEFAULT_HEIGHT The default panel height. |
int | DEFAULT_MINIMUM_DRAW_WIDTH The default limit below which chart scaling kicks in. |
int | DEFAULT_MINIMUM_DRAW_HEIGHT The default limit below which chart scaling kicks in. |
int | DEFAULT_MAXIMUM_DRAW_WIDTH The default limit above which chart scaling kicks in. |
int | DEFAULT_MAXIMUM_DRAW_HEIGHT The default limit above which chart scaling kicks in. |
String | PROPERTIES_COMMAND Properties action command. |
String | ZOOM_IN_BOTH_COMMAND Zoom in (both axes) action command. |
String | ZOOM_IN_DOMAIN_COMMAND Zoom in (domain axis only) action command. |
String | ZOOM_IN_RANGE_COMMAND Zoom in (range axis only) action command. |
String | ZOOM_OUT_BOTH_COMMAND Zoom out (both axes) action command. |
String | ZOOM_OUT_DOMAIN_COMMAND Zoom out (domain axis only) action command. |
String | ZOOM_OUT_RANGE_COMMAND Zoom out (range axis only) action command. |
String | ZOOM_RESET_BOTH_COMMAND Zoom reset (both axes) action command. |
String | ZOOM_RESET_DOMAIN_COMMAND Zoom reset (domain axis only) action command. |
String | ZOOM_RESET_RANGE_COMMAND Zoom reset (range axis only) action command. |
ChartPanel(JFreeChart chart) Constructs a panel that displays the specified chart. | |
ChartPanel(JFreeChart chart, boolean useBuffer) Constructs a panel containing a chart. | |
ChartPanel(JFreeChart chart, boolean properties, boolean save, boolean print, boolean zoom, boolean tooltips) Constructs a JFreeChart panel. | |
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. |
Component | add(Component comp) Appends the specified component to the end of this container. |
Component | add(String name, Component comp) Adds the specified component to this container. |
void | addChartMouseListener(ChartMouseListener listener) Adds a listener to the list of objects listening for chart mouse events. |
void | addKeyListener(KeyListener l) Adds the specified key listener to receive key events from this component. |
void | addMouseListener(MouseListener l) Adds the specified mouse listener to receive mouse events from this component. |
void | addMouseMotionListener(MouseMotionListener l) Adds the specified mouse motion listener to receive mouse motion events from this component. |
void | addMouseWheelListener(MouseWheelListener l) Adds the specified mouse wheel listener to receive mouse wheel events from this component. |
void | addOverlay(Overlay overlay) Add an overlay to the panel. |
void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list. |
void | chartChanged(ChartChangeEvent event) Receives notification of changes to the chart, and redraws the chart. |
void | createChartPrintJob() Creates a print job for the chart. |
Image | createImage(int width, int height) Creates an off-screen drawable image to be used for double buffering. |
void | doEditChartProperties() Displays a dialog that allows the user to edit the properties for the current chart. |
void | doSaveAs() Opens a file chooser and gives the user an opportunity to save the chart in PNG format. |
Color | getBackground() Gets the background color of this component. |
Rectangle | getBounds() Gets the bounds of this component in the form of a Rectangle object. |
JFreeChart | getChart() Returns the chart contained in the panel. |
ChartRenderingInfo | getChartRenderingInfo() Returns the chart rendering info from the most recent chart redraw. |
File | getDefaultDirectoryForSaveAs() Returns the default directory for the "save as" option. |
ChartEntity | getEntityForPoint(int viewX, int viewY) Returns the chart entity at a given point. |
Graphics | getGraphics() Returns this component's graphics context, which lets you draw on a component. |
int | getHeight() Returns the current height of this component. |
Insets | getInsets() If a border has been set on this component, returns the border's insets; otherwise calls super.getInsets . |
int | getMaximumDrawHeight() Returns the maximum drawing height for charts. |
int | getMaximumDrawWidth() Returns the maximum drawing width for charts. |
int | getMinimumDrawHeight() Returns the minimum drawing height for charts. |
int | getMinimumDrawWidth() Returns the minimum drawing width for charts. |
Container | getParent() Gets the parent of this component. |
JPopupMenu | getPopupMenu() Returns the popup menu. |
Dimension | getPreferredSize() If the preferredSize has been set to a non-null value just returns it. |
JRootPane | getRootPane() Returns the JRootPane ancestor for this component. |
double | getScaleX() Returns the X scale factor for the chart. |
double | getScaleY() Returns the Y scale factory for the chart. |
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). |
Dimension | getSize() Returns the size of this component in the form of a Dimension object. |
int | getWidth() Returns the current width of this component. |
boolean | isDomainZoomable() Returns the flag that determines whether or not zooming is enabled for the domain axis. |
boolean | isOpaque() Returns true if this component is completely opaque. |
boolean | isRangeZoomable() Returns the flag that determines whether or not zooming is enabled for the range axis. |
void | paint(Graphics g) Invoked by Swing to draw components. |
void | paintImmediately(Rectangle r) Paints the specified region now. |
void | print(Graphics g) Invoke this method to print the component to the specified Graphics . |
void | removeAll() Removes all the components from this container. |
void | removeMouseListener(MouseListener l) Removes the specified mouse listener so that it no longer receives mouse events from this component. |
void | removeMouseMotionListener(MouseMotionListener l) Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component. |
void | repaint() Repaints this component. |
void | restoreAutoBounds() Restores the auto-range calculation on both axes. |
void | restoreAutoDomainBounds() Restores the auto-range calculation on the domain axis. |
void | restoreAutoRangeBounds() Restores the auto-range calculation on the range axis. |
void | revalidate() Supports deferred automatic layout. |
void | setAlignmentX(float alignmentX) Sets the horizontal alignment. |
void | setAlignmentY(float alignmentY) Sets the vertical alignment. |
void | setAutoscrolls(boolean autoscrolls) Sets the autoscrolls property. |
void | setBackground(Color bg) Sets the background color of this component. |
void | setBorder(Border border) Sets the border of this component. |
void | setBounds(int x, int y, int width, int height) Moves and resizes this component. |
void | setBounds(Rectangle r) Moves and resizes this component to conform to the new bounding rectangle r . |
void | setChart(JFreeChart chart) Sets the chart that is displayed in the panel. |
void | setCursor(Cursor cursor) Sets the cursor image to the specified cursor. |
void | setDefaultDirectoryForSaveAs(File directory) Sets the default directory for the "save as" option. |
void | setDismissDelay(int delay) Specifies the dismissal delay value for this chart panel. |
void | setDisplayToolTips(boolean flag) Switches the display of tooltips for the panel on or off. |
void | setDomainZoomable(boolean flag) Sets the flag that controls whether or not zooming is enabled for the domain axis. |
void | setDoubleBuffered(boolean aFlag) Sets whether this component should use a buffer to paint. |
void | setEnabled(boolean enabled) Sets whether or not this component is enabled. |
void | setEnforceFileExtensions(boolean enforce) Sets a flag that controls whether or not file extensions are enforced. |
void | setFillZoomRectangle(boolean flag) A flag that controls how the zoom rectangle is drawn. |
void | setFocusable(boolean focusable) Sets the focusable state of this Component to the specified value. |
void | setFont(Font font) Sets the font for this component. |
void | setHorizontalAxisTrace(boolean flag) A flag that controls trace lines on the horizontal axis. |
void | setInitialDelay(int delay) Specifies the initial delay value for this chart panel. |
void | setLayout(LayoutManager mgr) Sets the layout manager for this container. |
void | setLocation(int x, int y) Moves this component to a new location. |
void | setMaximumDrawHeight(int height) Sets the maximum drawing height for the chart on this panel. |
void | setMaximumDrawWidth(int width) Sets the maximum drawing width for the chart on this panel. |
void | setMaximumSize(Dimension maximumSize) Sets the maximum size of this component to a constant value. |
void | setMinimumDrawHeight(int height) Sets the minimum drawing height for the chart on this panel. |
void | setMinimumDrawWidth(int width) Sets the minimum drawing width for the chart on this panel. |
void | setMinimumSize(Dimension minimumSize) Sets the minimum size of this component to a constant value. |
void | setMouseWheelEnabled(boolean flag) Enables or disables mouse wheel support for the panel. |
void | setMouseZoomable(boolean flag) A convenience method that switches on mouse-based zooming. |
void | setMouseZoomable(boolean flag, boolean fillRectangle) A convenience method that switches on mouse-based zooming. |
void | setName(String name) Sets the name of the component to the specified string. |
void | setOpaque(boolean isOpaque) If true the component paints every pixel within its bounds. |
void | setPopupMenu(JPopupMenu popup) Sets the popup menu for the panel. |
void | setPreferredSize(Dimension preferredSize) Sets the preferred size of this component. |
void | setRangeZoomable(boolean flag) A flag that controls mouse-based zooming on the vertical axis. |
void | setRefreshBuffer(boolean flag) Sets the refresh buffer flag. |
void | setReshowDelay(int delay) Specifies the amount of time before the user has to wait initialDelay milliseconds before a tooltip will be shown. |
void | setSize(int width, int height) Resizes this component so that it has width width and height height . |
void | setSize(Dimension d) Resizes this component so that it has width d.width and height d.height . |
void | setToolTipText(String text) Registers the text to display in a tool tip. |
void | setVerticalAxisTrace(boolean flag) A flag that controls trace lines on the vertical axis. |
void | setVisible(boolean aFlag) Makes the component visible or invisible. |
void | setZoomAroundAnchor(boolean zoomAroundAnchor) Sets the flag that controls whether or not zoom operations are centered around the current anchor point. |
void | setZoomFillPaint(Paint paint) Sets the zoom rectangle fill paint. |
void | setZoomInFactor(double factor) Sets the zoom in factor. |
void | setZoomOutFactor(double factor) Sets the zoom out factor. |
void | setZoomOutlinePaint(Paint paint) Sets the zoom rectangle outline paint. |
Point | translateJava2DToScreen(Point2D java2DPoint) Translates a Java2D point on the chart to a screen location. |
Point2D | translateScreenToJava2D(Point screenPoint) Translates a panel (component) location to a Java2D point. |
void | updateUI() Updates the UI for a LookAndFeel change. |
void | validate() Validates this container and all of its subcomponents. |
void | zoomInBoth(double x, double y) Zooms in on an anchor point (specified in screen coordinate space). |
void | zoomInDomain(double x, double y) Decreases the length of the domain axis, centered about the given coordinate on the screen. |
void | zoomOutBoth(double x, double y) Zooms out on an anchor point (specified in screen coordinate space). |
void | zoomOutDomain(double x, double y) Increases the length of the domain axis, centered about the given coordinate on the screen. |