public class ElementBlock extends AbstractBlock
Constructor and Description |
---|
ElementBlock(java.lang.String name,
double height,
double width,
LayoutParameters layoutParameters)
Creates an element block with given size.
|
Modifier and Type | Method and Description |
---|---|
double |
getBottomHeight(LayoutParameters layoutParameters)
Returns the bottom height of this block.
|
EdgeBlock |
getEdgeBlock1() |
EdgeBlock |
getEdgeBlock2() |
java.lang.String |
getName() |
int |
getNofLayers() |
double |
getPositionX() |
double |
getPositionY() |
double |
getTopHeight(LayoutParameters layoutParameters)
Returns the top height of this block.
|
double |
getWidth(LayoutParameters layoutParameters)
Returns the width of this block.
|
void |
setEdgeBlocks(EdgeBlock edgeBlock1,
EdgeBlock edgeBlock2) |
void |
setPosition(double positionX,
double positionY,
boolean isLeftToRight,
LayoutParameters layoutParameters)
Sets the position of the top-left corner of this element block.
|
java.lang.String |
toString() |
public ElementBlock(java.lang.String name, double height, double width, LayoutParameters layoutParameters)
height
- Height of the block.width
- Width of the block.layoutParameters
- Irrelevant.public void setPosition(double positionX, double positionY, boolean isLeftToRight, LayoutParameters layoutParameters)
positionX
- The X coordinate of the top-left corner.positionX
- The Y coordinate of the top-left corner.isLeftToRight
- Irrelevant.layoutParameters
- Irrelevant.positionY
- The Y coordinate of the top-left corner of this block.public double getTopHeight(LayoutParameters layoutParameters)
Block
layoutParameters
- Parameters.public double getBottomHeight(LayoutParameters layoutParameters)
Block
layoutParameters
- Parameters.public double getWidth(LayoutParameters layoutParameters)
Block
layoutParameters
- Parameterspublic double getPositionX()
public double getPositionY()
public int getNofLayers()
public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public EdgeBlock getEdgeBlock1()
public EdgeBlock getEdgeBlock2()