aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2021-07-23 15:41:25 +0300
committerGitHub <noreply@github.com>2021-07-23 15:41:25 +0300
commit7f537988d31b22ee40fb0ee4b55e5b29708259d4 (patch)
tree789aca473df208fa5f16009a2f8ad1b5661dda51 /server
parent73a2f6e18b0eb2d46cf6ed92ea57ed5431340d40 (diff)
downloadvaadin-framework-7f537988d31b22ee40fb0ee4b55e5b29708259d4.tar.gz
vaadin-framework-7f537988d31b22ee40fb0ee4b55e5b29708259d4.zip
Checkstyle fixes (#12347)
- Added, completed, and corrected JavaDocs. - Added an assert to enforce a condition that has always been required. - Added default sections to switch blocks. - Added wildcards. - Deprecated unused methods and variables. - Removed inner assignments. - Removed unused private variables and calls that do nothing. - Updated deprecated calls to use currently recommended versions. - Updated warning suppressions. - ...and some auto-formatting.
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java22
-rw-r--r--server/src/main/java/com/vaadin/ui/TreeGrid.java8
2 files changed, 28 insertions, 2 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index 137f947401..0a13bab427 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -632,6 +632,14 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
return (AbstractGridExtensionState) super.getState(markAsDirty);
}
+ /**
+ * Returns the internal id for given column. This id should not be
+ * confused with the user-defined identifier.
+ *
+ * @param column
+ * the column
+ * @return internal id of given column
+ */
protected String getInternalIdForColumn(Column<T, ?> column) {
return getParent().getInternalIdForColumn(column);
}
@@ -2761,6 +2769,20 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
return beanType;
}
+ /**
+ * Sends a {@link ColumnVisibilityChangeEvent} to all listeners.
+ *
+ * @param <V>
+ * the column value type
+ * @param column
+ * the column that changed its visibility
+ * @param hidden
+ * {@code true} if the column was hidden, {@code false} if it
+ * became visible
+ * @param userOriginated
+ * {@code true} if the event was triggered by an UI interaction,
+ * {@code false} otherwise
+ */
public <V> void fireColumnVisibilityChangeEvent(Column<T, V> column,
boolean hidden, boolean userOriginated) {
fireEvent(new ColumnVisibilityChangeEvent(this, column, hidden,
diff --git a/server/src/main/java/com/vaadin/ui/TreeGrid.java b/server/src/main/java/com/vaadin/ui/TreeGrid.java
index 97200ab974..c94cd3a795 100644
--- a/server/src/main/java/com/vaadin/ui/TreeGrid.java
+++ b/server/src/main/java/com/vaadin/ui/TreeGrid.java
@@ -164,6 +164,8 @@ public class TreeGrid<T> extends Grid<T>
* @see TreeGrid#TreeGrid()
* @see TreeGrid#TreeGrid(Class)
*
+ * @param <BEAN>
+ * the tree grid bean type
* @param propertySet
* the property set implementation to use, not {@code null}
* @return a new tree grid using the provided property set, not {@code null}
@@ -202,7 +204,7 @@ public class TreeGrid<T> extends Grid<T>
/**
* This method is inherited from Grid but should never be called directly
- * with a TreeGrid
+ * with a TreeGrid.
*/
@Override
@Deprecated
@@ -212,7 +214,7 @@ public class TreeGrid<T> extends Grid<T>
/**
* This method is inherited from Grid but should never be called directly
- * with a TreeGrid
+ * with a TreeGrid.
*/
@Deprecated
@Override
@@ -344,6 +346,7 @@ public class TreeGrid<T> extends Grid<T>
* @param items
* the items to expand
*/
+ @SuppressWarnings("unchecked")
public void expand(T... items) {
expand(Arrays.asList(items));
}
@@ -434,6 +437,7 @@ public class TreeGrid<T> extends Grid<T>
* @param items
* the collection of items to collapse
*/
+ @SuppressWarnings("unchecked")
public void collapse(T... items) {
collapse(Arrays.asList(items));
}