public class HorizontalBlock extends AbstractBlock
Constructor and Description |
---|
HorizontalBlock(Block sourceBlock,
Block transitBlock,
Block targetBlock)
Creates a horizontal block from the three given blocks.
|
Modifier and Type | Method and Description |
---|---|
double |
getBottomHeight(LayoutParameters layoutParameters)
Returns the bottom height of the block.
|
java.lang.String |
getName() |
int |
getNofLayers() |
double |
getTopHeight(LayoutParameters layoutParameters)
Returns the top height of the block.
|
double |
getWidth(LayoutParameters layoutParameters)
Returns the width of the block.
|
void |
setPosition(double positionX,
double positionY,
boolean isLeftToRight,
LayoutParameters layoutParameters)
Sets the positions of the top-left corners of all contained element
blocks.
|
public HorizontalBlock(Block sourceBlock, Block transitBlock, Block targetBlock)
sourceBlock
- The source block. Has connections to the transit block.transitBlock
- The transit block. Has connections from the source block and
to the target block.targetBlock
- The target block. Has connections from the transit block.public double getTopHeight(LayoutParameters layoutParameters)
layoutParameters
- Parameters containing, among others, the vertical space
between two blocks.public double getBottomHeight(LayoutParameters layoutParameters)
layoutParameters
- Parameters containing, among others, the vertical space
between two blocks.public double getWidth(LayoutParameters layoutParameters)
layoutParameters
- Parameters containing, among others, the horizontal space
between two blocks.public void setPosition(double positionX, double positionY, boolean isLeftToRight, LayoutParameters layoutParameters)
positionX
- The X coordinate of the top-left corner.positionY
- The Y coordinate of the top-left corner.isLeftToRight
- Whether the contained blocks should be laid out from left to
right (or from right to left) in a horizontal block.layoutParameters
- Parameters containing, among others, the vertical and
horizontal spaces between element blocks.public int getNofLayers()
public java.lang.String getName()