java.lang.Object | |
↳ | org.jfree.chart.block.AbstractBlock |
![]() |
![]() |
A convenience class for creating new classes that implement
the Block
interface.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new block.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Arranges the contents of the block, with no constraints, and returns
the block size.
| |||||||||||
Arranges the contents of the block, within the given constraints, and
returns the block size.
| |||||||||||
Returns a clone of this block.
| |||||||||||
Tests this block for equality with an arbitrary object.
| |||||||||||
This method is deprecated.
Use
getFrame() instead.
| |||||||||||
Returns the current bounds of the block.
| |||||||||||
Returns the x-offset for the content within the block.
| |||||||||||
Returns the y-offset for the content within the block.
| |||||||||||
Returns the current frame (border).
| |||||||||||
Returns the natural height of the block, if this is known in advance.
| |||||||||||
Returns the id.
| |||||||||||
Returns the margin.
| |||||||||||
Returns the padding.
| |||||||||||
Returns the natural width of the block, if this is known in advance.
| |||||||||||
This method is deprecated.
Use
setFrame(BlockFrame) instead.
| |||||||||||
Sets a black border with the specified line widths.
| |||||||||||
Sets the bounds of the block.
| |||||||||||
Sets the frame (or border).
| |||||||||||
Sets the natural width of the block, if this is known in advance.
| |||||||||||
Sets the id for the block.
| |||||||||||
Sets the margin (use RectangleInsets#ZERO_INSETS for no
padding).
| |||||||||||
Sets the margin.
| |||||||||||
Sets the padding.
| |||||||||||
Sets the padding (use RectangleInsets#ZERO_INSETS for no
padding).
| |||||||||||
Sets the natural width of the block, if this is known in advance.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds the margin, border and padding to the specified content height.
| |||||||||||
Adds the margin, border and padding to the specified content width.
| |||||||||||
Draws the border around the perimeter of the specified area.
| |||||||||||
Returns a constraint for the content of this block that will result in
the bounds of the block matching the specified constraint.
| |||||||||||
Reduces the specified area by the amount of space consumed
by the border.
| |||||||||||
Reduces the specified area by the amount of space consumed
by the margin.
| |||||||||||
Reduces the specified area by the amount of space consumed
by the padding.
| |||||||||||
Calculate the height available for content after subtracting
the margin, border and padding space from the specified fixed
height.
| |||||||||||
Calculate the width available for content after subtracting
the margin, border and padding space from the specified fixed
width.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a new block.
Arranges the contents of the block, with no constraints, and returns the block size.
g2 | the graphics device. |
---|
null
).
Arranges the contents of the block, within the given constraints, and returns the block size.
g2 | the graphics device. |
---|---|
constraint | the constraint (null not permitted). |
null
).
Returns a clone of this block.
CloneNotSupportedException | if there is a problem creating the clone. |
---|
Tests this block for equality with an arbitrary object.
obj | the object (null permitted). |
---|
This method is deprecated.
Use getFrame()
instead.
Returns the border.
null
).Returns the x-offset for the content within the block.
Returns the y-offset for the content within the block.
Returns the natural height of the block, if this is known in advance. The actual height of the block may be overridden if layout constraints make this necessary.
Returns the natural width of the block, if this is known in advance. The actual width of the block may be overridden if layout constraints make this necessary.
This method is deprecated.
Use setFrame(BlockFrame)
instead.
Sets the border for the block (use NONE
for
no border).
border | the border (null not permitted). |
---|
Sets a black border with the specified line widths.
top | the top border line width. |
---|---|
left | the left border line width. |
bottom | the bottom border line width. |
right | the right border line width. |
Sets the bounds of the block.
bounds | the bounds (null not permitted). |
---|
Sets the natural width of the block, if this is known in advance.
height | the width (in Java2D units) |
---|
Sets the margin (use RectangleInsets#ZERO_INSETS for no padding).
margin | the margin (null not permitted). |
---|
Sets the margin.
top | the top margin. |
---|---|
left | the left margin. |
bottom | the bottom margin. |
right | the right margin. |
Sets the padding.
top | the top padding. |
---|---|
left | the left padding. |
bottom | the bottom padding. |
right | the right padding. |
Sets the padding (use RectangleInsets#ZERO_INSETS for no padding).
padding | the padding (null not permitted). |
---|
Sets the natural width of the block, if this is known in advance.
width | the width (in Java2D units) |
---|
Adds the margin, border and padding to the specified content height.
contentHeight | the content height. |
---|
Adds the margin, border and padding to the specified content width.
contentWidth | the content width. |
---|
Draws the border around the perimeter of the specified area.
g2 | the graphics device. |
---|---|
area | the area. |
Returns a constraint for the content of this block that will result in the bounds of the block matching the specified constraint.
c | the outer constraint (null not permitted). |
---|
Reduces the specified area by the amount of space consumed by the border.
area | the area (null not permitted). |
---|
Reduces the specified area by the amount of space consumed by the margin.
area | the area (null not permitted). |
---|
Reduces the specified area by the amount of space consumed by the padding.
area | the area (null not permitted). |
---|
Calculate the height available for content after subtracting the margin, border and padding space from the specified fixed height.
fixedHeight | the fixed height. |
---|
Calculate the width available for content after subtracting the margin, border and padding space from the specified fixed width.
fixedWidth | the fixed width. |
---|