aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2018-01-12 13:49:45 +0200
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-01-12 13:49:45 +0200
commitc905ac6adf1aeb3ff4f3b15ae6e5344a7ea3d490 (patch)
tree9e562e950a8fd9860422165ad84bb77e9558d4be
parentb45f30685df11bccbb9c42ae8415bc9b28673166 (diff)
downloadvaadin-framework-c905ac6adf1aeb3ff4f3b15ae6e5344a7ea3d490.tar.gz
vaadin-framework-c905ac6adf1aeb3ff4f3b15ae6e5344a7ea3d490.zip
Rename widgetEventsAllowed to handleWidgetEvents (#10529)
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java8
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java18
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java16
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridComponents.java2
5 files changed, 22 insertions, 24 deletions
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
index 20b624892c..5d66489ed1 100644
--- a/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java
@@ -39,7 +39,7 @@ import elemental.json.JsonValue;
public class ColumnConnector extends AbstractExtensionConnector {
public abstract static class CustomColumn
- extends Column<Object, JsonObject> {
+ extends Column<Object, JsonObject> {
private final String connectorId;
private ContentMode tooltipContentMode;
@@ -195,9 +195,9 @@ public class ColumnConnector extends AbstractExtensionConnector {
column.setTooltipContentMode(getState().tooltipContentMode);
}
- @OnStateChange("widgetEventsAllowed")
- void updateWidgetEventsAllowed() {
- column.setWidgetEventsAllowed(getState().widgetEventsAllowed);
+ @OnStateChange("handleWidgetEvents")
+ void updateHandleWidgetEvents() {
+ column.setHandleWidgetEvents(getState().handleWidgetEvents);
}
@Override
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java
index 9e186ba64d..f0b309bae7 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -2339,7 +2339,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
if (cell != null) {
Column<?, ?> column = grid
.getVisibleColumn(cell.getColumn());
- if (column == null || !column.isWidgetEventsAllowed()) {
+ if (column == null || !column.isHandleWidgetEvents()) {
return;
}
}
@@ -2463,7 +2463,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
Column<?, ?> column = grid
.getVisibleColumn(cell.getColumn());
handleWidgetEvent = column != null
- && column.isWidgetEventsAllowed();
+ && column.isHandleWidgetEvents();
}
}
@@ -4762,7 +4762,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
private String hidingToggleCaption = null;
- private boolean widgetEventsAllowed = false;
+ private boolean handleWidgetEvents = false;
private double minimumWidthPx = GridConstants.DEFAULT_MIN_WIDTH;
private double maximumWidthPx = GridConstants.DEFAULT_MAX_WIDTH;
@@ -5550,21 +5550,21 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
* not
* @since 8.3
*/
- public boolean isWidgetEventsAllowed() {
- return widgetEventsAllowed;
+ public boolean isHandleWidgetEvents() {
+ return handleWidgetEvents;
}
/**
* Sets whether Grid should handle events from Widgets in this Column.
- *
- * @param widgetEventsAllowed
+ *
+ * @param handleWidgetEvents
* {@code true} to let grid handle events from widgets;
* {@code false} to not
*
* @since 8.3
*/
- public void setWidgetEventsAllowed(boolean widgetEventsAllowed) {
- this.widgetEventsAllowed = widgetEventsAllowed;
+ public void setHandleWidgetEvents(boolean handleWidgetEvents) {
+ this.handleWidgetEvents = handleWidgetEvents;
}
}
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index 803ac58b58..3a18de05c6 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -2065,16 +2065,14 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
* {@link ComboBox} or {@link TextField} it might be problematic as the
* component gets re-rendered and might lose focus.
*
- * @param widgetEventsAllowed
+ * @param handleWidgetEvents
* {@code true} to handle events; {@code false} to not
* @return this column
* @since 8.3
*/
- public Column<T, V> setWidgetEventsAllowed(
- boolean widgetEventsAllowed) {
- if (getState(false).widgetEventsAllowed != widgetEventsAllowed) {
- getState().widgetEventsAllowed = widgetEventsAllowed;
- }
+ public Column<T, V> setHandleWidgetEvents(
+ boolean handleWidgetEvents) {
+ getState().handleWidgetEvents = handleWidgetEvents;
return this;
}
@@ -2082,13 +2080,13 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
* Gets whether Grid is handling the events in this Column from
* Component and Widgets.
*
- * @see #setWidgetEventsAllowed(boolean)
+ * @see #setHandleWidgetEvents(boolean)
*
* @return {@code true} if handling events; {@code false} if not
* @since 8.3
*/
- public boolean isWidgetEventsAllowed() {
- return getState(false).widgetEventsAllowed;
+ public boolean isHandleWidgetEvents() {
+ return getState(false).handleWidgetEvents;
}
/**
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java
index 225eff104d..9f413b432f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java
@@ -37,7 +37,7 @@ public class ColumnState extends AbstractGridExtensionState {
*
* @since 8.3
*/
- public boolean widgetEventsAllowed = false;
+ public boolean handleWidgetEvents = false;
/** The assistive device caption for the column. */
public String assistiveCaption;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridComponents.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridComponents.java
index df71987955..97437fbbd2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridComponents.java
@@ -27,7 +27,7 @@ public class GridComponents extends AbstractTestUIWithLog {
protected void setup(VaadinRequest request) {
Grid<String> grid = new Grid<>();
grid.addComponentColumn(Label::new).setId("label")
- .setCaption("Column 0").setWidgetEventsAllowed(true);
+ .setCaption("Column 0").setHandleWidgetEvents(true);
grid.getDefaultHeaderRow().getCell("label")
.setComponent(new Label("Label"));
grid.addComponentColumn(string -> {