Package org.jfree.chart.axis
Class PeriodAxisLabelInfo
java.lang.Object
org.jfree.chart.axis.PeriodAxisLabelInfo
- All Implemented Interfaces:
Serializable,Cloneable
public class PeriodAxisLabelInfo extends Object implements Cloneable, Serializable
A record that contains information for one "band" of date labels in
a
PeriodAxis.- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static PaintDEFAULT_DIVIDER_PAINTThe default divider paint.static StrokeDEFAULT_DIVIDER_STROKEThe default divider stroke.static FontDEFAULT_FONTThe default font.static RectangleInsetsDEFAULT_INSETSThe default insets.static PaintDEFAULT_LABEL_PAINTThe default label paint. -
Constructor Summary
Constructors Constructor Description PeriodAxisLabelInfo(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 Type Method Description Objectclone()Returns a clone of the object.RegularTimePeriodcreateInstance(Date millisecond, TimeZone zone, Locale locale)Creates a time period that includes the specified millisecond, assuming the given time zone.booleanequals(Object obj)Tests this object for equality with an arbitrary object.DateFormatgetDateFormat()Returns a copy of the date formatter.PaintgetDividerPaint()Returns the paint used to draw the dividers.StrokegetDividerStroke()Returns the stroke used to draw the dividers.booleangetDrawDividers()Returns a flag that controls whether or not dividers are drawn.FontgetLabelFont()Returns the label font.PaintgetLabelPaint()Returns the label paint.RectangleInsetsgetPadding()Returns the padding for the band.ClassgetPeriodClass()Returns the subclass ofRegularTimePeriodthat should be used to generate the date labels.inthashCode()Returns a hash code for this object.
-
Field Details
-
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.
-
-
Constructor Details
-
PeriodAxisLabelInfo
Creates a new instance.- Parameters:
periodClass- the subclass ofRegularTimePeriodto use (nullnot permitted).dateFormat- the date format (nullnot 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 ofRegularTimePeriodto use (nullnot permitted).dateFormat- the date format (nullnot permitted).padding- controls the space around the band (nullnot permitted).labelFont- the label font (nullnot permitted).labelPaint- the label paint (nullnot permitted).drawDividers- a flag that controls whether dividers are drawn.dividerStroke- the stroke used to draw the dividers (nullnot permitted).dividerPaint- the paint used to draw the dividers (nullnot permitted).
-
-
Method Details
-
getPeriodClass
Returns the subclass ofRegularTimePeriodthat 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
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
Returns a hash code for this object. -
clone
Returns a clone of the object.- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if cloning is not supported.
-