org.jfree.chart.axis
Class PeriodAxisLabelInfo

java.lang.Object
  extended byorg.jfree.chart.axis.PeriodAxisLabelInfo
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class PeriodAxisLabelInfo
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

A record that contains information for one "band" of date labels in a PeriodAxis.

See Also:
Serialized Form

Constructor Summary
PeriodAxisLabelInfo(java.lang.Class periodClass, java.text.DateFormat dateFormat)
          Creates a new instance.
PeriodAxisLabelInfo(java.lang.Class periodClass, java.text.DateFormat dateFormat, RectangleInsets padding, java.awt.Font labelFont, java.awt.Paint labelPaint, boolean drawDividers, java.awt.Stroke dividerStroke, java.awt.Paint dividerPaint)
          Creates a new instance.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the object.
 RegularTimePeriod createInstance(java.util.Date millisecond, java.util.TimeZone zone)
          Creates a time period that includes the specified millisecond, assuming the given time zone.
 boolean equals(java.lang.Object obj)
          Tests this object for equality with an arbitrary object.
 java.text.DateFormat getDateFormat()
          Returns the date formatter.
 java.awt.Paint getDividerPaint()
          Returns the paint used to draw the dividers.
 java.awt.Stroke getDividerStroke()
          Returns the stroke used to draw the dividers.
 boolean getDrawDividers()
          Returns a flag that controls whether or not dividers are drawn.
 java.awt.Font getLabelFont()
          Returns the label font.
 java.awt.Paint getLabelPaint()
          Returns the label paint.
 RectangleInsets getPadding()
          Returns the padding for the band.
 java.lang.Class getPeriodClass()
          Returns the subclass of RegularTimePeriod that should be used to generate the date labels.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeriodAxisLabelInfo

public PeriodAxisLabelInfo(java.lang.Class periodClass,
                           java.text.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(java.lang.Class periodClass,
                           java.text.DateFormat dateFormat,
                           RectangleInsets padding,
                           java.awt.Font labelFont,
                           java.awt.Paint labelPaint,
                           boolean drawDividers,
                           java.awt.Stroke dividerStroke,
                           java.awt.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.
labelFont - the label font.
labelPaint - the label paint.
drawDividers - a flag that controls whether dividers are drawn.
dividerStroke - the stroke used to draw the dividers.
dividerPaint - the paint used to draw the dividers.
Method Detail

getPeriodClass

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

Returns:
The class.

getDateFormat

public java.text.DateFormat getDateFormat()
Returns the date formatter.

Returns:
The date formatter (never null).

getPadding

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

Returns:
The padding.

getLabelFont

public java.awt.Font getLabelFont()
Returns the label font.

Returns:
The label font (never null).

getLabelPaint

public java.awt.Paint 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

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

Returns:
The stroke.

getDividerPaint

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

Returns:
The paint.

createInstance

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

equals

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

Parameters:
obj - the object to test against (null permitted).
Returns:
A boolean.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the object.

Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if cloning is not supported.