Class LayoutStyle
LayoutStyle (D_grouplayout). Required for the import-swap:
NetBeans GUI-builder code references javax.swing.LayoutStyle.ComponentPlacement
inside GroupLayout gap calls, which swaps to
vaadinx.swing.LayoutStyle.ComponentPlacement — so this class must
exist for such code to compile.
Only the LayoutStyle.ComponentPlacement enum is load-bearing.
GroupLayout consumes it directly (mapping RELATED /
UNRELATED to fixed pixel gaps in addPreferredGap), so it does
not go through getPreferredGap(JComponent, JComponent, LayoutStyle.ComponentPlacement, int, Container)/getContainerGap(JComponent, int, Container) dispatch. The
gap-computation methods are provided for API completeness and return R_layouts_close_enough
defaults via EHelper.onUnimplemented(String, String, Object...) — no migrated code we
target calls them (NetBeans emits the enum, not the LayoutStyle instance).
Kept concrete (JDK's is abstract) so getInstance() returns a
usable object without a separate default subclass; non-final to preserve the
JDK's extensible shape per R_swing_is_truth.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPort ofjavax.swing.LayoutStyle.ComponentPlacement. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetContainerGap(JComponent component, int position, Container parent) Preferred gap between a component and the container edge.static LayoutStyleintgetPreferredGap(JComponent component1, JComponent component2, LayoutStyle.ComponentPlacement type, int position, Container parent) Preferred gap between two components.static voidsetInstance(LayoutStyle style)
-
Constructor Details
-
LayoutStyle
public LayoutStyle()
-
-
Method Details
-
getInstance
-
setInstance
-
getPreferredGap
public int getPreferredGap(JComponent component1, JComponent component2, LayoutStyle.ComponentPlacement type, int position, Container parent) Preferred gap between two components. Not on the migrated-code path (NetBeans handsLayoutStyle.ComponentPlacementtoGroupLayoutdirectly); returnsGroupLayout's RELATED default (6px) as a sensible R_layouts_close_enough answer. -
getContainerGap
Preferred gap between a component and the container edge. R_layouts_close_enough default (10px).
-