org.jfree.chart.block
public class LabelBlock extends AbstractBlock implements Block, PublicCloneable
Field Summary | |
---|---|
static Paint | DEFAULT_PAINT The default color. |
Constructor Summary | |
---|---|
LabelBlock(String label)
Creates a new label block.
| |
LabelBlock(String text, Font font)
Creates a new label block.
| |
LabelBlock(String text, Font font, Paint paint)
Creates a new label block.
|
Method Summary | |
---|---|
Size2D | arrange(Graphics2D g2, RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and
returns the block size.
|
Object | clone()
Returns a clone of this LabelBlock instance.
|
void | draw(Graphics2D g2, Rectangle2D area)
Draws the block.
|
Object | draw(Graphics2D g2, Rectangle2D area, Object params)
Draws the block within the specified area.
|
boolean | equals(Object obj)
Tests this LabelBlock for equality with an arbitrary
object.
|
TextBlockAnchor | getContentAlignmentPoint()
Returns the content alignment point.
|
Font | getFont()
Returns the font.
|
Paint | getPaint()
Returns the paint.
|
RectangleAnchor | getTextAnchor()
Returns the text anchor (never null ).
|
String | getToolTipText()
Returns the tool tip text.
|
String | getURLText()
Returns the URL text.
|
void | setContentAlignmentPoint(TextBlockAnchor anchor)
Sets the content alignment point.
|
void | setFont(Font font)
Sets the font and regenerates the label.
|
void | setPaint(Paint paint)
Sets the paint and regenerates the label.
|
void | setTextAnchor(RectangleAnchor anchor)
Sets the text anchor.
|
void | setToolTipText(String text)
Sets the tool tip text.
|
void | setURLText(String text)
Sets the URL text.
|
Parameters: label the label (null
not permitted).
Parameters: text the text for the label (null
not permitted). font the font (null
not permitted).
Parameters: text the text for the label (null
not permitted). font the font (null
not permitted). paint the paint (null
not permitted).
Parameters: g2 the graphics device. constraint the constraint (null
not permitted).
Returns: The block size (in Java2D units, never null
).
LabelBlock
instance.
Returns: A clone.
Throws: CloneNotSupportedException if there is a problem cloning.
Parameters: g2 the graphics device. area the area.
Parameters: g2 the graphics device. area the area. params ignored (null
permitted).
Returns: Always null
.
LabelBlock
for equality with an arbitrary
object.
Parameters: obj the object (null
permitted).
Returns: A boolean.
Returns: The content alignment point (never null
).
Since: 1.0.13
Returns: The font (never null
).
See Also: setFont
Returns: The paint (never null
).
See Also: setPaint
null
).
Returns: The text anchor.
Since: 1.0.13
Returns: The tool tip text (possibly null
).
See Also: setToolTipText
Returns: The URL text (possibly null
).
See Also: setURLText
Parameters: anchor the anchor used to determine the alignment point (never
null
).
Since: 1.0.13
Parameters: font the font (null
not permitted).
See Also: getFont
Parameters: paint the paint (null
not permitted).
See Also: getPaint
Parameters: anchor the anchor (null
not permitted).
Since: 1.0.13
Parameters: text the text (null
permitted).
See Also: getToolTipText
Parameters: text the text (null
permitted).
See Also: getURLText