Header
And More


org.jfree.chart.block
Class GridArrangement

java.lang.Object
  extended by org.jfree.chart.block.GridArrangement
All Implemented Interfaces:
java.io.Serializable, Arrangement

public class GridArrangement
extends java.lang.Object
implements Arrangement, java.io.Serializable

Arranges blocks in a grid within their container.

See Also:
Serialized Form

Constructor Summary
GridArrangement(int rows, int columns)
          Creates a new grid arrangement.
 
Method Summary
 void add(Block block, java.lang.Object key)
          Adds a block and a key which can be used to determine the position of the block in the arrangement.
 org.jfree.ui.Size2D arrange(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arranges the blocks within the specified container, subject to the given constraint.
protected  org.jfree.ui.Size2D arrangeFF(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arranges the container with a fixed overall width and height.
protected  org.jfree.ui.Size2D arrangeFN(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arrange with a fixed width and a height within a given range.
protected  org.jfree.ui.Size2D arrangeFR(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arrange with a fixed width and a height within a given range.
protected  org.jfree.ui.Size2D arrangeNF(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arrange with a fixed height and no constraint for the width.
protected  org.jfree.ui.Size2D arrangeNN(BlockContainer container, java.awt.Graphics2D g2)
          Arranges the container with no constraint on the width or height.
protected  org.jfree.ui.Size2D arrangeNR(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arrange with a fixed height and no width constraint.
protected  org.jfree.ui.Size2D arrangeRF(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arrange with a fixed height and a width within a given range.
protected  org.jfree.ui.Size2D arrangeRN(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arrange with a fixed width and no height constraint.
protected  org.jfree.ui.Size2D arrangeRR(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
          Arrange with ranges for both the width and height constraints.
 void clear()
          Clears any cached layout information retained by the arrangement.
 boolean equals(java.lang.Object obj)
          Compares this layout manager for equality with an arbitrary object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridArrangement

public GridArrangement(int rows,
                       int columns)
Creates a new grid arrangement.

Parameters:
rows - the row count.
columns - the column count.
Method Detail

add

public void add(Block block,
                java.lang.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.

Specified by:
add in interface Arrangement
Parameters:
block - the block.
key - the key (null permitted).

arrange

public org.jfree.ui.Size2D arrange(BlockContainer container,
                                   java.awt.Graphics2D g2,
                                   RectangleConstraint constraint)
Arranges the blocks within the specified container, subject to the given constraint.

Specified by:
arrange in interface Arrangement
Parameters:
container - the container (null not permitted).
constraint - the constraint.
g2 - the graphics device.
Returns:
The size following the arrangement.

arrangeNN

protected org.jfree.ui.Size2D arrangeNN(BlockContainer container,
                                        java.awt.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.

arrangeFF

protected org.jfree.ui.Size2D arrangeFF(BlockContainer container,
                                        java.awt.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.

arrangeFR

protected org.jfree.ui.Size2D arrangeFR(BlockContainer container,
                                        java.awt.Graphics2D g2,
                                        RectangleConstraint constraint)
Arrange with a fixed width and a height within a given range.

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

arrangeRF

protected org.jfree.ui.Size2D arrangeRF(BlockContainer container,
                                        java.awt.Graphics2D g2,
                                        RectangleConstraint constraint)
Arrange with a fixed height and a width within a given range.

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

arrangeRN

protected org.jfree.ui.Size2D arrangeRN(BlockContainer container,
                                        java.awt.Graphics2D g2,
                                        RectangleConstraint constraint)
Arrange with a fixed width and no height constraint.

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

arrangeNR

protected org.jfree.ui.Size2D arrangeNR(BlockContainer container,
                                        java.awt.Graphics2D g2,
                                        RectangleConstraint constraint)
Arrange with a fixed height and no width constraint.

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

arrangeRR

protected org.jfree.ui.Size2D arrangeRR(BlockContainer container,
                                        java.awt.Graphics2D g2,
                                        RectangleConstraint constraint)
Arrange with ranges for both the width and height constraints.

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

arrangeFN

protected org.jfree.ui.Size2D arrangeFN(BlockContainer container,
                                        java.awt.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.

arrangeNF

protected org.jfree.ui.Size2D arrangeNF(BlockContainer container,
                                        java.awt.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.

clear

public void clear()
Clears any cached layout information retained by the arrangement.

Specified by:
clear in interface Arrangement

equals

public boolean equals(java.lang.Object obj)
Compares this layout manager for equality with an arbitrary object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object.
Returns:
A boolean.

Footer
And More


Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.