public class PlotCanvas extends Object implements PlotListener
Plot
. The canvas is specified
by a ClippingRectangle
, called paper. A horizontal and
vertical Anchor
determine the position of the paper on the actual
device.Modifier and Type | Field and Description |
---|---|
static String |
HORIZONTAL_ANCHOR_KEY
Configuration parameter key.
|
static String |
PAPER_KEY
Configuration parameter key.
|
static String |
PLOT_KEY
Configuration parameter key.
|
static String |
VERTICAL_ANCHOR_KEY
Configuration parameter key.
|
Constructor and Description |
---|
PlotCanvas(ConfigParameters config)
Creates an instance from the specified configuration parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
connect(DataPlot dataPlot)
|
Anchor |
getHorizontalAnchor()
Returns the horizontal anchor.
|
ClippingRectangle |
getPaper()
Returns the paper definition.
|
Plot |
getPlot()
Returns the plot.
|
Anchor |
getVerticalAnchor()
Returns the vertical anchor.
|
void |
plotChanged(PlotEvent event)
Handles the spcified event.
|
public static final String PAPER_KEY
public static final String HORIZONTAL_ANCHOR_KEY
public static final String VERTICAL_ANCHOR_KEY
public static final String PLOT_KEY
public PlotCanvas(ConfigParameters config)
Key & Default Value | Type | Mandatory | Description |
---|---|---|---|
horizontalAnchor = center | String | no | Horizontal position of the paper relative to the device border. Possible values are left, center, and right. |
paper = 0, 0, 1, 0.6 | double[] | no | Rectangle defining the paper. The first two values determine the x- and y- coordinates (in device-independent units) of the lower-left corner. The last two values determine the upper-right corner. |
plot = default values of Plot |
ConfigParameters | no | Definition of the Plot . |
verticalAnchor = center | String | no | Vertical position of the paper relative to the device border. Possible values are top, center, and bottom. |
Note, that this instance registers itself at the wrapped Plot
instance.
public ClippingRectangle getPaper()
public Anchor getHorizontalAnchor()
public Anchor getVerticalAnchor()
public Plot getPlot()
public void connect(DataPlot dataPlot)
dataPlot
- Data to be connected with this plot canvas. Can be
null in order to disconnect this instance from a
DataPlot.public void plotChanged(PlotEvent event)
plotChanged
in interface PlotListener
Copyright © 2014. All Rights Reserved.