|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.chart.AbstractChartNode com.imsl.chart.ChartNode com.imsl.chart.Chart
The root node of the chart tree.
This chart node creates the following child nodes:
Background
, ChartTitle
and Legend
.
Field Summary |
Fields inherited from class com.imsl.chart.AbstractChartNode |
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG |
Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
Chart()
This is the root of our tree, it has no parent. |
|
Chart(Component component)
This is the root of our tree, it has no parent. |
|
Chart(Image image)
This is the root of our tree, it has no parent. |
Method Summary | |
void |
addLegendItem(int type,
ChartNode node)
Adds a legend to this ChartNode |
void |
addMouseListener(MouseListener listener)
Adds a MouseListener to the component associated with this chart. |
void |
addMouseMotionListener(MouseMotionListener listener)
Adds a MouseMotionListener to the component associated with this chart. |
Object |
clone()
Returns a clone of the graphics tree. |
protected Object |
clone(Map hashClonedNode)
Returns a clone of this node. |
void |
copy()
Copy the chart to the clipboard. |
protected void |
finalize()
|
void |
paint(Draw draw)
Paints this node and all of its children. |
void |
paint(Graphics g)
Paints this node and all of its children. |
void |
paintChart(Graphics graphics)
Draw the chart using the given Graphics object. |
Image |
paintImage()
Returns an Image of the chart. |
void |
pick(MouseEvent event)
Fire the PickListeners for the nodes hit by the event. |
int |
print(Graphics graphics,
PageFormat pageFormat,
int param)
This method implements the Printable interface. |
void |
repaint()
Prepares the chart to be repainted by deleting any double buffering image. |
void |
setComponent(Component component)
Sets the Component for this chart. |
void |
update(Graphics g)
|
void |
writePNG(OutputStream os,
int width,
int height)
Writes the chart as an PNG file. |
void |
writeSVG(Writer writer,
boolean useCSS)
Writes the chart as an SVG file. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Chart()
public Chart(Component component)
component
- the Component
that
contains the chart.public Chart(Image image)
image
- the Image
into which
the chart is to be drawn.Method Detail |
public void addLegendItem(int type, ChartNode node)
ChartNode
type
- an int
which specifies the LegendItem
type.
0 = DATA_TYPE_NONE;
1 = DATA_TYPE_LINE;
2 = DATA_TYPE_MARKER;
3 = DATA_TYPE_FILLnode
- the ChartNode
object to which this legend is to
be addedpublic void addMouseListener(MouseListener listener)
setComponent(java.awt.Component)
public void addMouseMotionListener(MouseMotionListener listener)
setComponent(java.awt.Component)
public Object clone()
Object
which is a clone of this graphics treeprotected Object clone(Map hashClonedNode)
clone
in class AbstractChartNode
hashClonedNode
- the Hashtable
to be cloned
Object
which is a clone of this nodepublic void copy()
protected void finalize()
public void paint(Draw draw)
paint
in class ChartNode
draw
- a Draw
object to be paintedpublic void paint(Graphics g)
g
- Graphics
object to be paintedpublic void paintChart(Graphics graphics)
graphics
- is the object for which the chart is to be drawn.public Image paintImage()
Image
containing a picture of the chart.
Call flush() on the image when it is no longer needed.public void pick(MouseEvent event)
event
- MouseEvent/code whose position determines which nodes
have been selected
public int print(Graphics graphics, PageFormat pageFormat, int param) throws PrinterException
print
in interface Printable
PrinterException
Printable
public void repaint()
public void setComponent(Component component)
addMouseListener(java.awt.event.MouseListener)
,
addMouseMotionListener(java.awt.event.MouseMotionListener)
public void update(Graphics g)
public void writePNG(OutputStream os, int width, int height) throws IOException
os
- is the output stream to which the PNG image is to be written.width
- is the width of the output image.height
- is the height of the output image.
IOException
- if there is a problem writing the image to the stream.
NoClassDefFoundError
- if an older version of J2SE is used and the
Java Advanced Imaging Toolkit cannot be found.public void writeSVG(Writer writer, boolean useCSS) throws IOException
writer
- is the output character streamuseCSS
- is true if the CSS style attribute is to be used
IOException
- if there is a problem writing the file.
NoClassDefFoundError
- if the Batik library cannot be found.
|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |