public interface

Block

org.jfree.chart.block.Block
Known Indirect Subclasses

Class Overview

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.

Summary

Public Methods
abstract Size2D arrange(Graphics2D g2, RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and returns the block size.
abstract Size2D arrange(Graphics2D g2)
Arranges the contents of the block, with no constraints, and returns the block size.
abstract Object draw(Graphics2D g2, Rectangle2D area, Object params)
Draws the block within the specified area.
abstract Rectangle2D getBounds()
Returns the current bounds of the block.
abstract String getID()
Returns an ID for the block.
abstract void setBounds(Rectangle2D bounds)
Sets the bounds of the block.
abstract void setID(String id)
Sets the ID for the block.

Public Methods

public abstract 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.
constraint the constraint (null not permitted).
Returns
  • The block size (in Java2D units, never null).

public abstract Size2D arrange (Graphics2D g2)

Arranges the contents of the block, with no constraints, and returns the block size.

Parameters
g2 the graphics device.
Returns
  • The size of the block.

public abstract Object draw (Graphics2D g2, Rectangle2D area, Object params)

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.
area the area.
params optional parameters (null permitted).
Returns
  • An optional return value (possibly null).

public abstract Rectangle2D getBounds ()

Returns the current bounds of the block.

Returns
  • The bounds.

public abstract String getID ()

Returns an ID for the block.

Returns
  • An ID.

public abstract void setBounds (Rectangle2D bounds)

Sets the bounds of the block.

Parameters
bounds the bounds.

public abstract void setID (String id)

Sets the ID for the block.

Parameters
id the ID.