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.
|
double
|
calculateTotalHeight(double contentHeight)
Adds the margin, border and padding to the specified content height.
|
double
|
calculateTotalWidth(double contentWidth)
Adds the margin, border and padding to the specified content width.
|
Object
|
clone()
Returns a clone of this block.
|
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()
This method is deprecated.
Use getFrame() instead.
|
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.
|
BlockFrame
|
getFrame()
Returns the current frame (border).
|
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(BlockBorder border)
|
void
|
setBorder(double top, double left, double bottom, double right)
Sets a black border with the specified line widths.
|
void
|
setBounds(Rectangle2D bounds)
Sets the bounds of the block.
|
void
|
setFrame(BlockFrame frame)
Sets the frame (or border).
|
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(double top, double left, double bottom, double right)
Sets the padding.
|
void
|
setPadding(RectangleInsets padding)
Sets the padding (use RectangleInsets#ZERO_INSETS for no
padding).
|
void
|
setWidth(double width)
Sets the natural width of the block, if this is known in advance.
|
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.
|
Rectangle2D
|
trimBorder(Rectangle2D area)
Reduces the specified area by the amount of space consumed
by the border.
|
Rectangle2D
|
trimMargin(Rectangle2D area)
Reduces the specified area by the amount of space consumed
by the margin.
|
Rectangle2D
|
trimPadding(Rectangle2D area)
Reduces the specified area by the amount of space consumed
by the padding.
|
double
|
trimToContentHeight(double fixedHeight)
Calculate the height available for content after subtracting
the margin, border and padding space from the specified fixed
height.
|
double
|
trimToContentWidth(double fixedWidth)
Calculate the width available for content after subtracting
the margin, border and padding space from the specified fixed
width.
|