public class

GridArrangement

extends Object
implements Serializable Arrangement
java.lang.Object
   ↳ org.jfree.chart.block.GridArrangement

Class Overview

Arranges blocks in a grid within their container.

Summary

Public Constructors
GridArrangement(int rows, int columns)
Creates a new grid arrangement.
Public Methods
void add(Block block, Object key)
Adds a block and a key which can be used to determine the position of the block in the arrangement.
Size2D arrange(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arranges the blocks within the specified container, subject to the given constraint.
void clear()
Clears any cached layout information retained by the arrangement.
boolean equals(Object obj)
Compares this layout manager for equality with an arbitrary object.
Protected Methods
Size2D arrangeFF(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arranges the container with a fixed overall width and height.
Size2D arrangeFN(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arrange with a fixed width and a height within a given range.
Size2D arrangeFR(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arrange with a fixed width and a height within a given range.
Size2D arrangeNF(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arrange with a fixed height and no constraint for the width.
Size2D arrangeNN(BlockContainer container, Graphics2D g2)
Arranges the container with no constraint on the width or height.
Size2D arrangeNR(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arrange with a fixed height and no width constraint.
Size2D arrangeRF(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arrange with a fixed height and a width within a given range.
Size2D arrangeRN(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arrange with a fixed width and no height constraint.
Size2D arrangeRR(BlockContainer container, Graphics2D g2, RectangleConstraint constraint)
Arrange with ranges for both the width and height constraints.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.jfree.chart.block.Arrangement

Public Constructors

public GridArrangement (int rows, int columns)

Creates a new grid arrangement.

Parameters
rows the row count.
columns the column count.

Public Methods

public void add (Block block, Object key)

Adds a block and a key which can be used to determine the position of the block in the arrangement. This method is called by the container (you don't need to call this method directly) and gives the arrangement an opportunity to record the details if they are required.

Parameters
block the block.
key the key (null permitted).

public Size2D arrange (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arranges the blocks within the specified container, subject to the given constraint.

Parameters
container the container (null not permitted).
g2 the graphics device.
constraint the constraint.
Returns
  • The size following the arrangement.

public void clear ()

Clears any cached layout information retained by the arrangement.

public boolean equals (Object obj)

Compares this layout manager for equality with an arbitrary object.

Parameters
obj the object.
Returns
  • A boolean.

Protected Methods

protected Size2D arrangeFF (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arranges the container with a fixed overall width and height.

Parameters
container the container (null not permitted).
g2 the graphics device.
constraint the constraint (null not permitted).
Returns
  • The size following the arrangement.

protected Size2D arrangeFN (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arrange with a fixed width and a height within a given range.

Parameters
container the container.
g2 the graphics device.
constraint the constraint.
Returns
  • The size of the arrangement.

protected Size2D arrangeFR (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arrange with a fixed width and a height within a given range.

Parameters
container the container.
g2 the graphics device.
constraint the constraint.
Returns
  • The size of the arrangement.

protected Size2D arrangeNF (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arrange with a fixed height and no constraint for the width.

Parameters
container the container.
g2 the graphics device.
constraint the constraint.
Returns
  • The size of the arrangement.

protected Size2D arrangeNN (BlockContainer container, Graphics2D g2)

Arranges the container with no constraint on the width or height.

Parameters
container the container (null not permitted).
g2 the graphics device.
Returns
  • The size.

protected Size2D arrangeNR (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arrange with a fixed height and no width constraint.

Parameters
container the container.
g2 the graphics device.
constraint the constraint.
Returns
  • The size of the arrangement.

protected Size2D arrangeRF (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arrange with a fixed height and a width within a given range.

Parameters
container the container.
g2 the graphics device.
constraint the constraint.
Returns
  • The size of the arrangement.

protected Size2D arrangeRN (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arrange with a fixed width and no height constraint.

Parameters
container the container.
g2 the graphics device.
constraint the constraint.
Returns
  • The size of the arrangement.

protected Size2D arrangeRR (BlockContainer container, Graphics2D g2, RectangleConstraint constraint)

Arrange with ranges for both the width and height constraints.

Parameters
container the container.
g2 the graphics device.
constraint the constraint.
Returns
  • The size of the arrangement.