public class GridArrangement extends java.lang.Object implements Arrangement, java.io.Serializable
Constructor and Description |
---|
GridArrangement(int rows,
int columns)
Creates a new grid arrangement.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public GridArrangement(int rows, int columns)
rows
- the row count.columns
- the column count.public void add(Block block, java.lang.Object key)
add
in interface Arrangement
block
- the block.key
- the key (null
permitted).public org.jfree.ui.Size2D arrange(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
arrange
in interface Arrangement
container
- the container (null
not permitted).constraint
- the constraint.g2
- the graphics device.protected org.jfree.ui.Size2D arrangeNN(BlockContainer container, java.awt.Graphics2D g2)
container
- the container (null
not permitted).g2
- the graphics device.protected org.jfree.ui.Size2D arrangeFF(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container (null
not permitted).g2
- the graphics device.constraint
- the constraint (null
not permitted).protected org.jfree.ui.Size2D arrangeFR(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.constraint
- the constraint.g2
- the graphics device.protected org.jfree.ui.Size2D arrangeRF(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.constraint
- the constraint.g2
- the graphics device.protected org.jfree.ui.Size2D arrangeRN(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.constraint
- the constraint.g2
- the graphics device.protected org.jfree.ui.Size2D arrangeNR(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.constraint
- the constraint.g2
- the graphics device.protected org.jfree.ui.Size2D arrangeRR(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.constraint
- the constraint.g2
- the graphics device.protected org.jfree.ui.Size2D arrangeFN(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.g2
- the graphics device.constraint
- the constraint.protected org.jfree.ui.Size2D arrangeNF(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.g2
- the graphics device.constraint
- the constraint.public void clear()
clear
in interface Arrangement
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object.