@@ -225,8 +225,6 @@ public void mousePressed(MouseEvent e) {
225225 final Font editorFont = ScaleUtil .scaleFont (Config .currentFonts ().editor .value ());
226226 final Font italEditorFont = ScaleUtil .scaleFont (Config .currentFonts ().editor .value ().deriveFont (Font .ITALIC ));
227227
228- final FlexGridConstraints .Absolute constraints = FlexGridConstraints .createAbsolute ();
229-
230228 {
231229 final Box parentLabelRow = Box .createHorizontalBox ();
232230
@@ -242,47 +240,42 @@ public void mousePressed(MouseEvent e) {
242240 parentLabelRow .add (this .parentLabelOf (target , editorFont , stopInteraction ));
243241
244242 parentLabelRow .setBorder (createEmptyBorder (ROW_OUTER_INSET , ROW_OUTER_INSET , ROW_INNER_INSET , ROW_OUTER_INSET ));
245- this .add (parentLabelRow , constraints . copy ().alignCenterLeft ());
243+ this .add (parentLabelRow , FlexGridConstraints . createRelative ().alignCenterLeft ());
246244 }
247245
248246 final String javadoc = this .getJavadoc (target ).orElse (null );
249247 final ImmutableList <ParamJavadoc > paramJavadocs =
250248 this .paramJavadocsOf (target , editorFont , italEditorFont , stopInteraction );
251249 if (javadoc != null || !paramJavadocs .isEmpty ()) {
252- this .add (new JSeparator (), constraints . nextRow ().copy ().fillX ());
250+ this .add (new JSeparator (), FlexGridConstraints . createRelative (). newRow ().copy ().fillX ());
253251
254252 final var javadocs = new JPanel (new FlexGridLayout ());
255- final FlexGridConstraints .Absolute javadocsConstraints = FlexGridConstraints .createAbsolute ();
256253
257254 if (javadoc != null ) {
258255 final JTextArea javadocText = javadocOf (javadoc , italEditorFont , stopInteraction );
259256 javadocText .setBorder (createEmptyBorder (ROW_INNER_INSET , ROW_OUTER_INSET , ROW_INNER_INSET , ROW_OUTER_INSET ));
260- javadocs .add (javadocText , javadocsConstraints . copy ().fillX ());
257+ javadocs .add (javadocText , FlexGridConstraints . createRelative ().fillX ());
261258 }
262259
263260 if (!paramJavadocs .isEmpty ()) {
264261 final JPanel params = new JPanel (new FlexGridLayout ());
265262
266- final FlexGridConstraints .Absolute paramsConstraints = FlexGridConstraints .createAbsolute ();
267-
268263 for (final ParamJavadoc paramJavadoc : paramJavadocs ) {
269- params .add (paramJavadoc .name , paramsConstraints . copy ().alignTopRight ());
264+ params .add (paramJavadoc .name , FlexGridConstraints . createRelative (). newRow ().alignTopRight ());
270265
271- params .add (paramJavadoc .javadoc , paramsConstraints . nextColumn (). copy ()
266+ params .add (paramJavadoc .javadoc , FlexGridConstraints . createRelative ()
272267 .fillX ()
273268 .alignTopLeft ()
274269 );
275-
276- paramsConstraints .nextRow ();
277270 }
278271
279272 params .setBorder (createEmptyBorder (ROW_INNER_INSET , ROW_OUTER_INSET , ROW_INNER_INSET , ROW_OUTER_INSET ));
280- javadocs .add (params , javadocsConstraints . nextRow ().copy ().fillX ());
273+ javadocs .add (params , FlexGridConstraints . createRelative ().newRow ().fillX ());
281274 }
282275
283276 final JScrollPane javadocsScroll = new SmartScrollPane (javadocs );
284277 javadocsScroll .setBorder (createEmptyBorder ());
285- this .add (javadocsScroll , constraints . nextRow ().copy ().fillX ());
278+ this .add (javadocsScroll , FlexGridConstraints . createRelative ().newRow ().fillX ());
286279 }
287280
288281 if (this .declarationSnippet != null ) {
@@ -354,17 +347,17 @@ public void mouseClicked(MouseEvent e) {
354347 this .declarationSnippet .editor .addMouseListener (stopInteraction );
355348 }
356349
357- this .add (this .declarationSnippet .ui , constraints . nextRow ().copy ()
350+ this .add (this .declarationSnippet .ui , FlexGridConstraints . createRelative ().newRow ()
358351 .fillX ()
359352 .alignCenterLeft ()
360353 .incrementPriority ()
361354 );
362355 } else {
363- this .add (new JSeparator (), constraints . nextRow ().copy ().fillX ());
356+ this .add (new JSeparator (), FlexGridConstraints . createRelative ().newRow ().fillX ());
364357
365358 final JLabel noSource = labelOf (I18n .translate ("editor.tooltip.message.no_source" ), italEditorFont );
366359 noSource .setBorder (createEmptyBorder (ROW_INNER_INSET , ROW_OUTER_INSET , ROW_INNER_INSET , ROW_OUTER_INSET ));
367- this .add (noSource , constraints . nextRow ().copy ().fillX ());
360+ this .add (noSource , FlexGridConstraints . createRelative ().newRow ().fillX ());
368361 }
369362 }
370363
0 commit comments