From 1e527e39a9ef2f80f3f364fe91e823c111b58407 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:41:40 -0300 Subject: [PATCH 1/2] docs: fix javadoc warnings --- .../vaadin/addons/gridhelpers/GridHelper.java | 57 +++++++++++-------- .../vaadin/addons/gridhelpers/HeightMode.java | 4 +- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java index bd0dbc7..0cdc5fd 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java +++ b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java @@ -307,9 +307,11 @@ public static Registration addColumnToggleListener( * Sets the caption of the hiding toggle for this column. Shown in the toggle for this column in * the grid's sidebar when the column is {@linkplain #isHidable(Column) hidable}. * - *

If the value is null, the column cannot be hidden via the sidebar menu. + *

+ * If the value is null, the column cannot be hidden via the sidebar menu. * - * @param hidingToggleCaption the text to show in the column hiding toggle + * @param column the column for which the hiding toggle caption is set + * @param caption the text to show in the column hiding toggle */ public static void setHidingToggleCaption(Column column, String caption) { getHelper(column.getGrid()).columnToggleHelper.setHidingToggleCaption(column, caption); @@ -442,16 +444,17 @@ public static GridStylesHelper getFooterStyles(Grid grid, FooterCell cell) { private final HeightByRowsHelper heightByRowsHelper = new HeightByRowsHelper(this); /** - * Sets the number of rows that should be visible in Grid's body, while {@link #getHeightMode()} - * is {@link HeightMode#ROW}. + * Sets the number of rows that should be visible in Grid's body, while + * {@link #getHeightMode(Grid)} is {@link HeightMode#ROW}. * - *

The algorithm assumes that all data rows have the same height and considers headers, - * footers, and the horizontal scrollbar when the method is called. However, if data rows, - * headers, or footers are inserted or removed after the initial calculation, the grid may not - * automatically adjust the size of the grid to accommodate the changed number of rows. + *

+ * The algorithm assumes that all data rows have the same height and considers headers, footers, + * and the horizontal scrollbar when the method is called. However, if data rows, headers, or + * footers are inserted or removed after the initial calculation, the grid may not automatically + * adjust the size of the grid to accommodate the changed number of rows. * * @param rows The height in terms of number of rows displayed in Grid's body. If Grid doesn't - * contain enough rows, white space is displayed instead. + * contain enough rows, white space is displayed instead. * @throws IllegalArgumentException if {@code rows} is zero or less * @throws IllegalArgumentException if {@code rows} is {@link Double#isInfinite(double) infinite} * @throws IllegalArgumentException if {@code rows} is {@link Double#isNaN(double) NaN} @@ -461,11 +464,12 @@ public static void setHeightByRows(Grid grid, double rows) { } /** - * Sets the number of rows that should be visible in Grid's body, while {@link #getHeightMode()} - * is {@link HeightMode#ROW}. + * Sets the number of rows that should be visible in Grid's body, while + * {@link #getHeightMode(Grid)} is {@link HeightMode#ROW}. * - *

If Grid is currently not in {@link HeightMode#ROW}, the given value is remembered, and - * applied once the mode is applied. @See {@link #setHeightByRows(Grid, double)} + *

+ * If Grid is currently not in {@link HeightMode#ROW}, the given value is remembered, and applied + * once the mode is applied. @See {@link #setHeightByRows(Grid, double)} */ public static void setHeightByRows(Grid grid, int rows) { // this overload is a workaround for a lombok issue "bad type on operand stack" @@ -474,11 +478,11 @@ public static void setHeightByRows(Grid grid, int rows) { } /** - * Gets the amount of rows in Grid's body that are shown, while {@link #getHeightMode()} is {@link - * HeightMode#ROW}. + * Gets the amount of rows in Grid's body that are shown, while {@link #getHeightMode(Grid)} is + * {@link HeightMode#ROW}. * * @return the amount of rows that are being shown in Grid's body - * @see #setHeightByRows(double) + * @see #setHeightByRows(Grid, double) */ public static double getHeightByRows(Grid grid) { return getHelper(grid).heightByRowsHelper.getHeightByRows(); @@ -487,11 +491,13 @@ public static double getHeightByRows(Grid grid) { /** * Defines the mode in which the Grid's height is calculated. * - *

If {@link HeightMode#CSS} is given, Grid will respect the values given via a {@code + *

+ * If {@link HeightMode#CSS} is given, Grid will respect the values given via a {@code * setHeight}-method, and behave as a traditional Component. * - *

If {@link HeightMode#ROW} is given, Grid will make sure that the body will display as many - * rows as {@link #getHeightByRows()} defines. + *

+ * If {@link HeightMode#ROW} is given, Grid will make sure that the body will display as many rows + * as {@link #getHeightByRows(Grid)} defines. * * @param heightMode the mode in to which Grid should be set */ @@ -502,14 +508,15 @@ public static void setHeightMode(Grid grid, HeightMode heightMode) { /** * Defines the mode in which the Grid's height is calculated. * - *

If {@link HeightMode#CSS} is given, Grid will respect the CSS height as a traditional + *

+ * If {@link HeightMode#CSS} is given, Grid will respect the CSS height as a traditional * Component. * - *

If {@link HeightMode#ROW} is given, Grid will make sure that the body will display as many - * rows as {@link #getHeightByRows()} defines. + *

+ * If {@link HeightMode#ROW} is given, Grid will make sure that the body will display as many rows + * as {@link #getHeightByRows(Grid)} defines. * - * @param heightMode the mode in to which Grid should be set - * @return + * @return the mode in which the Grid is set */ public static HeightMode getHeightMode(Grid grid) { return getHelper(grid).heightByRowsHelper.getHeightMode(); @@ -542,7 +549,7 @@ public static CheckboxColumn addCheckboxColumn(Grid grid, * Toggles select all checkbox visibility in the grid's default header row for the selection * column. *

- * Only works when Grid uses {@link SelectionMode.MULTI} and the data provider supplies a count + * Only works when Grid uses {@link SelectionMode#MULTI} and the data provider supplies a count * callback. *

* Note: enabling the select all checkbox when grid uses a lazy data source could lead to diff --git a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/HeightMode.java b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/HeightMode.java index dde55dc..078b765 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/HeightMode.java +++ b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/HeightMode.java @@ -19,10 +19,12 @@ */ package com.flowingcode.vaadin.addons.gridhelpers; +import com.vaadin.flow.component.grid.Grid; + /** * The modes for height calculation that are supported {@link GridHelper}. * - * @see GridHelper#setHeightMode(HeightMode) + * @see GridHelper#setHeightMode(Grid, HeightMode) */ public enum HeightMode { /** From f0b86ed096ebd7c817e3be5f16c98e9e80a2685c Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:41:48 -0300 Subject: [PATCH 2/2] build: upgrade javadoc plugin to 3.11.1 --- pom.xml | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 8cdc6e9..59010d5 100644 --- a/pom.xml +++ b/pom.xml @@ -315,25 +315,28 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.1 - - - attach-javadocs - verify - - jar - - - - - true - none - -Xdoclint:none - - + + org.apache.maven.plugins + maven-javadoc-plugin + 3.11.1 + + + attach-javadocs + package + + jar + + + + + true + none + false + + https://javadoc.io/doc/com.vaadin/vaadin-platform-javadoc/${vaadin.version} + + + org.apache.maven.plugins maven-jar-plugin