Package org.jfree.chart.block
Class BorderArrangement
java.lang.Object
org.jfree.chart.block.BorderArrangement
- All Implemented Interfaces:
Serializable
,Arrangement
An arrangement manager that lays out blocks in a similar way to
Swing's BorderLayout class.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a block to the arrangement manager at the specified edge.arrange
(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) Arranges the items in the specified container, subject to the given constraint.protected Size2D
arrangeFF
(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) Arranges the items within a container.protected Size2D
arrangeFN
(BlockContainer container, Graphics2D g2, double width) Arranges the container width a fixed width and no constraint on the height.protected Size2D
arrangeFR
(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) Performs an arrangement with a fixed width and a range for the height.protected Size2D
arrangeNN
(BlockContainer container, Graphics2D g2) Performs an arrangement without constraints.protected Size2D
arrangeRR
(BlockContainer container, Range widthRange, Range heightRange, Graphics2D g2) Performs an arrangement with range constraints on both the vertical and horizontal sides.void
clear()
Clears the layout.boolean
Tests this arrangement for equality with an arbitrary object.int
hashCode()
-
Constructor Details
-
BorderArrangement
public BorderArrangement()Creates a new instance.
-
-
Method Details
-
add
Adds a block to the arrangement manager at the specified edge. If the key is not an instance ofRectangleEdge
the block will be added in the center.- Specified by:
add
in interfaceArrangement
- Parameters:
block
- the block (null
permitted).key
- the edge (an instance ofRectangleEdge
) ornull
for the center block.
-
arrange
Arranges the items in the specified container, subject to the given constraint.- Specified by:
arrange
in interfaceArrangement
- Parameters:
container
- the container.g2
- the graphics device.constraint
- the constraint.- Returns:
- The block size.
-
arrangeNN
Performs an arrangement without constraints.- Parameters:
container
- the container.g2
- the graphics device.- Returns:
- The container size after the arrangement.
-
arrangeFR
Performs an arrangement with a fixed width and a range for the height.- Parameters:
container
- the container.g2
- the graphics device.constraint
- the constraint.- Returns:
- The container size after the arrangement.
-
arrangeFN
Arranges the container width a fixed width and no constraint on the height.- Parameters:
container
- the container.g2
- the graphics device.width
- the fixed width.- Returns:
- The container size after arranging the contents.
-
arrangeRR
protected Size2D arrangeRR(BlockContainer container, Range widthRange, Range heightRange, Graphics2D g2) Performs an arrangement with range constraints on both the vertical and horizontal sides.- Parameters:
container
- the container.widthRange
- the allowable range for the container width.heightRange
- the allowable range for the container height.g2
- the graphics device.- Returns:
- The container size.
-
arrangeFF
Arranges the items within a container.- Parameters:
container
- the container.g2
- the graphics device.constraint
- the constraint.- Returns:
- The container size after the arrangement.
-
clear
Clears the layout.- Specified by:
clear
in interfaceArrangement
-
equals
Tests this arrangement for equality with an arbitrary object. -
hashCode
-