BorderLayoutBuilder
provides explicit methods for adding items to the respective layout position ( {@link #north(Object) north}, {@link #west(Object) west}, {@link #center(Object) center}, etc. Each method returns the BorderLayoutBuilder
itself, to allow for chained calls. The adding methods takes an Object
as input. The following types of objects are recognized by default:
java.awt.Component
s - The Component
is added directly to the layout, unless it implements Scrollable
in which case it is wrapped in a JScrollPane
first;org.jitterbit.ui.UiProvider
s;java.lang.String
s - The string is added as a JLabel
;javax.swing.Action
s - The action is added as a KongaButton
.javax.swing.Icon
s - The icon is added as a JLabel
.String
s are added;Action
s are added;Icon
s are added;Object
s of unknown types are added;Scrollable
Component
s are added. BorderLayoutBuilder
also implements the {@link UiCanvas} interface. When used as aUiCanvas
the displayed component is always added in the {@link #center(Object) center} position of the layout builder.
@author Torgil Zethson
@since 2.0.0
|
|