BorderPane provides a callback to use for drawing a custom border around a content widget. You must specifiy non-zero insets to leave room to render your border.
TODO: Design imcomplete, this API might change.
Slots
- addSource
-
override This add(Widget? child)
Overrides fwt::Widget.add
If this the first widget added, then assume it the content.
- contentSource
-
Widget? content
The content child widget.
- insetsSource
-
Insets insets := ...
Insets to leave around the edge of the content.
- onBorderSource
-
|Graphics, Size, Insets|? onBorder := null
The callback to paint the custom border.
- onLayoutSource
-
override Void onLayout()
Overrides fwt::Widget.onLayout
Doc inherited from fwt::Widget.onLayout
Handle the layout event. The method is only called Pane containers. Custom panes must override this method to set the bounds on all their children.
- onPaintSource
-
override Void onPaint(Graphics g)
Overrides fwt::Widget.onPaint
Doc inherited from fwt::Widget.onPaint
This callback is invoked when the widget should be repainted. The graphics context is initialized at the widget's origin with the clip bounds set to the widget's size.
- prefSizeSource
-
override Size prefSize(Hints hints := Hints.def)
Overrides fwt::Pane.prefSize
Doc inherited from fwt::Pane.prefSize
Compute the preferred size of this widget. The hints indicate constraints the widget should consider in its calculations. If no constraints are known for width, then
hints.w
will be null. If no constraints are known for height, thenhints.h
will be null.