Border
interface Border
A drawn border, around a Region.
Unlike JavaFX, Border is an interface with many implementations. NoBorder (the default) and PlainBorder are the simplest.
(x,y)
┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐ ▲ ▲
┊ the drawn region ┊ ┊ ┆ size.top
┊ ┏━━━━━━━━━┓ ┊ ┊ ▼
┊ ┃ Not ┃ ┊ ┊
┊ ┃ drawn ┃ ┊ ┊height
┊ ┃ ┃ ┊ ┊
┊ ┗━━━━━━━━━┛ ┊ ┊ ▲
┊ ┊ ┊ ┆ size.bottom
└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘ ▼ ▼
◀┄┄┄┄┄┄┄┄width┄┄┄┄┄┄▶
◀┄┄┄┄┄▶ ◀┄┄┄▶
size.left size.right
Content copied to clipboard
The dashed outer rectangle is the node's bounds. In general, Borders should only draw within the region between the two rectangles.
This diagram doesn't include a Node's padding, as this isn't relevant to its border.
A border is often the same width on all sides, but in this diagram, size.left
is larger than the other side(s). (For me, top and bottom appear the same as right, but may depend on the font being used).