public class

CompositeTitle

extends Title
implements Serializable Cloneable
java.lang.Object
   ↳ org.jfree.chart.block.AbstractBlock
     ↳ org.jfree.chart.title.Title
       ↳ org.jfree.chart.title.CompositeTitle

Class Overview

A title that contains multiple titles within a BlockContainer.

Summary

[Expand]
Inherited Fields
From class org.jfree.chart.title.Title
Public Constructors
CompositeTitle()
Creates a new composite title with a default border arrangement.
CompositeTitle(BlockContainer container)
Creates a new title using the specified container.
Public Methods
Size2D arrange(Graphics2D g2, RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and returns the block size.
Object draw(Graphics2D g2, Rectangle2D area, Object params)
Draws the block within the specified area.
void draw(Graphics2D g2, Rectangle2D area)
Draws the title on a Java 2D graphics device (such as the screen or a printer).
boolean equals(Object obj)
Tests this title for equality with an arbitrary object.
Paint getBackgroundPaint()
Returns the background paint.
BlockContainer getContainer()
Returns the container holding the titles.
void setBackgroundPaint(Paint paint)
Sets the background paint and sends a TitleChangeEvent to all registered listeners.
void setTitleContainer(BlockContainer container)
Sets the title container.
[Expand]
Inherited Methods
From class org.jfree.chart.title.Title
From class org.jfree.chart.block.AbstractBlock
From class java.lang.Object
From interface org.jfree.chart.block.Block

Public Constructors

public CompositeTitle ()

Creates a new composite title with a default border arrangement.

public CompositeTitle (BlockContainer container)

Creates a new title using the specified container.

Parameters
container the container (null not permitted).

Public Methods

public Size2D arrange (Graphics2D g2, RectangleConstraint constraint)

Arranges the contents of the block, within the given constraints, and returns the block size.

Parameters
g2 the graphics device.
constraint the constraint (null not permitted).
Returns
  • The block size (in Java2D units, never null).

public Object draw (Graphics2D g2, Rectangle2D area, Object params)

Draws the block within the specified area.

Parameters
g2 the graphics device.
area the area.
params ignored (null permitted).
Returns
  • Always null.

public void draw (Graphics2D g2, Rectangle2D area)

Draws the title on a Java 2D graphics device (such as the screen or a printer).

Parameters
g2 the graphics device.
area the area allocated for the title.

public boolean equals (Object obj)

Tests this title for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public Paint getBackgroundPaint ()

Returns the background paint.

Returns
  • The paint (possibly null).

public BlockContainer getContainer ()

Returns the container holding the titles.

Returns
  • The title container (never null).

public void setBackgroundPaint (Paint paint)

Sets the background paint and sends a TitleChangeEvent to all registered listeners. If you set this attribute to null, no background is painted (which makes the title background transparent).

Parameters
paint the background paint (null permitted).

public void setTitleContainer (BlockContainer container)

Sets the title container.

Parameters
container the container (null not permitted).