Package org.jfree.chart.axis
Class PeriodAxisLabelInfo
java.lang.Object
org.jfree.chart.axis.PeriodAxisLabelInfo
- All Implemented Interfaces:
Serializable
,Cloneable
A record that contains information for one "band" of date labels in
a
PeriodAxis
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DateFormat
The date formatter.static final Paint
The default divider paint.static final Stroke
The default divider stroke.static final Font
The default font.static final RectangleInsets
The default insets.static final Paint
The default label paint.private Paint
The paint used to draw the dividers.private Stroke
The stroke used to draw the dividers.private boolean
A flag that controls whether or not dividers are visible.private Font
The label font.private Paint
The label paint.private RectangleInsets
Controls the gaps around the band.private Class
The subclass ofRegularTimePeriod
to use for this band.private static final long
For serialization. -
Constructor Summary
ConstructorsConstructorDescriptionPeriodAxisLabelInfo
(Class periodClass, DateFormat dateFormat) Creates a new instance.PeriodAxisLabelInfo
(Class periodClass, DateFormat dateFormat, RectangleInsets padding, Font labelFont, Paint labelPaint, boolean drawDividers, Stroke dividerStroke, Paint dividerPaint) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a clone of the object.createInstance
(Date millisecond, TimeZone zone, Locale locale) Creates a time period that includes the specified millisecond, assuming the given time zone.boolean
Tests this object for equality with an arbitrary object.Returns a copy of the date formatter.Returns the paint used to draw the dividers.Returns the stroke used to draw the dividers.boolean
Returns a flag that controls whether or not dividers are drawn.Returns the label font.Returns the label paint.Returns the padding for the band.Returns the subclass ofRegularTimePeriod
that should be used to generate the date labels.int
hashCode()
Returns a hash code for this object.private void
readObject
(ObjectInputStream stream) Provides serialization support.private void
writeObject
(ObjectOutputStream stream) Provides serialization support.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
DEFAULT_INSETS
The default insets. -
DEFAULT_FONT
The default font. -
DEFAULT_LABEL_PAINT
The default label paint. -
DEFAULT_DIVIDER_STROKE
The default divider stroke. -
DEFAULT_DIVIDER_PAINT
The default divider paint. -
periodClass
The subclass ofRegularTimePeriod
to use for this band. -
padding
Controls the gaps around the band. -
dateFormat
The date formatter. -
labelFont
The label font. -
labelPaint
The label paint. -
drawDividers
private boolean drawDividersA flag that controls whether or not dividers are visible. -
dividerStroke
The stroke used to draw the dividers. -
dividerPaint
The paint used to draw the dividers.
-
-
Constructor Details
-
PeriodAxisLabelInfo
Creates a new instance.- Parameters:
periodClass
- the subclass ofRegularTimePeriod
to use (null
not permitted).dateFormat
- the date format (null
not permitted).
-
PeriodAxisLabelInfo
public PeriodAxisLabelInfo(Class periodClass, DateFormat dateFormat, RectangleInsets padding, Font labelFont, Paint labelPaint, boolean drawDividers, Stroke dividerStroke, Paint dividerPaint) Creates a new instance.- Parameters:
periodClass
- the subclass ofRegularTimePeriod
to use (null
not permitted).dateFormat
- the date format (null
not permitted).padding
- controls the space around the band (null
not permitted).labelFont
- the label font (null
not permitted).labelPaint
- the label paint (null
not permitted).drawDividers
- a flag that controls whether dividers are drawn.dividerStroke
- the stroke used to draw the dividers (null
not permitted).dividerPaint
- the paint used to draw the dividers (null
not permitted).
-
-
Method Details
-
getPeriodClass
Returns the subclass ofRegularTimePeriod
that should be used to generate the date labels.- Returns:
- The class.
-
getDateFormat
Returns a copy of the date formatter.- Returns:
- A copy of the date formatter (never
null
).
-
getPadding
Returns the padding for the band.- Returns:
- The padding.
-
getLabelFont
Returns the label font.- Returns:
- The label font (never
null
).
-
getLabelPaint
Returns the label paint.- Returns:
- The label paint.
-
getDrawDividers
public boolean getDrawDividers()Returns a flag that controls whether or not dividers are drawn.- Returns:
- A flag.
-
getDividerStroke
Returns the stroke used to draw the dividers.- Returns:
- The stroke.
-
getDividerPaint
Returns the paint used to draw the dividers.- Returns:
- The paint.
-
createInstance
Creates a time period that includes the specified millisecond, assuming the given time zone.- Parameters:
millisecond
- the time.zone
- the time zone.locale
- the locale.- Returns:
- The time period.
-
equals
Tests this object for equality with an arbitrary object. -
hashCode
public int hashCode()Returns a hash code for this object. -
clone
Returns a clone of the object.- Overrides:
clone
in classObject
- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if cloning is not supported.
-
writeObject
Provides serialization support.- Parameters:
stream
- the output stream.- Throws:
IOException
- if there is an I/O error.
-
readObject
Provides serialization support.- Parameters:
stream
- the input stream.- Throws:
IOException
- if there is an I/O error.ClassNotFoundException
- if there is a classpath problem.
-