public class StandardCategoryAxis3D extends AbstractAxis3D implements CategoryAxis3D, java.io.Serializable
DEFAULT_LABEL_COLOR, DEFAULT_LABEL_FONT, DEFAULT_LABEL_OFFSET, DEFAULT_LINE_COLOR, DEFAULT_LINE_STROKE, DEFAULT_TICK_LABEL_COLOR, DEFAULT_TICK_LABEL_FONT| Constructor and Description |
|---|
StandardCategoryAxis3D()
Default constructor.
|
StandardCategoryAxis3D(java.lang.String label)
Creates a new axis with the specified label.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
axisStr()
Returns "row" if the axis has been configured as a row axis, "column" if
the axis has been configured as a column axis, and the empty string ("")
if the axis has not yet been configured.
|
void |
configureAsColumnAxis(CategoryPlot3D plot)
Configures the axis to be used as a column axis for the specified
plot.
|
void |
configureAsRowAxis(CategoryPlot3D plot)
Configures the axis to be used as a row axis for the specified
plot.
|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Point2D pt0,
java.awt.geom.Point2D pt1,
java.awt.geom.Point2D opposingPt,
java.util.List<TickData> tickData,
RenderingInfo info,
boolean hinting)
Draws the axis between the two points
pt0 and pt1 in
Java2D space. |
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
java.util.List<MarkerData> |
generateMarkerData()
Generates and returns a list of marker data items for the axis.
|
java.util.List<TickData> |
generateTickDataForColumns(CategoryDataset3D dataset)
Generates the tick data for the axis (assumes the axis is being used
as the row axis).
|
java.util.List<TickData> |
generateTickDataForRows(CategoryDataset3D dataset)
Generates the tick data for the axis (assumes the axis is being used
as the row axis).
|
double |
getCategoryValue(java.lang.Comparable<?> category)
Returns the value for the specified category, or
Double.NaN
if the category is not registered on the axis. |
double |
getCategoryWidth()
Returns the width of a single category in the units of the axis
range.
|
double |
getLowerMargin()
Returns the margin to leave at the lower end of the axis, as a
percentage of the axis length.
|
CategoryMarker |
getMarker(java.lang.String key)
Returns the marker with the specified key, if there is one.
|
java.util.Map<java.lang.String,CategoryMarker> |
getMarkers()
Returns a new map containing the markers that are assigned to this axis.
|
int |
getMaxTickLabelLevels()
Returns the maximum number of offset levels for the category labels on
the axis.
|
Range |
getRange()
Returns the range for the axis.
|
double |
getTickLabelFactor()
Returns the tick label factor.
|
CategoryLabelGenerator |
getTickLabelGenerator()
Returns the tick label generator for the axis.
|
double |
getTickLabelOffset()
Returns the offset between the tick marks and the tick labels.
|
LabelOrientation |
getTickLabelOrientation()
Returns the orientation for the tick labels.
|
double |
getTickMarkLength()
Returns the tick mark length (in Java2D units).
|
java.awt.Paint |
getTickMarkPaint()
Returns the paint used to draw the tick marks, if they are visible.
|
java.awt.Stroke |
getTickMarkStroke()
Returns the stroke used to draw the tick marks, if they are visible.
|
double |
getUpperMargin()
Returns the margin to leave at the upper end of the axis, as a
percentage of the axis length.
|
boolean |
isColumnAxis()
Returns
true if this axis has been configured as a
column axis for the plot that it belongs to, and false
otherwise. |
boolean |
isFirstCategoryHalfWidth()
Returns
true if the first category on the axis should
occupy half the normal width, and false otherwise. |
boolean |
isInverted()
Returns
true if the axis inverts the order of the data items,
and false otherwise. |
boolean |
isLastCategoryHalfWidth()
Returns
true if the last category on the axis should
occupy half the normal width, and false otherwise. |
boolean |
isRowAxis()
Returns
true if this axis has been configured as a
row axis for the plot that it belongs to, and false
otherwise. |
void |
receive(ChartElementVisitor visitor)
Receives a
ChartElementVisitor. |
void |
setFirstCategoryHalfWidth(boolean half)
Sets the flag that controls whether the first category on the axis
occupies a full or half width, and sends an
Axis3DChangeEvent
to all registered listeners. |
void |
setInverted(boolean inverted)
Sets the flag that controls whether or not the axis inverts the order
of the data items and sends an
Axis3DChangeEvent to all
registered listeners. |
void |
setLastCategoryHalfWidth(boolean half)
Sets the flag that controls whether the last category on the axis
occupies a full or half width, and sends an
Axis3DChangeEvent
to all registered listeners. |
void |
setLowerMargin(double margin)
Sets the margin to leave at the lower end of the axis and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setMarker(java.lang.String key,
CategoryMarker marker)
Sets the marker for the specified key and sends a change event to
all registered listeners.
|
void |
setMaxTickLabelLevels(int levels)
Sets the maximum number of offset levels for the category labels on the
axis and sends a change event to all registered listeners.
|
void |
setRange(double lowerBound,
double upperBound)
Sets the range for the axis and sends an
Axis3DChangeEvent to
all registered listeners. |
void |
setRange(Range range)
Sets the range for the axis and sends an
Axis3DChangeEvent to
all registered listeners. |
void |
setTickLabelFactor(double factor)
Sets the tick label factor and sends a change event to all registered
listeners.
|
void |
setTickLabelGenerator(CategoryLabelGenerator generator)
Sets the tick label generator for the axis and sends a change event to
all registered listeners.
|
void |
setTickLabelOffset(double offset)
Sets the offset between the tick marks and the tick labels and sends
a
Axis3DChangeEvent to all registered listeners. |
void |
setTickLabelOrientation(LabelOrientation orientation)
Sets the orientation for the tick labels and sends a change event to
all registered listeners.
|
void |
setTickMarkLength(double length)
Sets the tick mark length (in Java2D units) and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setTickMarkPaint(java.awt.Paint paint)
Sets the paint used to draw the tick marks and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setTickMarkStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the tick marks and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setUpperMargin(double margin)
Sets the margin to leave at the upper end of the axis and sends an
Axis3DChangeEvent to all registered listeners. |
double |
translateToWorld(double value,
double length)
Translates a value on the axis to the equivalent coordinate in the
3D world used to construct a model of the chart.
|
addChangeListener, drawAxisLabel, fireChangeEvent, getLabel, getLabelColor, getLabelFont, getLabelOffset, getLineColor, getLineStroke, getTickLabelColor, getTickLabelFont, getTickLabelsVisible, hashCode, isVisible, markerChanged, notifyListeners, removeChangeListener, setLabel, setLabelColor, setLabelFont, setLabelOffset, setLineColor, setLineStroke, setTickLabelColor, setTickLabelFont, setTickLabelsVisible, setVisibleclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddChangeListener, getLabelColor, getLabelFont, getTickLabelColor, getTickLabelFont, isVisible, removeChangeListener, setLabelColor, setLabelFont, setTickLabelColor, setTickLabelFont, setVisiblepublic StandardCategoryAxis3D()
public StandardCategoryAxis3D(java.lang.String label)
label - the axis label (null permitted).public boolean isRowAxis()
true if this axis has been configured as a
row axis for the plot that it belongs to, and false
otherwise.isRowAxis in interface CategoryAxis3Dpublic boolean isColumnAxis()
true if this axis has been configured as a
column axis for the plot that it belongs to, and false
otherwise.isColumnAxis in interface CategoryAxis3Dpublic Range getRange()
public void setRange(double lowerBound, double upperBound)
Axis3DChangeEvent to
all registered listeners.public void setRange(Range range)
Axis3DChangeEvent to
all registered listeners. Note that changing the range for the
category axis will have no visible effect.public double getLowerMargin()
0.05 (five
percent).public void setLowerMargin(double margin)
Axis3DChangeEvent to all registered listeners.margin - the margin.public double getUpperMargin()
0.05 (five
percent).public void setUpperMargin(double margin)
Axis3DChangeEvent to all registered listeners.margin - the margin.public boolean isFirstCategoryHalfWidth()
true if the first category on the axis should
occupy half the normal width, and false otherwise.setFirstCategoryHalfWidth(boolean)public void setFirstCategoryHalfWidth(boolean half)
Axis3DChangeEvent
to all registered listeners. There are some renderers where the
charts look better when half-widths are used (for example,
AreaRenderer3D).half - half width?setLastCategoryHalfWidth(boolean)public boolean isLastCategoryHalfWidth()
true if the last category on the axis should
occupy half the normal width, and false otherwise.setLastCategoryHalfWidth(boolean)public void setLastCategoryHalfWidth(boolean half)
Axis3DChangeEvent
to all registered listeners. There are some renderers where the
charts look better when half-widths are used (for example,
AreaRenderer3D).half - half width?setFirstCategoryHalfWidth(boolean)public double getTickMarkLength()
3.0.public void setTickMarkLength(double length)
Axis3DChangeEvent to all registered listeners. You can set
the length to 0.0 if you don't want any tick marks on the
axis.length - the length (in Java2D units).public java.awt.Paint getTickMarkPaint()
Color.GRAY.null).public void setTickMarkPaint(java.awt.Paint paint)
Axis3DChangeEvent to all registered listeners.paint - the paint (null not permitted).public java.awt.Stroke getTickMarkStroke()
new BasicStroke(0.5f).null).public void setTickMarkStroke(java.awt.Stroke stroke)
Axis3DChangeEvent to all registered listeners.stroke - the stroke (null not permitted).public CategoryLabelGenerator getTickLabelGenerator()
null).public void setTickLabelGenerator(CategoryLabelGenerator generator)
generator - the generator (null not permitted).public double getTickLabelOffset()
5.0.public void setTickLabelOffset(double offset)
Axis3DChangeEvent to all registered listeners.offset - the offset.public LabelOrientation getTickLabelOrientation()
LabelOrientation.PARALLEL.null).public void setTickLabelOrientation(LabelOrientation orientation)
orientation - the orientation (null not permitted).public int getMaxTickLabelLevels()
public void setMaxTickLabelLevels(int levels)
levels - the maximum number of levels.public double getTickLabelFactor()
1.4.public void setTickLabelFactor(double factor)
factor - the new factor (should be at least 1.0).public CategoryMarker getMarker(java.lang.String key)
getMarker in interface CategoryAxis3Dkey - the key (null not permitted).null).public void setMarker(java.lang.String key, CategoryMarker marker)
key - the key that identifies the marker (null not
permitted).marker - the marker (null permitted).public java.util.Map<java.lang.String,CategoryMarker> getMarkers()
public double getCategoryWidth()
getCategoryWidth in interface CategoryAxis3Dpublic void configureAsRowAxis(CategoryPlot3D plot)
configureAsRowAxis in interface CategoryAxis3Dplot - the plot (null not permitted).public void configureAsColumnAxis(CategoryPlot3D plot)
configureAsColumnAxis in interface CategoryAxis3Dplot - the plot (null not permitted).public double getCategoryValue(java.lang.Comparable<?> category)
Double.NaN
if the category is not registered on the axis.getCategoryValue in interface CategoryAxis3Dcategory - the category (null not permitted).public double translateToWorld(double value, double length)
translateToWorld in interface Axis3Dvalue - the value along the axis.length - the length of one side of the 3D box containing the model.public void draw(java.awt.Graphics2D g2, java.awt.geom.Point2D pt0, java.awt.geom.Point2D pt1, java.awt.geom.Point2D opposingPt, java.util.List<TickData> tickData, RenderingInfo info, boolean hinting)
pt0 and pt1 in
Java2D space.draw in interface Axis3Ddraw in class AbstractAxis3Dg2 - the graphics target (null not permitted).pt0 - the starting point for the axis (null not
permitted).pt1 - the ending point for the axis (null not
permitted).opposingPt - a point on the opposite side of the line from the
labels (null not permitted).tickData - the tick data, contains positioning anchors calculated
by the 3D engine (null not permitted).info - an object to be populated with rendering info
(null permitted).hinting - perform element hinting?protected java.lang.String axisStr()
axisStr in class AbstractAxis3Dnull).public java.util.List<TickData> generateTickDataForRows(CategoryDataset3D dataset)
generateTickDataForRows in interface CategoryAxis3Ddataset - the dataset (null not permitted).public java.util.List<TickData> generateTickDataForColumns(CategoryDataset3D dataset)
generateTickDataForColumns in interface CategoryAxis3Ddataset - the dataset (null not permitted).public java.util.List<MarkerData> generateMarkerData()
generateMarkerData in interface CategoryAxis3Dnull).public void receive(ChartElementVisitor visitor)
ChartElementVisitor. This method is part of a general
mechanism for traversing the chart structure and performing operations
on each element in the chart. You will not normally call this method
directly.receive in interface ChartElementreceive in class AbstractAxis3Dvisitor - the visitor (null not permitted).public boolean equals(java.lang.Object obj)
equals in class AbstractAxis3Dobj - the object to test against (null not permitted).public boolean isInverted()
true if the axis inverts the order of the data items,
and false otherwise.isInverted in interface Axis3Dpublic void setInverted(boolean inverted)
Axis3DChangeEvent to all
registered listeners.setInverted in interface Axis3Dinverted - the new flag value.