net.sourceforge.chart2d
Class AxisArea
java.lang.Object
|
+--net.sourceforge.chart2d.Area
|
+--net.sourceforge.chart2d.FontArea
|
+--net.sourceforge.chart2d.TitledArea
|
+--net.sourceforge.chart2d.AxisArea
- Direct Known Subclasses:
- XAxisArea, YAxisArea
- abstract class AxisArea
- extends TitledArea
Contains shared methods of XAxisArea and YAxisArea.
| Fields inherited from class net.sourceforge.chart2d.Area |
BETWEEN, BOTTOM, CENTER, CENTERED, CONTINUOUS, DASHED, DOTTED, FLOAT, HEIGHT, HORIZONTAL, INTEGER, LABELSBOTTOM, LABELSLEFT, LEFT, LEFTBOTTOM, LEFTRIGHT, LEFTTOP, LESSER, MAX, MAXMODEL, MIN, RIGHT, RIGHTBOTTOM, RIGHTTOP, TOP, TOPBOTTOM, VERTICAL, WIDTH |
|
Constructor Summary |
(package private) |
AxisArea()
|
|
Method Summary |
(package private) abstract int |
getBetweenTicksGapThicknessModel()
Returns the model thickness of the gap between the ticks. |
(package private) abstract TextArea[] |
getLabels(java.awt.Graphics2D g2D)
The labels of the axis. |
(package private) abstract java.awt.Rectangle[] |
getTicks(java.awt.Graphics2D g2D)
The bounds of the ticks. |
(package private) abstract int |
getTicksAlignment()
Returns how the ticks are aligned with respect to the labels. |
(package private) abstract java.awt.Color |
getTicksColor()
Returns the color of the ticks. |
(package private) abstract void |
setBetweenTicksAndLabelsGapExistence(boolean existence)
The existence of a gap between the row of labels and the row of ticks. |
(package private) abstract void |
setBetweenTicksAndLabelsGapThicknessModel(int gap)
The model thickness for the gap between the row of labels and the row of
ticks. |
(package private) abstract void |
setBetweenTicksGapExistence(boolean existence)
The existence of a gap between each tick and the next. |
(package private) abstract void |
setBetweenTicksGapThicknessModel(int gap)
The model thickness for the gap between each tick. |
(package private) abstract void |
setNumTicks(int num)
The number of ticks should be equal to the number of axis labels at all
times, EXCEPT with a type of chart with a (LABELSBOTTOM axis and a
graph components alignment is true). |
(package private) abstract void |
setTicksAlignment(int alignment)
The alignment of the ticks respective to the labels. |
(package private) abstract void |
setTicksColor(java.awt.Color color)
The color for the ticks. |
(package private) abstract void |
setTicksSizeModel(java.awt.Dimension size)
The model size for the ticks. |
(package private) abstract void |
setType(int type)
Specifies the type of the Axis. |
| Methods inherited from class net.sourceforge.chart2d.TitledArea |
getBetweenTitleAndSpaceGapThickness, getBetweenTitleAndSpaceGapThicknessModel, getMaxEntitledSpaceBounds, getTitle, getTitleAutoLocate, getTitledAreaNeedsUpdate, getTitleExistence, getTitleJustifications, getTitleSize, getTitleText, paintComponent, resetTitledAreaModel, setBetweenTitleAndSpaceGapExistence, setBetweenTitleAndSpaceGapThicknessModel, setTitle, setTitleAutoLocate, setTitleExistence, setTitleJustifications, setTitleLocation, setTitleRotateLeft, updateTitledArea |
| Methods inherited from class net.sourceforge.chart2d.FontArea |
getFont, getFontAreaNeedsUpdate, getFontColor, getFontName, getFontPointModel, getFontStyle, resetFontAreaModel, setFontColor, setFontName, setFontPointModel, setFontStyle, updateFontArea |
| Methods inherited from class net.sourceforge.chart2d.Area |
applyRatio, getAreaNeedsUpdate, getAutoSize, getBackgroundColor, getBackgroundExistence, getBorderColor, getBorderColor, getBorderExistence, getBorderExistence, getBorderThickness, getBorderThickness, getBorderThicknessModel, getBorderThicknessModel, getGapThickness, getGapThicknessModel, getJustifications, getRatio, getResetAreaModel, getSize, getSizeLocation, getSpaceSize, getSpaceSizeLocation, resetAreaModel, setAutoJustifys, setAutoSizes, setBackgroundColor, setBackgroundExistence, setBorderAssociations, setBorderColor, setBorderColors, setBorderCornerAssociations, setBorderExistence, setBorderExistences, setBorderThicknessModel, setBorderThicknessModels, setCustomRatio, setGapAssociations, setGapExistence, setGapExistences, setGapThicknessModel, setGapThicknessModels, setJustifications, setLockRatios, setSize, setSizeLocation, setSpaceSize, setSpaceSizeLocation, updateArea |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AxisArea
AxisArea()
setType
abstract void setType(int type)
- Specifies the type of the Axis. The type refers to what type of chart
it supports. In any chart the objects are plotted against one side,
the values side, the values side has raw numbers like 0, 100, 200, etc.
The other side, the labels side, has the labels for the data being plotted,
like September, November, etc. If the labels side is along the bottom
of the graph, then set the type to LABELSBOTTOM. If the labels side is
along the left/right side of the graph then set the type to LABELSLEFT.
- Parameters:
type - Whether this axis is used for labels bottom or labels left
applications.
setTicksColor
abstract void setTicksColor(java.awt.Color color)
- The color for the ticks.
- Parameters:
color - The x Axis tick color.
setTicksAlignment
abstract void setTicksAlignment(int alignment)
- The alignment of the ticks respective to the labels. The
bullets can either be place in line with each label, or in in line with
the middle of the space between each label. That is, bullets can be
centered in the middle of the label, or placed between each label.
- Parameters:
alignment - With values of either Area.CENTERED or Area.BETWEEN
setNumTicks
abstract void setNumTicks(int num)
- The number of ticks should be equal to the number of axis labels at all
times, EXCEPT with a type of chart with a (LABELSBOTTOM axis and a
graph components alignment is true).
- Parameters:
num - The number of axis ticks.
setTicksSizeModel
abstract void setTicksSizeModel(java.awt.Dimension size)
- The model size for the ticks. If auto maximum sizing is enabled,
then the actual tick size can grow and shrink; in this case a ratio based
on the maximum area size / model area size is computed and applied to the
model size in order to find the actual size. With maximum sizing
disabled, the actual size is the model size.
- Parameters:
size - The model size for the ticks. [Do not pass null]
setBetweenTicksGapExistence
abstract void setBetweenTicksGapExistence(boolean existence)
- The existence of a gap between each tick and the next. If the gap does
not exist, then it will not be used in calculations.
- Parameters:
existence - The existence of a gap between each tick and the next. If
true, then they do.
setBetweenTicksGapThicknessModel
abstract void setBetweenTicksGapThicknessModel(int gap)
- The model thickness for the gap between each tick. If auto maximum sizing
is enabled,
then the actual thickness size can grow and shrink; in this case a ratio
based
on the maximum area size / model area size is computed and applied to the
model thickness in order to find the actual thickness. With maximum sizing
disabled, the actual thickness is the model thickness.
- Parameters:
gap - The model thickness for the gap between each tick.
setBetweenTicksAndLabelsGapExistence
abstract void setBetweenTicksAndLabelsGapExistence(boolean existence)
- The existence of a gap between the row of labels and the row of ticks. If
the gap does
not exist, then it will not be used in calculations.
- Parameters:
existence - The existence of a gap between the labels and ticks. If
true, then they do.
setBetweenTicksAndLabelsGapThicknessModel
abstract void setBetweenTicksAndLabelsGapThicknessModel(int gap)
- The model thickness for the gap between the row of labels and the row of
ticks. If auto maximum sizing
is enabled,
then the actual thickness size can grow and shrink; in this case a ratio
based
on the maximum area size / model area size is computed and applied to the
model thickness in order to find the actual thickness. With maximum sizing
disabled, the actual thickness is the model thickness. This thickness
is not used in calculations if either the ticks or labels do not exist.
- Parameters:
gap - The model thickness for the gap between the labels and ticks.
getLabels
abstract TextArea[] getLabels(java.awt.Graphics2D g2D)
- The labels of the axis. The lowest order array label is the top
most label.
- Parameters:
g2D - The graphics context to use for calculations.- Returns:
- The text labels; this will never be null.
getTicks
abstract java.awt.Rectangle[] getTicks(java.awt.Graphics2D g2D)
- The bounds of the ticks. The bounds of the ticks specify the locations
and sizes of each actual tick. The lowest order array tick is the left
most tick.
- Parameters:
g2D - The graphics context to use for calculations.- Returns:
- The bounds of the ticks. This will never be null.
getBetweenTicksGapThicknessModel
abstract int getBetweenTicksGapThicknessModel()
- Returns the model thickness of the gap between the ticks.
- Returns:
- The thickness.
getTicksColor
abstract java.awt.Color getTicksColor()
- Returns the color of the ticks.
- Returns:
- The color.
getTicksAlignment
abstract int getTicksAlignment()
- Returns how the ticks are aligned with respect to the labels.
- Returns:
- int With values of either Area.CENTERED or Area.BETWEEN