Package org.jfree.chart.title
Class CompositeTitle
java.lang.Object
org.jfree.chart.block.AbstractBlock
org.jfree.chart.title.Title
org.jfree.chart.title.CompositeTitle
- All Implemented Interfaces:
Serializable
,Cloneable
,Block
,Drawable
A title that contains multiple titles within a
BlockContainer
.- See Also:
-
Field Summary
Fields inherited from class org.jfree.chart.title.Title
DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_PADDING, DEFAULT_POSITION, DEFAULT_VERTICAL_ALIGNMENT, visible
-
Constructor Summary
ConstructorDescriptionCreates a new composite title with a default border arrangement.CompositeTitle
(BlockContainer container) Creates a new title using the specified container. -
Method Summary
Modifier and TypeMethodDescriptionarrange
(Graphics2D g2, RectangleConstraint constraint) Arranges the contents of the block, within the given constraints, and returns the block size.boolean
Ensures symmetry between super/subclass implementations of equals.void
draw
(Graphics2D g2, Rectangle2D area) Draws the title on a Java 2D graphics device (such as the screen or a printer).draw
(Graphics2D g2, Rectangle2D area, Object params) Draws the block within the specified area.boolean
Tests this title for equality with an arbitrary object.Returns the background paint.Returns the container holding the titles.int
hashCode()
Returns a hashcode for the title.void
setBackgroundPaint
(Paint paint) Sets the background paint and sends aTitleChangeEvent
to all registered listeners.void
setTitleContainer
(BlockContainer container) Sets the title container.Methods inherited from class org.jfree.chart.title.Title
addChangeListener, clone, getHorizontalAlignment, getNotify, getPosition, getVerticalAlignment, isVisible, notifyListeners, removeChangeListener, setHorizontalAlignment, setNotify, setPosition, setVerticalAlignment, setVisible
Methods inherited from class org.jfree.chart.block.AbstractBlock
arrange, calculateTotalHeight, calculateTotalWidth, drawBorder, getBounds, getContentXOffset, getContentYOffset, getFrame, getHeight, getID, getMargin, getPadding, getWidth, setBorder, setBounds, setFrame, setHeight, setID, setMargin, setMargin, setPadding, setPadding, setWidth, toContentConstraint, trimBorder, trimMargin, trimPadding, trimToContentHeight, trimToContentWidth
-
Constructor Details
-
CompositeTitle
public CompositeTitle()Creates a new composite title with a default border arrangement. -
CompositeTitle
Creates a new title using the specified container.- Parameters:
container
- the container (null
not permitted).
-
-
Method Details
-
getBackgroundPaint
Returns the background paint.- Returns:
- The paint (possibly
null
).
-
setBackgroundPaint
Sets the background paint and sends aTitleChangeEvent
to all registered listeners. If you set this attribute tonull
, no background is painted (which makes the title background transparent).- Parameters:
paint
- the background paint (null
permitted).
-
getContainer
Returns the container holding the titles.- Returns:
- The title container (never
null
).
-
setTitleContainer
Sets the title container.- Parameters:
container
- the container (null
not permitted).
-
arrange
Arranges the contents of the block, within the given constraints, and returns the block size.- Specified by:
arrange
in interfaceBlock
- Overrides:
arrange
in classAbstractBlock
- Parameters:
g2
- the graphics device.constraint
- the constraint (null
not permitted).- Returns:
- The block size (in Java2D units, never
null
).
-
draw
Draws the title on a Java 2D graphics device (such as the screen or a printer). -
draw
Draws the block within the specified area. -
equals
Tests this title for equality with an arbitrary object. -
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance. -
hashCode
Description copied from class:Title
Returns a hashcode for the title.
-