|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.chart.Chart
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.
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 |
public Chart()
Chart
. Use the setContent(Part)
method to fill this
container with a reasonable part.
public Chart(Part content)
Chart
and uses the given Part
as content.
The part will typically be a PanelPart
that contains other parts.
content
- The content of this container. This parameter might be null
.Method Detail |
public Part getContent()
null
.public void setContent(Part part)
PanelPart
that contains other parts.
public void invalidate()
ChartInvalidationListener
s.
public java.awt.Dimension getSize(java.awt.Graphics g)
public LogicalPoint getLogicalPoint(java.awt.Graphics g, java.awt.Point p)
g
- The current graphics object.p
- The point relative to the coordinate system of this chart.
null
if the given point is not inside a shape.public void paint(java.awt.Graphics g, int x, int y)
g
- The graphics object, not null
.x
- The x-coordinate of the upper left corner.y
- The y-coordinate of the upper left corner.public void addChartInvalidationListener(ChartInvalidationListener listener)
public void removeChartInvalidationListener(ChartInvalidationListener listener)
listener
- A listener that has been added.
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |