org.jfree.chart.axis

Class PeriodAxisLabelInfo

public class PeriodAxisLabelInfo extends Object implements Cloneable, Serializable

A record that contains information for one "band" of date labels in a PeriodAxis.
Field Summary
static PaintDEFAULT_DIVIDER_PAINT
The default divider paint.
static StrokeDEFAULT_DIVIDER_STROKE
The default divider stroke.
static FontDEFAULT_FONT
The default font.
static RectangleInsetsDEFAULT_INSETS
The default insets.
static PaintDEFAULT_LABEL_PAINT
The default label paint.
Constructor Summary
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
Objectclone()
Returns a clone of the object.
RegularTimePeriodcreateInstance(Date millisecond, TimeZone zone)
Creates a time period that includes the specified millisecond, assuming the given time zone.
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 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 of RegularTimePeriod that should be used to generate the date labels.
inthashCode()
Returns a hash code for this object.

Field Detail

DEFAULT_DIVIDER_PAINT

public static final Paint DEFAULT_DIVIDER_PAINT
The default divider paint.

DEFAULT_DIVIDER_STROKE

public static final Stroke DEFAULT_DIVIDER_STROKE
The default divider stroke.

DEFAULT_FONT

public static final Font DEFAULT_FONT
The default font.

DEFAULT_INSETS

public static final RectangleInsets DEFAULT_INSETS
The default insets.

DEFAULT_LABEL_PAINT

public static final Paint DEFAULT_LABEL_PAINT
The default label paint.

Constructor Detail

PeriodAxisLabelInfo

public PeriodAxisLabelInfo(Class periodClass, DateFormat dateFormat)
Creates a new instance.

Parameters: periodClass the subclass of RegularTimePeriod 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 of RegularTimePeriod 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 Detail

clone

public Object clone()
Returns a clone of the object.

Returns: A clone.

Throws: CloneNotSupportedException if cloning is not supported.

createInstance

public RegularTimePeriod createInstance(Date millisecond, TimeZone zone)

Deprecated: As of 1.0.13, use the method that specifies the locale also.

Creates a time period that includes the specified millisecond, assuming the given time zone.

Parameters: millisecond the time. zone the time zone.

Returns: The time period.

createInstance

public RegularTimePeriod createInstance(Date millisecond, TimeZone zone, Locale locale)
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.

Since: 1.0.13.

equals

public boolean equals(Object obj)
Tests this object for equality with an arbitrary object.

Parameters: obj the object to test against (null permitted).

Returns: A boolean.

getDateFormat

public DateFormat getDateFormat()
Returns the date formatter.

Returns: The date formatter (never null).

getDividerPaint

public Paint getDividerPaint()
Returns the paint used to draw the dividers.

Returns: The paint.

getDividerStroke

public Stroke getDividerStroke()
Returns the stroke used to draw the dividers.

Returns: The stroke.

getDrawDividers

public boolean getDrawDividers()
Returns a flag that controls whether or not dividers are drawn.

Returns: A flag.

getLabelFont

public Font getLabelFont()
Returns the label font.

Returns: The label font (never null).

getLabelPaint

public Paint getLabelPaint()
Returns the label paint.

Returns: The label paint.

getPadding

public RectangleInsets getPadding()
Returns the padding for the band.

Returns: The padding.

getPeriodClass

public Class getPeriodClass()
Returns the subclass of RegularTimePeriod that should be used to generate the date labels.

Returns: The class.

hashCode

public int hashCode()
Returns a hash code for this object.

Returns: A hash code.

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.