public class CenterArrangement extends java.lang.Object implements Arrangement, java.io.Serializable
Constructor and Description |
---|
CenterArrangement()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Block block,
java.lang.Object key)
Adds a block to be managed by this instance.
|
org.jfree.ui.Size2D |
arrange(BlockContainer container,
java.awt.Graphics2D g2,
RectangleConstraint constraint)
Calculates and sets the bounds of all the items in the specified
container, subject to the given constraint.
|
protected org.jfree.ui.Size2D |
arrangeFF(BlockContainer container,
java.awt.Graphics2D g2,
RectangleConstraint constraint)
Arranges the blocks in the container with the overall height and width
specified as fixed constraints.
|
protected org.jfree.ui.Size2D |
arrangeFN(BlockContainer container,
java.awt.Graphics2D g2,
RectangleConstraint constraint)
Arranges the blocks in the container with a fixed width and no height
constraint.
|
protected org.jfree.ui.Size2D |
arrangeFR(BlockContainer container,
java.awt.Graphics2D g2,
RectangleConstraint constraint)
Arranges the blocks in the container with a fixed with and a range
constraint on the height.
|
protected org.jfree.ui.Size2D |
arrangeNF(BlockContainer container,
java.awt.Graphics2D g2,
RectangleConstraint constraint)
Arranges the blocks with no width constraint and a fixed height
constraint.
|
protected org.jfree.ui.Size2D |
arrangeNN(BlockContainer container,
java.awt.Graphics2D g2)
Arranges the blocks without any constraints.
|
protected org.jfree.ui.Size2D |
arrangeRF(BlockContainer container,
java.awt.Graphics2D g2,
RectangleConstraint constraint)
Arranges the blocks in the container with a range constraint on the
width and a fixed height.
|
protected org.jfree.ui.Size2D |
arrangeRN(BlockContainer container,
java.awt.Graphics2D g2,
RectangleConstraint constraint)
Arranges the block with a range constraint on the width, and no
constraint on the height.
|
protected org.jfree.ui.Size2D |
arrangeRR(BlockContainer container,
java.awt.Graphics2D g2,
RectangleConstraint constraint)
Arranges the blocks with the overall width and height to fit within
specified ranges.
|
void |
clear()
Clears any cached information.
|
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
public CenterArrangement()
public void add(Block block, java.lang.Object key)
BlockContainer
, you shouldn't need to call it
directly.add
in interface Arrangement
block
- the block.key
- a key that controls the position of the block.public org.jfree.ui.Size2D arrange(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
Graphics2D
can be used by some items (particularly items containing text) to
calculate sizing parameters.arrange
in interface Arrangement
container
- the container whose items are being arranged.g2
- the graphics device.constraint
- the size constraint.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 arrangeFR(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.g2
- the graphics device.constraint
- the constraint.protected org.jfree.ui.Size2D arrangeFF(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.g2
- the graphics device.constraint
- the constraint.protected org.jfree.ui.Size2D arrangeRR(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.g2
- the graphics device.constraint
- the constraint.protected org.jfree.ui.Size2D arrangeRF(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.g2
- the graphics device.constraint
- the constraint.protected org.jfree.ui.Size2D arrangeRN(BlockContainer container, java.awt.Graphics2D g2, RectangleConstraint constraint)
container
- the container.g2
- the graphics device.constraint
- the constraint.protected org.jfree.ui.Size2D arrangeNN(BlockContainer container, java.awt.Graphics2D g2)
container
- the container.g2
- the graphics device.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 (null
permitted).