Package org.jfree.chart.block
Class ColumnArrangement
java.lang.Object
org.jfree.chart.block.ColumnArrangement
- All Implemented Interfaces:
Serializable,Arrangement
Arranges blocks in a column layout. This class is immutable.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HorizontalAlignmentThe horizontal alignment of blocks.private doubleThe horizontal gap between columns.private static final longFor serialization.private VerticalAlignmentThe vertical alignment of blocks within each row.private doubleThe vertical gap between items in a column. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance.ColumnArrangement(HorizontalAlignment hAlign, VerticalAlignment vAlign, double hGap, double vGap) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a block to be managed by this instance.arrange(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) Calculates and sets the bounds of all the items in the specified container, subject to the given constraint.protected Size2DarrangeFF(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) Calculates and sets the bounds of all the items in the specified container, subject to the given constraint.protected Size2DarrangeNF(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) Calculates and sets the bounds of all the items in the specified container, subject to the given constraint.protected Size2DarrangeNN(BlockContainer container, Graphics2D g2) Arranges the blocks without any constraints.protected Size2DarrangeRF(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) Arranges the blocks in the container using a fixed height and a range for the width.protected Size2DarrangeRR(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) Arranges a container with range constraints for both the horizontal and vertical.voidclear()Clears any cached information.booleanTests this instance for equality with an arbitrary object.inthashCode()
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
horizontalAlignment
The horizontal alignment of blocks. -
verticalAlignment
The vertical alignment of blocks within each row. -
horizontalGap
private double horizontalGapThe horizontal gap between columns. -
verticalGap
private double verticalGapThe vertical gap between items in a column.
-
-
Constructor Details
-
ColumnArrangement
public ColumnArrangement()Creates a new instance. -
ColumnArrangement
public ColumnArrangement(HorizontalAlignment hAlign, VerticalAlignment vAlign, double hGap, double vGap) Creates a new instance.- Parameters:
hAlign- the horizontal alignment (currently ignored).vAlign- the vertical alignment (currently ignored).hGap- the horizontal gap.vGap- the vertical gap.
-
-
Method Details
-
add
Adds a block to be managed by this instance. This method is usually called by theBlockContainer, you shouldn't need to call it directly.- Specified by:
addin interfaceArrangement- Parameters:
block- the block.key- a key that controls the position of the block.
-
arrange
Calculates and sets the bounds of all the items in the specified container, subject to the given constraint. TheGraphics2Dcan be used by some items (particularly items containing text) to calculate sizing parameters.- Specified by:
arrangein interfaceArrangement- Parameters:
container- the container whose items are being arranged.g2- the graphics device.constraint- the size constraint.- Returns:
- The size of the container after arrangement of the contents.
-
arrangeFF
Calculates and sets the bounds of all the items in the specified container, subject to the given constraint. TheGraphics2Dcan be used by some items (particularly items containing text) to calculate sizing parameters.- Parameters:
container- the container whose items are being arranged.g2- the graphics device.constraint- the size constraint.- Returns:
- The container size after the arrangement.
-
arrangeNF
Calculates and sets the bounds of all the items in the specified container, subject to the given constraint. TheGraphics2Dcan be used by some items (particularly items containing text) to calculate sizing parameters.- Parameters:
container- the container whose items are being arranged.g2- the graphics device.constraint- the size constraint.- Returns:
- The container size after the arrangement.
-
arrangeRR
Arranges a container with range constraints for both the horizontal and vertical.- Parameters:
container- the container.g2- the graphics device.constraint- the constraint.- Returns:
- The size of the container.
-
arrangeRF
Arranges the blocks in the container using a fixed height and a range for the width.- Parameters:
container- the container.g2- the graphics device.constraint- the constraint.- Returns:
- The size of the container after arrangement.
-
arrangeNN
Arranges the blocks without any constraints. This puts all blocks into a single column.- Parameters:
container- the container.g2- the graphics device.- Returns:
- The size after the arrangement.
-
clear
public void clear()Clears any cached information.- Specified by:
clearin interfaceArrangement
-
equals
Tests this instance for equality with an arbitrary object. -
hashCode
public int hashCode()
-