|
JMSLTM Numerical Library 6.1 | |||||||
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.Axis com.imsl.chart.AxisXY
public class AxisXY
The axes for an x-y chart.
This node is used when the mapping to and from user and device space can be decomposed into an x and a y mapping. This is when the mapping map(userX,userY) = (deviceX,deviceY) can be written as map(userX,userY) = (mapX(userX),mapY(userY) = (deviceX,deviceY)
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 |
Constructor Summary | |
---|---|
AxisXY(Chart chart)
Create an AxisXY . |
Method Summary | |
---|---|
Axis1D |
getAxisX()
Return the x-axis node. |
Axis1D |
getAxisY()
Return the y-axis node. |
double[] |
getCross()
Returns the value of the "Cross" attribute. |
void |
mapDeviceToUser(int devX,
int devY,
double[] userXY)
Map the device coordinates to user coordinates. |
void |
mapUserToDevice(double userX,
double userY,
int[] devXY)
Map the user coordinates (userX,userY) to the device coordinates devXY. |
void |
paint(Draw draw)
Paints this node and all of its children. |
void |
setCross(double[] cross)
Sets the value of the "Cross" attribute. |
void |
setCross(double xcross,
double ycross)
Sets the value of the "Cross" attribute. |
void |
setupMapping()
Initializes the mappings between user and coordinate space. |
void |
setWindow(double[] value)
Sets the window in user coordinates along an axis. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AxisXY(Chart chart)
AxisXY
. This also creates two Axis1D
nodes as children of this node. They hold the decomposed mapping. The
"Viewport" attribute for this node is set to [0.2,0.8] by [0.2,0.8].
chart
- the Chart
parent of this nodeMethod Detail |
---|
public Axis1D getAxisX()
Axis1D
x-axis nodepublic Axis1D getAxisY()
Axis1D
y-axis nodepublic double[] getCross()
double
[2] array containing the value of the
"Cross" attribute, if defined. The value is the point where the
X and Y axes intersect, (xcross,ycross). If "Cross" is not
defined then null
is returned.public void mapDeviceToUser(int devX, int devY, double[] userXY)
mapDeviceToUser
in class Axis
devX
- an int
which specifies the device
x-coordinatedevY
- an int
which specifies the device
y-coordinateuserXY
- a double
[2] array on input. On output, the
user coordinates.public void mapUserToDevice(double userX, double userY, int[] devXY)
mapUserToDevice
in class Axis
userX
- a double
which specifies the user
x-coordinateuserY
- a double
which specifies the user
y-coordinatedevXY
- an int
[2] array on input. On output, the
device coordinates.public void paint(Draw draw)
paint
method in this node's parent.
paint
in class Axis
draw
- the Draw
object to be paintedpublic void setCross(double[] cross)
cross
- is a double
of length two containing the x
and y-coordinate where the axes crosspublic void setCross(double xcross, double ycross)
xcross
- a double
which specifies the x-coordinate
where the axes crossycross
- a double
which specifies the y-coordinate
where the axes crosspublic void setupMapping()
setupMapping
in class Axis
public void setWindow(double[] value)
value
- a double
array which contains the minimum
and maximum of the window along an axis
|
JMSLTM Numerical Library 6.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |