org.jfree.chart.block
Class LabelBlock
- Block, Cloneable, Drawable, PublicCloneable, Serializable
implements Block, PublicCloneable
A block containing a label.
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.
|
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.
|
Font | getFont() - Returns the font.
|
Paint | getPaint() - Returns the paint.
|
String | getToolTipText() - Returns the tool tip text.
|
String | getURLText() - Returns the URL text.
|
void | setFont(Font font) - Sets the font and regenerates the label.
|
void | setPaint(Paint paint) - Sets the paint and regenerates the label.
|
void | setToolTipText(String text) - Sets the tool tip text.
|
void | setURLText(String text) - Sets the URL text.
|
arrange , arrange , calculateTotalHeight , calculateTotalWidth , clone , drawBorder , equals , getBorder , getBounds , getContentXOffset , getContentYOffset , getFrame , getHeight , getID , getMargin , getPadding , getWidth , setBorder , setBorder , setBounds , setFrame , setHeight , setID , setMargin , setMargin , setPadding , setPadding , setWidth , toContentConstraint , trimBorder , trimMargin , trimPadding , trimToContentHeight , trimToContentWidth |
DEFAULT_PAINT
public static final Paint DEFAULT_PAINT
The default color.
LabelBlock
public LabelBlock(String label)
Creates a new label block.
label
- the label (null
not permitted).
LabelBlock
public LabelBlock(String text,
Font font)
Creates a new label block.
text
- the text for the label (null
not permitted).font
- the font (null
not permitted).
LabelBlock
public LabelBlock(String text,
Font font,
Paint paint)
Creates a new label block.
text
- the text for the label (null
not permitted).font
- the font (null
not permitted).paint
- the paint (null
not permitted).
arrange
public Size2D arrange(Graphics2D g2,
RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and
returns the block size.
- arrange in interface Block
- arrange in interface AbstractBlock
g2
- the graphics device.constraint
- the constraint (null
not permitted).
- The block size (in Java2D units, never
null
).
clone
public Object clone()
throws CloneNotSupportedException
Returns a clone of this LabelBlock
instance.
- clone in interface AbstractBlock
draw
public void draw(Graphics2D g2,
Rectangle2D area)
Draws the block.
g2
- the graphics device.area
- the area.
draw
public Object draw(Graphics2D g2,
Rectangle2D area,
Object params)
Draws the block within the specified area.
- draw in interface Block
g2
- the graphics device.area
- the area.params
- ignored (null
permitted).
equals
public boolean equals(Object obj)
Tests this LabelBlock
for equality with an arbitrary
object.
- equals in interface AbstractBlock
obj
- the object (null
permitted).
getFont
public Font getFont()
Returns the font.
getPaint
public Paint getPaint()
Returns the paint.
getToolTipText
public String getToolTipText()
Returns the tool tip text.
- The tool tip text (possibly
null
).
getURLText
public String getURLText()
Returns the URL text.
- The URL text (possibly
null
).
setFont
public void setFont(Font font)
Sets the font and regenerates the label.
font
- the font (null
not permitted).
setPaint
public void setPaint(Paint paint)
Sets the paint and regenerates the label.
paint
- the paint (null
not permitted).
setToolTipText
public void setToolTipText(String text)
Sets the tool tip text.
text
- the text (null
permitted).
setURLText
public void setURLText(String text)
Sets the URL text.
text
- the text (null
permitted).