Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix javadoc #119

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,25 +315,28 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<quiet>true</quiet>
<doclint>none</doclint>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<quiet>true</quiet>
<doclint>none</doclint>
<failOnWarnings>false</failOnWarnings>
<links>
<link>https://javadoc.io/doc/com.vaadin/vaadin-platform-javadoc/${vaadin.version}</link>
</links>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,11 @@ public static <T> 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}.
*
* <p>If the value is <code>null</code>, the column cannot be hidden via the sidebar menu.
* <p>
* If the value is <code>null</code>, 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 <T> void setHidingToggleCaption(Column<T> column, String caption) {
getHelper(column.getGrid()).columnToggleHelper.setHidingToggleCaption(column, caption);
Expand Down Expand Up @@ -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}.
*
* <p>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.
* <p>
* 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}
Expand All @@ -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}.
*
* <p>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)}
* <p>
* 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"
Expand All @@ -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();
Expand All @@ -487,11 +491,13 @@ public static double getHeightByRows(Grid<?> grid) {
/**
* Defines the mode in which the Grid's height is calculated.
*
* <p>If {@link HeightMode#CSS} is given, Grid will respect the values given via a {@code
* <p>
* If {@link HeightMode#CSS} is given, Grid will respect the values given via a {@code
* setHeight}-method, and behave as a traditional Component.
*
* <p>If {@link HeightMode#ROW} is given, Grid will make sure that the body will display as many
* rows as {@link #getHeightByRows()} defines.
* <p>
* 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
*/
Expand All @@ -502,14 +508,15 @@ public static void setHeightMode(Grid<?> grid, HeightMode heightMode) {
/**
* Defines the mode in which the Grid's height is calculated.
*
* <p>If {@link HeightMode#CSS} is given, Grid will respect the CSS height as a traditional
* <p>
* If {@link HeightMode#CSS} is given, Grid will respect the CSS height as a traditional
* Component.
*
* <p>If {@link HeightMode#ROW} is given, Grid will make sure that the body will display as many
* rows as {@link #getHeightByRows()} defines.
* <p>
* 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();
Expand Down Expand Up @@ -542,7 +549,7 @@ public static <T> CheckboxColumn<T> addCheckboxColumn(Grid<T> grid,
* Toggles select all checkbox visibility in the grid's default header row for the selection
* column.
* <p>
* 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.
* <p>
* <i>Note: enabling the select all checkbox when grid uses a lazy data source could lead to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down
Loading