Size2D | arrange(Graphics2D g2)- Arranges the contents of the block, with no constraints, and returns
the block size.
|
Size2D | arrange(Graphics2D g2, RectangleConstraint constraint)- Arranges the contents of the block, within the given constraints, and
returns the block size.
|
protected double | calculateTotalHeight(double contentHeight)- Adds the margin, border and padding to the specified content height.
|
protected double | calculateTotalWidth(double contentWidth)- Adds the margin, border and padding to the specified content width.
|
protected void | drawBorder(Graphics2D g2, Rectangle2D area)- Draws the border around the perimeter of the specified area.
|
boolean | equals(Object obj)- Tests this block for equality with an arbitrary object.
|
BlockBorder | getBorder()- Returns the border.
|
Rectangle2D | getBounds()- Returns the current bounds of the block.
|
double | getContentXOffset()- Returns the x-offset for the content within the block.
|
double | getContentYOffset()- Returns the y-offset for the content within the block.
|
double | getHeight()- Returns the natural height of the block, if this is known in advance.
|
String | getID()- Returns the id.
|
RectangleInsets | getMargin()- Returns the margin.
|
RectangleInsets | getPadding()- Returns the padding.
|
double | getWidth()- Returns the natural width of the block, if this is known in advance.
|
void | setBorder(double top, double left, double bottom, double right)- Sets a black border with the specified line widths.
|
void | setBorder(BlockBorder border)- Sets the border for the block (use
BlockBorder.NONE for
no border).
|
void | setBounds(Rectangle2D bounds)- Sets the bounds of the block.
|
void | setHeight(double height)- Sets the natural width of the block, if this is known in advance.
|
void | setID(String id)- Sets the id for the block.
|
void | setMargin(RectangleInsets margin)- Sets the margin (use
RectangleInsets.ZERO_INSETS for no
padding).
|
void | setMargin(double top, double left, double bottom, double right)- Sets the margin.
|
void | setPadding(RectangleInsets padding)- Sets the padding (use
RectangleInsets.ZERO_INSETS for no
padding).
|
void | setPadding(double top, double left, double bottom, double right)- Sets the padding.
|
void | setWidth(double width)- Sets the natural width of the block, if this is known in advance.
|
protected RectangleConstraint | toContentConstraint(RectangleConstraint c)- Returns a constraint for the content of this block that will result in
the bounds of the block matching the specified constraint.
|
protected Rectangle2D | trimBorder(Rectangle2D area)- Reduces the specified area by the amount of space consumed
by the border.
|
protected Rectangle2D | trimMargin(Rectangle2D area)- Reduces the specified area by the amount of space consumed
by the margin.
|
protected Rectangle2D | trimPadding(Rectangle2D area)- Reduces the specified area by the amount of space consumed
by the padding.
|
protected double | trimToContentHeight(double fixedHeight)- Calculate the height available for content after subtracting
the margin, border and padding space from the specified fixed
height.
|
protected double | trimToContentWidth(double fixedWidth)- Calculate the width available for content after subtracting
the margin, border and padding space from the specified fixed
width.
|