public class SymbolAxis extends NumberAxis implements Serializable
Modifier and Type | Field and Description |
---|---|
static Paint |
DEFAULT_GRID_BAND_ALTERNATE_PAINT
The default paint for alternate grid bands.
|
static Paint |
DEFAULT_GRID_BAND_PAINT
The default grid band paint.
|
DEFAULT_AUTO_RANGE_INCLUDES_ZERO, DEFAULT_AUTO_RANGE_STICKY_ZERO, DEFAULT_TICK_UNIT, DEFAULT_VERTICAL_TICK_LABELS
DEFAULT_AUTO_RANGE, DEFAULT_AUTO_RANGE_MINIMUM_SIZE, DEFAULT_AUTO_TICK_UNIT_SELECTION, DEFAULT_INVERTED, DEFAULT_LOWER_BOUND, DEFAULT_LOWER_MARGIN, DEFAULT_RANGE, DEFAULT_UPPER_BOUND, DEFAULT_UPPER_MARGIN, MAXIMUM_TICK_COUNT
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_AXIS_LINE_PAINT, DEFAULT_AXIS_LINE_STROKE, DEFAULT_AXIS_VISIBLE, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_LABELS_VISIBLE, DEFAULT_TICK_MARK_INSIDE_LENGTH, DEFAULT_TICK_MARK_OUTSIDE_LENGTH, DEFAULT_TICK_MARK_PAINT, DEFAULT_TICK_MARK_STROKE, DEFAULT_TICK_MARKS_VISIBLE
Constructor and Description |
---|
SymbolAxis(String label,
String[] sv)
Constructs a symbol axis, using default attribute values where
necessary.
|
Modifier and Type | Method and Description |
---|---|
AxisState |
draw(Graphics2D g2,
double cursor,
Rectangle2D plotArea,
Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge,
PlotRenderingInfo plotState)
Draws the axis on a Java 2D graphics device (such as the screen or a
printer).
|
boolean |
equals(Object obj)
Tests this axis for equality with an arbitrary object.
|
Paint |
getGridBandAlternatePaint()
Returns the paint used for alternate grid bands.
|
Paint |
getGridBandPaint()
Returns the paint used to color the grid bands.
|
String[] |
getSymbols()
Returns an array of the symbols for the axis.
|
boolean |
isGridBandsVisible()
Returns
true if the grid bands are showing, and
false otherwise. |
List |
refreshTicks(Graphics2D g2,
AxisState state,
Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge)
Calculates the positions of the tick labels for the axis, storing the
results in the tick label list (ready for drawing).
|
void |
setGridBandAlternatePaint(Paint paint)
Sets the paint used for alternate grid bands and sends a
AxisChangeEvent to all registered listeners. |
void |
setGridBandPaint(Paint paint)
Sets the grid band paint and sends an
AxisChangeEvent to
all registered listeners. |
void |
setGridBandsVisible(boolean flag)
Sets the visibility of the grid bands and notifies registered
listeners that the axis has been modified.
|
String |
valueToString(double value)
Converts a value to a string, using the list of symbols.
|
clone, configure, createIntegerTickUnits, createIntegerTickUnits, createStandardTickUnits, createStandardTickUnits, getAutoRangeIncludesZero, getAutoRangeStickyZero, getMarkerBand, getNumberFormatOverride, getRangeType, getTickUnit, hashCode, java2DToValue, setAutoRangeIncludesZero, setAutoRangeStickyZero, setMarkerBand, setNumberFormatOverride, setRangeType, setTickUnit, setTickUnit, valueToJava2D
centerRange, getAutoRangeMinimumSize, getDefaultAutoRange, getDownArrow, getFixedAutoRange, getLeftArrow, getLowerBound, getLowerMargin, getMinorTickCount, getRange, getRightArrow, getStandardTickUnits, getUpArrow, getUpperBound, getUpperMargin, isAutoRange, isAutoTickUnitSelection, isInverted, isNegativeArrowVisible, isPositiveArrowVisible, isVerticalTickLabels, lengthToJava2D, pan, reserveSpace, resizeRange, resizeRange, resizeRange2, setAutoRange, setAutoRangeMinimumSize, setAutoRangeMinimumSize, setAutoTickUnitSelection, setAutoTickUnitSelection, setDefaultAutoRange, setDownArrow, setFixedAutoRange, setInverted, setLeftArrow, setLowerBound, setLowerMargin, setMinorTickCount, setNegativeArrowVisible, setPositiveArrowVisible, setRange, setRange, setRange, setRangeAboutValue, setRangeWithMargins, setRangeWithMargins, setRangeWithMargins, setRightArrow, setStandardTickUnits, setUpArrow, setUpperBound, setUpperMargin, setVerticalTickLabels, zoomRange
addChangeListener, createAttributedLabel, getAttributedLabel, getAxisLinePaint, getAxisLineStroke, getFixedDimension, getLabel, getLabelAngle, getLabelFont, getLabelInsets, getLabelLocation, getLabelPaint, getMinorTickMarkInsideLength, getMinorTickMarkOutsideLength, getPlot, getTickLabelFont, getTickLabelInsets, getTickLabelPaint, getTickMarkInsideLength, getTickMarkOutsideLength, getTickMarkPaint, getTickMarkStroke, hasListener, isAxisLineVisible, isMinorTickMarksVisible, isTickLabelsVisible, isTickMarksVisible, isVisible, removeChangeListener, setAttributedLabel, setAttributedLabel, setAxisLinePaint, setAxisLineStroke, setAxisLineVisible, setFixedDimension, setLabel, setLabelAngle, setLabelFont, setLabelInsets, setLabelInsets, setLabelLocation, setLabelPaint, setMinorTickMarkInsideLength, setMinorTickMarkOutsideLength, setMinorTickMarksVisible, setPlot, setTickLabelFont, setTickLabelInsets, setTickLabelPaint, setTickLabelsVisible, setTickMarkInsideLength, setTickMarkOutsideLength, setTickMarkPaint, setTickMarkStroke, setTickMarksVisible, setVisible
public static final Paint DEFAULT_GRID_BAND_PAINT
public static final Paint DEFAULT_GRID_BAND_ALTERNATE_PAINT
public String[] getSymbols()
public boolean isGridBandsVisible()
true
if the grid bands are showing, and
false
otherwise.true
if the grid bands are showing, and
false
otherwise.setGridBandsVisible(boolean)
public void setGridBandsVisible(boolean flag)
flag
- the new setting.isGridBandsVisible()
public Paint getGridBandPaint()
null
).setGridBandPaint(Paint)
,
isGridBandsVisible()
public void setGridBandPaint(Paint paint)
AxisChangeEvent
to
all registered listeners.paint
- the paint (null
not permitted).getGridBandPaint()
public Paint getGridBandAlternatePaint()
null
).setGridBandAlternatePaint(Paint)
,
getGridBandPaint()
public void setGridBandAlternatePaint(Paint paint)
AxisChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getGridBandAlternatePaint()
,
setGridBandPaint(Paint)
public AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea, Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge, PlotRenderingInfo plotState)
draw
in class NumberAxis
g2
- the graphics device (null
not permitted).cursor
- the cursor location.plotArea
- the area within which the plot and axes should be drawn
(null
not permitted).dataArea
- the area within which the data should be drawn
(null
not permitted).edge
- the axis location (null
not permitted).plotState
- collects information about the plot
(null
permitted).null
).public List refreshTicks(Graphics2D g2, AxisState state, Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge)
refreshTicks
in class NumberAxis
g2
- the graphics device.state
- the axis state.dataArea
- the area in which the data should be drawn.edge
- the location of the axis.public String valueToString(double value)
value
- value to convert.public boolean equals(Object obj)
equals
in class NumberAxis
obj
- the object (null
permitted).Jas4pp 1.5 © Java Analysis Studio for Particle Physics