| org.jfree.chart.block.Block
All known Subclasses: org.jfree.chart.title.Title, org.jfree.chart.block.ColorBlock, org.jfree.chart.block.LabelBlock, org.jfree.chart.block.EmptyBlock, org.jfree.chart.block.BlockContainer, org.jfree.chart.title.LegendGraphic,
Block | public interface Block extends Drawable(Code) | | A block is an arbitrary item that can be drawn (in Java2D space) within a
rectangular area, has a preferred size, and can be arranged by an
Arrangement manager.
|
Method Summary | |
public Size2D | arrange(Graphics2D g2) Arranges the contents of the block, with no constraints, and returns
the block size.
Parameters: g2 - the graphics device. | 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. Parameters: constraint - the constraint (null not permitted). | public Object | draw(Graphics2D g2, Rectangle2D area, Object params) Draws the block within the specified area. | public Rectangle2D | getBounds() Returns the current bounds of the block. | public String | getID() Returns an ID for the block. | public void | setBounds(Rectangle2D bounds) Sets the bounds of the block. | public void | setID(String id) Sets the ID for the block. |
arrange | public Size2D arrange(Graphics2D g2)(Code) | | Arranges the contents of the block, with no constraints, and returns
the block size.
Parameters: g2 - the graphics device. The size of the block. |
arrange | public Size2D arrange(Graphics2D g2, RectangleConstraint constraint)(Code) | | Arranges the contents of the block, within the given constraints, and
returns the block size.
Parameters: g2 - the graphics device. Parameters: constraint - the constraint (null not permitted). The block size (in Java2D units, never null ). |
draw | public Object draw(Graphics2D g2, Rectangle2D area, Object params)(Code) | | Draws the block within the specified area. Refer to the documentation
for the implementing class for information about the params
and return value supported.
Parameters: g2 - the graphics device. Parameters: area - the area. Parameters: params - optional parameters (null permitted). An optional return value (possibly null ). |
getBounds | public Rectangle2D getBounds()(Code) | | Returns the current bounds of the block.
The bounds. |
getID | public String getID()(Code) | | Returns an ID for the block.
An ID. |
setBounds | public void setBounds(Rectangle2D bounds)(Code) | | Sets the bounds of the block.
Parameters: bounds - the bounds. |
setID | public void setID(String id)(Code) | | Sets the ID for the block.
Parameters: id - the ID. |
|
|