|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart2djava.ChartObj
com.quinncurtis.chart2djava.GraphObj
com.quinncurtis.chart2djava.ChartText
com.quinncurtis.chart2djava.AxisLabels
public abstract class AxisLabels
The AxisLabels class is the base class for all axes label classes in the QCChart2D class library. It is an abstract subclass of the GraphObj class.
Field Summary |
---|
Constructor Summary | |
---|---|
AxisLabels()
The default AxisLabels constructor. |
|
AxisLabels(Axis baseaxis)
This constructor creates a new AxisLabels object based on the specified axis. |
Method Summary | |
---|---|
abstract void |
calcAutoAxisLabels()
The abstract CalcAutoAxisLabels method needs to be implemented in any subclasses of this class. |
void |
copy(AxisLabels source)
Copies the source axis labels. |
int |
errorCheck(int nerror)
Checks the current axis labels object for common errors. |
int |
getAxisLabelsDir()
Gets the justification of the axis labels with respect to the axis tick marks. |
int |
getAxisLabelsEnds()
Returns whether there should be labels for the axis minimum (LABEL_MIN), maximum (LABEL_MAX) or tick mark starting point (LABEL_ORIGIN). |
int |
getAxisLabelsFormat()
Returns the numeric format for the axis labels. |
abstract int |
getAxisLabelsFormat(TickMark tickmark)
Returns the numeric format for the axis labels. |
double |
getAxisLabelsTickOffsetX()
Gets the x-offset of the label offset from the endpoint of the associated tick mark. |
double |
getAxisLabelsTickOffsetY()
Gets the y-offset of the label offset from the endpoint of the associated tick mark. |
Axis |
getBaseAxis()
Gets the base axis associated with this axis labels object. |
abstract ChartLabel |
getCompatibleLabel()
The abstract getCompatibleLabel method needs to be implemented in any subclasses of this class. |
int |
getOverlapLabelMode()
Returns the axis labels overlap mode. |
void |
outAxisLabel(java.awt.Graphics2D g2,
ChartLabel textobj,
TickMark ticmark)
Outputs a text object at specific tick mark. |
void |
setAxisLabels(double rotation,
int labdir,
int labelends,
java.awt.Color labcolor)
Initializes the attributes of an AxisLabels object. |
void |
setAxisLabels(java.awt.Font font,
java.awt.Color labcolor)
Initializes the attributes of an AxisLabels object. |
void |
setAxisLabels(java.awt.Font font,
double rotation,
int labdir,
int labelends,
java.awt.Color labcolor)
Initializes the attributes of an AxisLabels object. |
abstract void |
setAxisLabelsDecimalPos(int decimalpos)
Sets the number of digits to the right of the decimal point for numeric axis labels. |
void |
setAxisLabelsDir(int labdir)
Sets the justification of the axis labels with respect to the axis tick marks. |
void |
setAxisLabelsEnds(int labelends)
Sets whether there should be labels for the axis minimum (LABEL_MIN), maximum (LABEL_MAX) or tick mark starting point (LABEL_ORIGIN). |
void |
setAxisLabelsFormat(int format)
Sets the numeric format for the axis labels. |
void |
setAxisLabelsTickOffsetX(double offset)
Sets the x-offset, in window device coordinates, of the label offset from the endpoint of the associated tick mark. |
void |
setAxisLabelsTickOffsetY(double offset)
Sets the y-offset, in window device coordinates, of the label offset from the endpoint of the associated tick mark. |
void |
setBaseAxis(Axis baseaxis)
Sets the base axis associated with this axis labels object. |
void |
setOverlapLabelMode(int overlapmode)
It is possible that axis labels overlap if the window that the axes are placed in is to small, the major tick marks are to close together, or in the case of time axis labels, to large for the current tick mark spacing. |
Methods inherited from class com.quinncurtis.chart2djava.ChartText |
---|
addNewLineTextString, checkIntersection, clone, copy, draw, drawText, drawTextBox, getLineLeading, getMultilineSubstring, getNumLines, getResizedTextFont, getTextBgColor, getTextBgMode, getTextBox, getTextBoxColor, getTextBoxMode, getTextDimension, getTextFont, getTextMaxSizeY, getTextNudge, getTextRotation, getTextSizeX, getTextSizeY, getTextString, getXJust, getYJust, initChartText, preCalcTextBoundingBox, setLineLeading, setResizedTextFont, setTextBgColor, setTextBgMode, setTextBoxColor, setTextBoxMode, setTextFont, setTextNudge, setTextNudge, setTextRotation, setTextString, setXJust, setYJust, TypeSafeVectorCopy |
Methods inherited from class com.quinncurtis.chart2djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID, TypeSafeVectorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AxisLabels()
public AxisLabels(Axis baseaxis)
baseaxis
- The AxisLabels object uses the tick marks defined for this axis to locate
the axis labels on the axis.Method Detail |
---|
public abstract void calcAutoAxisLabels()
public void copy(AxisLabels source)
source
- The source axis labels object.public int errorCheck(int nerror)
errorCheck
in class ChartText
nerror
- Current error state.
public int getAxisLabelsDir()
public int getAxisLabelsEnds()
public int getAxisLabelsFormat()
public abstract int getAxisLabelsFormat(TickMark tickmark)
tickmark
- The tick mark that the text label is place at.
public double getAxisLabelsTickOffsetX()
public double getAxisLabelsTickOffsetY()
public Axis getBaseAxis()
public abstract ChartLabel getCompatibleLabel()
public int getOverlapLabelMode()
public void outAxisLabel(java.awt.Graphics2D g2, ChartLabel textobj, TickMark ticmark)
g2
- The graphics context.textobj
- The text object used as an axis label.ticmark
- The tick mark that the text label is place at.public void setAxisLabels(double rotation, int labdir, int labelends, java.awt.Color labcolor)
rotation
- The rotation of label text in the normal viewing plane.labdir
- The justification of the axis label (AXIS_MIN or AXIS_MAX) with respect to the
tick mark endpoint.labelends
- Specifies whether there should be labels for the axis minimum (LABEL_MIN),
maximum (LABEL_MAX) or tick mark starting point (LABEL_ORIGIN). The value of these constants can be
OR'd together. The value of LABEL_MIN | LABEL_MAX | LABEL_ORIGIN is LABEL_ALLlabcolor
- The color of the label text.public void setAxisLabels(java.awt.Font font, java.awt.Color labcolor)
font
- The font object used to display the axis label text.labcolor
- The color of the label text.public void setAxisLabels(java.awt.Font font, double rotation, int labdir, int labelends, java.awt.Color labcolor)
font
- The font object used to display the axis label text.rotation
- The rotation, in degrees, of label text in the normal viewing plane.labdir
- The justification of the axis label (AXIS_MIN or AXIS_MAX) with respect to the
tick mark endpoint.labelends
- Specifies whether there should be labels for the axis minimum (LABEL_MIN),
maximum (LABEL_MAX) or tick mark starting point (LABEL_ORIGIN). The value of these constants can be
OR'd together. The value of LABEL_MIN | LABEL_MAX | LABEL_ORIGIN is LABEL_ALLlabcolor
- The color of the label text.public abstract void setAxisLabelsDecimalPos(int decimalpos)
decimalpos
- Sets the number of digits to the right of the decimal point for numeric axis labels.public void setAxisLabelsDir(int labdir)
labdir
- Sets the justification, AXIS_MAX or AXIS_MIN, of the axis labels with respect
to the axis tick marks.public void setAxisLabelsEnds(int labelends)
labelends
- Sets whether there should be labels for the axis minimum (LABEL_MIN), maximum
(LABEL_MAX) or tick mark starting point (LABEL_ORIGIN). The value of these constants can be OR'd together.
The value of LABEL_MIN | LABEL_MAX | LABEL_ORIGIN is LABEL_ALL.public void setAxisLabelsFormat(int format)
format
- Sets the numeric format for the axis labels. Use
one of the numeric format constants: DECIMALFORMAT, SCIENTIFICFORMAT, EXPONENTFORMAT,
BUSINESSFORMAT, ENGINEERINGFORMAT, PERCENTFORMAT, CURRENCYFORMAT , CURRENCYBUSINESSFORMAT
for numeric labels or one of the time format constants: TIMEDATEFORMAT_MSDDD, TIMEDATEFORMAT_MSDD,
TIMEDATEFORMAT_MSD, TIMEDATEFORMAT_MS, TIMEDATEFORMAT_12HMSDD, TIMEDATEFORMAT_12HMSD,
TIMEDATEFORMAT_12HMS, TIMEDATEFORMAT_12HM, TIMEDATEFORMAT_24HMSDD, TIMEDATEFORMAT_24HMSD,
TIMEDATEFORMAT_24HMS, TIMEDATEFORMAT_24HM, TIMEDATEFORMAT_STANDARD, TIMEDATEFORMAT_MDY,
TIMEDATEFORMAT_DMY, TIMEDATEFORMAT_MY, TIMEDATEFORMAT_Q, TIMEDATEFORMAT_MMMM,
TIMEDATEFORMAT_MMM, TIMEDATEFORMAT_M, TIMEDATEFORMAT_DDDD, TIMEDATEFORMAT_DDD,
TIMEDATEFORMAT_D, TIMEDATEFORMAT_Y, TIMEDATEFORMAT_MDY2000, TIMEDATEFORMAT_DMY2000,
TIMEDATEFORMAT_MY2000, TIMEDATEFORMAT_Y2000
for time labelspublic void setAxisLabelsTickOffsetX(double offset)
offset
- Sets the x-offset, in window device coordinates, of the label offset from the
endpoint of the associated tick mark. .public void setAxisLabelsTickOffsetY(double offset)
offset
- Sets the y-offset, in window device coordinates, of the label offset from the
endpoint of the associated tick mark. .public void setBaseAxis(Axis baseaxis)
baseaxis
- Sets the base axis associated with this axis labels object.public void setOverlapLabelMode(int overlapmode)
overlapmode
- Set this mode using one of the axis label overlap constants:
OVERLAP_LABEL_DRAW, OVERLAP_LABEL_DELETE.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |