Package swingtree.api

Interface Layout

All Known Implementing Classes:
Layout.BorderLayoutInstaller, Layout.ForBoxLayout, Layout.ForFlowLayout, Layout.ForGridLayout, Layout.ForMigLayout, Layout.None, Layout.Unspecific

@Immutable public interface Layout
An abstract representation of an immutable layout configuration for a specific component, for which layout manager specific implementations can be instantiated through various factory methods like border(), flow(), grid(int, int)... and then supplied to the style API through ComponentStyleDelegate.layout(Layout) so that the layout can then be installed onto a component dynamically.

The various layout types hold necessary information and implementation logic required for installing the layout onto a component through the installFor(JComponent) method, which will be used by the style engine of SwingTree every time the layout object state changes compared to the previous state effectively making the layout mechanics of a component fully dynamic.

You may implement this interface to create custom layout configurations for other kinds of LayoutManager implementations.

This interface also contains various implementations for supporting the most common types of LayoutManagers.

See Also: