ChartCat 1.2

li.netcat.chart
Class Chart

java.lang.Object
  extended byli.netcat.chart.Chart

public class Chart
extends java.lang.Object

Device independent representation of a chart. As the following figure shows, the chart is the central cogwheel. It is the container for the building blocks (parts) and can easily be adapted to different device dependent output channels:

See the tutorial for examples.

Author:
Arthur Marxer

Constructor Summary
Chart()
          Constructs a new and empty Chart.
Chart(Part content)
          Constructs a new Chart and uses the given Part as content.
 
Method Summary
 void addChartInvalidationListener(ChartInvalidationListener listener)
          Adds a chart invalidation listener to the list of listeners.
 Part getContent()
          Returns the contntent of this container.
 LogicalPoint getLogicalPoint(java.awt.Graphics g, java.awt.Point p)
          Returns a logic point for a given physical point.
 java.awt.Dimension getSize(java.awt.Graphics g)
          Returns the size of this chart.
 void invalidate()
          Invalidates the content of this chart.
 void paint(java.awt.Graphics g, int x, int y)
          Paints this chart to the given graphics object at the given position.
 void removeChartInvalidationListener(ChartInvalidationListener listener)
          Removes a chart invalidation listener from the list of listeners.
 void setContent(Part part)
          Sets the content of this container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chart

public Chart()
Constructs a new and empty Chart. Use the setContent(Part) method to fill this container with a reasonable part.


Chart

public Chart(Part content)
Constructs a new Chart and uses the given Part as content. The part will typically be a PanelPart that contains other parts.

Parameters:
content - The content of this container. This parameter might be null.
Method Detail

getContent

public Part getContent()
Returns the contntent of this container.

Returns:
The contntent of this container, might be null.

setContent

public void setContent(Part part)
Sets the content of this container. The part will typically be a PanelPart that contains other parts.


invalidate

public void invalidate()
Invalidates the content of this chart. This method gets automatically called when the data model or some properties of the content changes. It also notifies the list of ChartInvalidationListeners.


getSize

public java.awt.Dimension getSize(java.awt.Graphics g)
Returns the size of this chart.

Returns:
The size of this chart in pixel.

getLogicalPoint

public LogicalPoint getLogicalPoint(java.awt.Graphics g,
                                    java.awt.Point p)
Returns a logic point for a given physical point. The logic point carries information about the underlying data model and the current indices of the model. This method is used to display for example a tooltip at the position of the mouse cursor or to implement a drill down mechanism.

Parameters:
g - The current graphics object.
p - The point relative to the coordinate system of this chart.
Returns:
A logic point or null if the given point is not inside a shape.

paint

public void paint(java.awt.Graphics g,
                  int x,
                  int y)
Paints this chart to the given graphics object at the given position.

Parameters:
g - The graphics object, not null.
x - The x-coordinate of the upper left corner.
y - The y-coordinate of the upper left corner.

addChartInvalidationListener

public void addChartInvalidationListener(ChartInvalidationListener listener)
Adds a chart invalidation listener to the list of listeners.


removeChartInvalidationListener

public void removeChartInvalidationListener(ChartInvalidationListener listener)
Removes a chart invalidation listener from the list of listeners.

Parameters:
listener - A listener that has been added.

ChartCat 1.2

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print