|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetcharts.pro.common.NFBaseClass
netcharts.pro.common.NFAxisMap
public class NFAxisMap
The Axis map object is used to identify how each dimension of a data element is translated into screen coordinates. For example consider the X/Y coordinate (10,15). Using the NFAxisMap object, we can instruct the rendering engine that the X coordinate should be mapped to the top axis scale, and the Y axis should be mapped to the left axis scale. If top axis scale ranges from 0 - 10 and the left axis scale ranges from 0 - 100, the point will be drawn at the far right side of the chart, about 15% of the way up from the bottom axis.
The NFAxis Map object also provides developers the ability to map to multiple axes on any given side by specifying the axis and the index to the axis on a given side (from 1 - N axes per side).
Some implementations of this object also allow the use of PIXEL or PERCENT. PIXEL indicates that the dimension value should be mapped using pixels relative to the upper left corner of the drawing area. PERCENTAGE means that the dimension value should be mapped as a percentage of the overall width/height of the chart.
Field Summary | |
---|---|
static java.util.Hashtable |
axisSideMap
The set of allowed axis sides. |
static int |
BOTTOM
BOTTOM |
static int |
LEFT
LEFT |
static int |
PERCENT
PERCENT - only valid in legends and notes |
static int |
PIXEL
PIXEL - only valid in legends and notes |
static int |
RIGHT
RIGHT |
static int |
TOP
TOP |
static int |
XAXIS
X Axis |
static int |
YAXIS
Y Axis |
Constructor Summary | |
---|---|
NFAxisMap()
Constructs a default axis map |
|
NFAxisMap(int xAxisMap,
int yAxisMap)
Constructs an axis map using constants to define which scales should be used to translate data values. |
|
NFAxisMap(NFDataMapper xAxis,
NFDataMapper yAxis)
Constructs an axis map using axis objects to define which scales should be used to translate data values. |
Method Summary | |
---|---|
java.lang.String |
getCDL()
Generate CDL parameters representing this axis map |
void |
getCDL(java.lang.StringBuffer sb)
Append CDL parameters representing this axis map to the given StringBuffer. |
NFDataMapper |
getXAxis()
Deprecated. Please use only in case when you have manually set xAxis with setter method. In case when chart is initialized from CDL, use: NFDataChart.getXAxis(NFDataSet set) method
chart.getXAxis(dataSet); |
int |
getXAxisMap()
Get the scale that the X dimension should be translated with. |
int |
getXAxisMapIndex()
Set the index of the x axis side. |
NFDataMapper |
getYAxis()
Deprecated. Please use only in case when you have manually set yAxis with setter method. In case when chart is initialized from CDL, use: NFDataChart.getYAxis(NFDataSet set) method
chart.getYAxis(dataSet); |
int |
getYAxisMap()
Get the scale that the X dimension should be translated with. |
int |
getYAxisMapIndex()
Set the index of the y axis side. |
void |
setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation. |
void |
setXAxis(NFDataMapper xAxis)
Set the axis object that the X dimension should be translated with. |
void |
setXAxisMap(int xAxisMap)
Set the scale that the X dimension should be translated with using a constant. |
void |
setXAxisMapIndex(int xAxisMapIndex)
Set the index of the x axis side. |
void |
setYAxis(NFDataMapper yAxis)
Set the axis object that the Y dimension should be translated with. |
void |
setYAxisMap(int yAxisMap)
Set the scale that the Y dimension should be translated with using a constant. |
void |
setYAxisMapIndex(int yAxisMapIndex)
Set the index of the y axis side. |
java.lang.String |
toString()
Returns a new String object representing this axis map. |
Methods inherited from class netcharts.pro.common.NFBaseClass |
---|
clone, getModified, getUserObject, setModified, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.util.Hashtable axisSideMap
LEFT, RIGHT, TOP, BOTTOM, PIXEL, PERCENT
.
public static final int XAXIS
public static final int YAXIS
public static final int BOTTOM
public static final int TOP
public static final int LEFT
public static final int RIGHT
public static final int PIXEL
public static final int PERCENT
Constructor Detail |
---|
public NFAxisMap()
public NFAxisMap(int xAxisMap, int yAxisMap)
xAxisMap
- One of BOTTOM, TOP, PIXEL, PERCENT
Note that Pixel and
Percent mapping currently only apply to NoteSets.yAxisMap
- One of LEFT, RIGHT, PIXEL, PERCENT
Note that Pixel and
Percent mapping currently only apply to NoteSets.public NFAxisMap(NFDataMapper xAxis, NFDataMapper yAxis)
Method Detail |
---|
public void setXAxis(NFDataMapper xAxis)
xAxis
- Axis object that will be used to map the X dimension.public NFDataMapper getXAxis()
NFDataChart.getXAxis(NFDataSet set) method
chart.getXAxis(dataSet);
public void setYAxis(NFDataMapper yAxis)
yAxis
- Axis object that will be used to map the Y dimension.public NFDataMapper getYAxis()
NFDataChart.getYAxis(NFDataSet set) method
chart.getYAxis(dataSet);
public void setXAxisMap(int xAxisMap)
If the value passed is not a valid border type an IllegalArgumentException will be thrown.
xAxisMap
- One of BOTTOM, TOP, PIXEL, PERCENT
Note that Pixel and
Percent mapping currently only apply to NoteSets.public int getXAxisMap()
BOTTOM, TOP, PIXEL, PERCENT
or BOTTOM
if not defined. Note that Pixel and
Percent mapping currently only apply to NoteSets.public void setXAxisMapIndex(int xAxisMapIndex)
xAxisMapIndex
- The side axis to map to. Axes are
indexed from 1 to N axes on each particular
side (bottom,top).public int getXAxisMapIndex()
public void setYAxisMap(int yAxisMap)
If the value passed is not a valid border type an IllegalArgumentException will be thrown.
yAxisMap
- One of LEFT, RIGHT, PIXEL, PERCENT
Note that Pixel and
Percent mapping currently only apply to NoteSets.public int getYAxisMap()
LEFT, RIGHT, PIXEL, PERCENT
or LEFT
if not
defined. Note that Pixel and
Percent mapping currently only apply to NoteSets.public void setYAxisMapIndex(int yAxisMapIndex)
yAxisMapIndex
- The side axis to map to. Axes are
indexed from 1 to N axes on each particular
side (left,right).public int getYAxisMapIndex()
public void setCDL(java.lang.String cdl)
setCDL
in interface NFCDLGenerator
cdl
- CDL in the form: (BOTTOM, LEFT)
public java.lang.String toString()
toString
in interface NFCDLGenerator
toString
in class java.lang.Object
public java.lang.String getCDL()
getCDL
in interface NFCDLGenerator
(BOTTOM,LEFT)
public void getCDL(java.lang.StringBuffer sb)
sb
- Target buffer to append the CDL parametersincludeParens
- If true, this will cause the parameters to be delimited
with parenthesis.
|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2011 |
Last Modified: Jun 28, 2011 |