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;
column.setTooltipContentMode(getState().tooltipContentMode);
}
- @OnStateChange("widgetEventsAllowed")
- void updateWidgetEventsAllowed() {
- column.setWidgetEventsAllowed(getState().widgetEventsAllowed);
+ @OnStateChange("handleWidgetEvents")
+ void updateHandleWidgetEvents() {
+ column.setHandleWidgetEvents(getState().handleWidgetEvents);
}
@Override
if (cell != null) {
Column<?, ?> column = grid
.getVisibleColumn(cell.getColumn());
- if (column == null || !column.isWidgetEventsAllowed()) {
+ if (column == null || !column.isHandleWidgetEvents()) {
return;
}
}
Column<?, ?> column = grid
.getVisibleColumn(cell.getColumn());
handleWidgetEvent = column != null
- && column.isWidgetEventsAllowed();
+ && column.isHandleWidgetEvents();
}
}
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;
* 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;
}
}
* {@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;
}
* 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;
}
/**
*
* @since 8.3
*/
- public boolean widgetEventsAllowed = false;
+ public boolean handleWidgetEvents = false;
/** The assistive device caption for the column. */
public String assistiveCaption;
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 -> {