|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jcckit.plot.PlotCanvas | +--jcckit.GraphicsPlotCanvas
Class which handles plotting into a Graphics context based on
the GraphicsRenderer
.
This class is not a subclass of java.awt.Component.
The actual AWT component presenting the plot is an innerclass. Its
instance wrapped by GraphicsPlotCanvas can be obtained with
getGraphicsCanvas()
.
The plot is painted by using double-buffering and pre-rendered view of the coordinate system. That is, the coordinate system is drawn into an off-screen image. It will be redrawn only if the size of the embedding AWT component is changed.
Inner Class Summary | |
protected class |
GraphicsPlotCanvas.GraphicsCanvas
AWT component which actually shows the rendered plot. |
Field Summary | |
protected GraphicsPlotCanvas.GraphicsCanvas |
_canvas
Wrapped AWT component. |
static java.lang.String |
BACKGROUND_KEY
Key of a configuration parameter. |
static java.lang.String |
FOREGROUND_KEY
Key of a configuration parameter. |
Fields inherited from class jcckit.plot.PlotCanvas |
HORIZONTAL_ANCHOR_KEY, PAPER_KEY, PLOT_KEY, VERTICAL_ANCHOR_KEY |
Constructor Summary | |
GraphicsPlotCanvas(ConfigParameters config)
Creates an instance from the specfied configuration parameters. |
Method Summary | |
protected static void |
connectDataAndShow(java.lang.String fileName,
ConfigParameters config,
GraphicsPlotCanvas plotCanvas)
Connects plotCanvas with data created from config and shows the chart in a Frame where fileName appears in the title. |
protected void |
createGraphicsCanvas()
Creates an instance of GraphicsPlotCanvas.GraphicsCanvas . |
java.awt.Canvas |
getGraphicsCanvas()
Returns the wrapped AWT component which contains the rendered plot. |
static void |
main(java.lang.String[] args)
Shows a plot in a Frame. |
GraphPoint |
mapCursorPosition(int x,
int y)
Maps the cursor position onto a point in device-independent coordinates. |
void |
plotChanged(PlotEvent event)
Repaints the wrapped AWT component. |
Methods inherited from class jcckit.plot.PlotCanvas |
connect, getHorizontalAnchor, getPaper, getPlot, getVerticalAnchor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String BACKGROUND_KEY
public static final java.lang.String FOREGROUND_KEY
protected GraphicsPlotCanvas.GraphicsCanvas _canvas
Constructor Detail |
public GraphicsPlotCanvas(ConfigParameters config)
Key & Default Value | Type | Mandatory | Description |
---|---|---|---|
background = default background color of the wrapped AWT component | Color | no | Background color of the wrapped AWT component. |
foreground = default foreground color of the wrapped AWT component | Color | no | Foreground color of the wrapped AWT component. |
PlotCanvas
apply.Method Detail |
protected void createGraphicsCanvas()
GraphicsPlotCanvas.GraphicsCanvas
.public void plotChanged(PlotEvent event)
plotChanged
in class PlotCanvas
public java.awt.Canvas getGraphicsCanvas()
public GraphPoint mapCursorPosition(int x, int y)
x
- X-coordinate of the cursor.y
- Y-coordinate of the cursor.public static void main(java.lang.String[] args) throws java.lang.Exception
Usage: java jcckit.GraphicsPlotCanvas <properties file>
protected static void connectDataAndShow(java.lang.String fileName, ConfigParameters config, GraphicsPlotCanvas plotCanvas)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |