* Rename HierarchicalDataCommunicator#getMapper to getHierarchyMapper * Make rpc field in Notification private * Change DropIndexCalculator.ALWAYS_DROP_TO_END to a generic static method * Move EditorImpl#editRow documentation to the interface level * Correct GridDragEndEvent, GridDragStartEvent constructor javadocs * Revert SharedState.registeredEventListeners to a Set * Rename GridDropTarget dropAllowedOnSortedGridRows * Rename ColumnState.contentMode to tooltipContentModetags/8.3.0.alpha1
@@ -121,7 +121,6 @@ | |||
<li>Error indicators are now <tt><span class="v-errorindicator"></span></tt> elements.</li> | |||
<li><tt>Embedded</tt> is not a <tt>LegacyComponent</tt> anymore.</li> | |||
<li><tt>Notification</tt> method <tt>show</tt> returns <tt>Notification</tt>, instead of <tt>void</tt>.</li> | |||
<li><tt>SharedState</tt> field <tt>registeredEventListeners</tt> is a <tt>Map</tt> instead of <tt>Set</tt>.</li> | |||
<li>The client side <tt>SelectionModel</tt> interface has a new method <tt>isMultiSelectionAllowed</tt>.</li> | |||
<li><tt>AbstractDateField</tt> is not a <tt>LegacyComponent</tt> anymore.</li> | |||
<li><tt>AbstractDateField</tt>.<tt>formatDate</tt> is now abstract.</li> |
@@ -42,7 +42,7 @@ public class ColumnConnector extends AbstractExtensionConnector { | |||
extends Column<Object, JsonObject> { | |||
private final String connectorId; | |||
private ContentMode contentMode; | |||
private ContentMode tooltipContentMode; | |||
CustomColumn(String connectorId) { | |||
this.connectorId = connectorId; | |||
@@ -64,20 +64,20 @@ public class ColumnConnector extends AbstractExtensionConnector { | |||
* | |||
* @since 8.2 | |||
*/ | |||
public ContentMode getContentMode() { | |||
return contentMode; | |||
public ContentMode getTooltipContentMode() { | |||
return tooltipContentMode; | |||
} | |||
/** | |||
* Sets the content mode for tooltips in this column. | |||
* | |||
* @param contentMode | |||
* @param tooltipContentMode | |||
* the content mode for tooltips | |||
* | |||
* @since 8.2 | |||
*/ | |||
public void setContentMode(ContentMode contentMode) { | |||
this.contentMode = contentMode; | |||
public void setTooltipContentMode(ContentMode tooltipContentMode) { | |||
this.tooltipContentMode = tooltipContentMode; | |||
} | |||
} | |||
@@ -189,9 +189,9 @@ public class ColumnConnector extends AbstractExtensionConnector { | |||
column.setEditable(getState().editable); | |||
} | |||
@OnStateChange("contentMode") | |||
void updateContentMode() { | |||
column.setContentMode(getState().contentMode); | |||
@OnStateChange("tooltipContentMode") | |||
void updateTooltipContentMode() { | |||
column.setTooltipContentMode(getState().tooltipContentMode); | |||
} | |||
@Override |
@@ -634,7 +634,7 @@ public class GridConnector extends AbstractListingConnector | |||
if (cellDescriptions != null | |||
&& cellDescriptions.hasKey(id)) { | |||
return new TooltipInfo(cellDescriptions.getString(id), | |||
((CustomColumn) column).getContentMode()); | |||
((CustomColumn) column).getTooltipContentMode()); | |||
} else if (row.hasKey(GridState.JSONKEY_ROWDESCRIPTION)) { | |||
return new TooltipInfo( | |||
row.getString(GridState.JSONKEY_ROWDESCRIPTION), |
@@ -20,7 +20,7 @@ import java.util.Collection; | |||
import java.util.Collections; | |||
import java.util.HashSet; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Set; | |||
import java.util.logging.Logger; | |||
import com.google.gwt.core.client.JsArrayString; | |||
@@ -490,8 +490,8 @@ public abstract class AbstractConnector | |||
*/ | |||
@Override | |||
public boolean hasEventListener(String eventIdentifier) { | |||
Map<String, Integer> reg = getState().registeredEventListeners; | |||
return reg != null && reg.containsKey(eventIdentifier); | |||
Set<String> reg = getState().registeredEventListeners; | |||
return reg != null && reg.contains(eventIdentifier); | |||
} | |||
/** |
@@ -323,11 +323,11 @@ public class HierarchicalDataCommunicator<T> extends DataCommunicator<T> { | |||
} | |||
/** | |||
* Returns active {@code HierarchyMapper} | |||
* Returns the {@code HierarchyMapper} used by this data communicator. | |||
* | |||
* @return the mapper | |||
* @return the hierarchy mapper used by this data communicator | |||
*/ | |||
protected HierarchyMapper<T, ?> getMapper() { | |||
protected HierarchyMapper<T, ?> getHierarchyMapper() { | |||
return mapper; | |||
} | |||
} |
@@ -120,9 +120,10 @@ public class EventRouter implements MethodEventSource { | |||
.addRegisteredEventListener(state, eventIdentifier); | |||
return () -> { | |||
registration.remove(); | |||
listenerList.remove(listenerMethod); | |||
if (!hasListeners(eventType)) { | |||
registration.remove(); | |||
} | |||
}; | |||
} | |||
@@ -313,5 +314,4 @@ public class EventRouter implements MethodEventSource { | |||
} | |||
return listeners; | |||
} | |||
} |
@@ -1414,7 +1414,7 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents, | |||
* @param cellDescriptionGenerator | |||
* the cell description generator to set, or {@code null} to | |||
* remove a previously set generator | |||
* @param contentMode | |||
* @param tooltipContentMode | |||
* the content mode for tooltips | |||
* @return this column | |||
* | |||
@@ -1422,9 +1422,9 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents, | |||
*/ | |||
public Column<T, V> setDescriptionGenerator( | |||
DescriptionGenerator<T> cellDescriptionGenerator, | |||
ContentMode contentMode) { | |||
ContentMode tooltipContentMode) { | |||
this.descriptionGenerator = cellDescriptionGenerator; | |||
getState().contentMode = contentMode; | |||
getState().tooltipContentMode = tooltipContentMode; | |||
getGrid().getDataCommunicator().reset(); | |||
return this; | |||
} |
@@ -69,14 +69,6 @@ import com.vaadin.shared.ui.notification.NotificationState; | |||
*/ | |||
public class Notification extends AbstractExtension { | |||
/** | |||
* The server RPC. | |||
* | |||
* @since 8.2 | |||
*/ | |||
protected NotificationServerRpc rpc = () -> fireEvent( | |||
new CloseEvent(Notification.this)); | |||
public enum Type { | |||
HUMANIZED_MESSAGE("humanized"), WARNING_MESSAGE( | |||
"warning"), ERROR_MESSAGE("error"), TRAY_NOTIFICATION("tray"), | |||
@@ -128,6 +120,14 @@ public class Notification extends AbstractExtension { | |||
public static final int DELAY_FOREVER = -1; | |||
public static final int DELAY_NONE = 0; | |||
/** | |||
* The server RPC. | |||
* | |||
* @since 8.2 | |||
*/ | |||
private NotificationServerRpc rpc = () -> fireEvent( | |||
new CloseEvent(Notification.this)); | |||
/** | |||
* Creates a "humanized" notification message. | |||
* |
@@ -31,11 +31,14 @@ import java.io.Serializable; | |||
public interface DropIndexCalculator<T> extends Serializable { | |||
/** | |||
* Calculator for always dropping items to the end of the target grid, | |||
* regardless of drop position. | |||
* Returns a calculator for always dropping items to the end of the target | |||
* grid, regardless of drop position. | |||
* | |||
* @return the created drop index calculator | |||
*/ | |||
@SuppressWarnings("rawtypes") | |||
static DropIndexCalculator ALWAYS_DROP_TO_END = (event -> Integer.MAX_VALUE); | |||
static <T> DropIndexCalculator<T> alwaysDropToEnd() { | |||
return (GridDropEvent<T> event) -> Integer.MAX_VALUE; | |||
} | |||
/** | |||
* Called when Items are dropped onto a target grid. |
@@ -104,12 +104,22 @@ public interface Editor<T> extends Serializable { | |||
public void cancel(); | |||
/** | |||
* Edits the selected row | |||
* Opens the editor interface for the provided row. Scrolls the Grid to | |||
* bring the row to view if it is not already visible. | |||
* | |||
* @param rowNumber | |||
* the row to edit | |||
* Note that any cell content rendered by a WidgetRenderer will not be | |||
* visible in the editor row. | |||
* | |||
* @see #setEnabled(boolean) | |||
* @since 8.2 | |||
* | |||
* @param rowNumber | |||
* the row number of the edited item | |||
* @throws IllegalStateException | |||
* if the editor is not enabled or already editing a different | |||
* item in buffered mode | |||
* @throws IllegalArgumentException | |||
* if the {@code rowNumber} is not in the backing data provider | |||
*/ | |||
public void editRow(int rowNumber); | |||
@@ -267,22 +267,6 @@ public class EditorImpl<T> extends AbstractGridExtension<T> | |||
rpc.cancel(); | |||
} | |||
/** | |||
* Opens the editor interface for the provided row. Scrolls the Grid to | |||
* bring the row to view if it is not already visible. | |||
* | |||
* Note that any cell content rendered by a WidgetRenderer will not be | |||
* visible in the editor row. | |||
* | |||
* @param rowNumber | |||
* the row number of the edited item | |||
* @throws IllegalStateException | |||
* if the editor is not enabled or already editing a different item | |||
* in buffered mode | |||
* @throws IllegalArgumentException | |||
* if the {@code rowNumber} is not in the backing data provider | |||
* @see #setEnabled(boolean) | |||
*/ | |||
@Override | |||
public void editRow(int rowNumber) | |||
throws IllegalStateException, IllegalArgumentException { |
@@ -43,7 +43,7 @@ public class GridDragEndEvent<T> extends DragEndEvent<Grid<T>> { | |||
* @param dropEffect | |||
* Drop effect from {@code DataTransfer.dropEffect} object. | |||
* @param draggedItems | |||
* Set of items having been dragged. | |||
* List of items having been dragged. | |||
*/ | |||
public GridDragEndEvent(Grid<T> source, DropEffect dropEffect, | |||
List<T> draggedItems) { |
@@ -43,7 +43,7 @@ public class GridDragStartEvent<T> extends DragStartEvent<Grid<T>> { | |||
* @param effectAllowed | |||
* Allowed effect from {@code DataTransfer.effectAllowed} object. | |||
* @param draggedItems | |||
* Set of items being dragged. | |||
* List of items being dragged. | |||
*/ | |||
public GridDragStartEvent(Grid<T> source, EffectAllowed effectAllowed, | |||
List<T> draggedItems) { |
@@ -41,7 +41,7 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { | |||
private Registration sortListenerRegistration; | |||
private DropMode cachedDropMode; | |||
private boolean dropAllowedOnSortedGridRows = true; | |||
private boolean dropAllowedOnRowsWhenSorted = true; | |||
/** | |||
* Extends a Grid and makes it's rows drop targets for HTML5 drag and drop. | |||
@@ -88,18 +88,18 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { | |||
* in this case. | |||
* <p> | |||
* <em>NOTE: {@link DropMode#ON_GRID} is used automatically when the grid | |||
* has been sorted and {@link #setDropAllowedOnSortedGridRows(boolean)} is | |||
* has been sorted and {@link #setDropAllowedOnRowsWhenSorted(boolean)} is | |||
* {@code false} - since the drop location would not necessarily match the | |||
* correct row because of the sorting. During the sorting, any calls to this | |||
* method don't have any effect until the sorting has been removed, or | |||
* {@link #setDropAllowedOnSortedGridRows(boolean)} is set back to | |||
* {@link #setDropAllowedOnRowsWhenSorted(boolean)} is set back to | |||
* {@code true}.</em> | |||
* | |||
* @param dropMode | |||
* Drop mode that describes the allowed drop locations within the | |||
* Grid's row. | |||
* @see GridDropEvent#getDropLocation() | |||
* @see #setDropAllowedOnSortedGridRows(boolean) | |||
* @see #setDropAllowedOnRowsWhenSorted(boolean) | |||
*/ | |||
public void setDropMode(DropMode dropMode) { | |||
if (dropMode == null) { | |||
@@ -147,10 +147,10 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { | |||
* drops on sorted grid rows | |||
* @since 8.2 | |||
*/ | |||
public void setDropAllowedOnSortedGridRows( | |||
public void setDropAllowedOnRowsWhenSorted( | |||
boolean dropAllowedOnSortedGridRows) { | |||
if (this.dropAllowedOnSortedGridRows != dropAllowedOnSortedGridRows) { | |||
this.dropAllowedOnSortedGridRows = dropAllowedOnSortedGridRows; | |||
if (this.dropAllowedOnRowsWhenSorted != dropAllowedOnSortedGridRows) { | |||
this.dropAllowedOnRowsWhenSorted = dropAllowedOnSortedGridRows; | |||
if (!dropAllowedOnSortedGridRows) { | |||
@@ -194,8 +194,8 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { | |||
* the grid | |||
* @since 8.2 | |||
*/ | |||
public boolean isDropAllowedOnSortedGridRows() { | |||
return dropAllowedOnSortedGridRows; | |||
public boolean isDropAllowedOnRowsWhenSorted() { | |||
return dropAllowedOnRowsWhenSorted; | |||
} | |||
/** |
@@ -190,7 +190,7 @@ public class GridRowDragger<T> implements Serializable { | |||
gridDragSource = new GridDragSource<>(source); | |||
gridDropTarget = new GridDropTarget<>(target, dropMode); | |||
gridDropTarget.setDropAllowedOnSortedGridRows(false); | |||
gridDropTarget.setDropAllowedOnRowsWhenSorted(false); | |||
gridDragSource.addGridDragStartListener(event -> { | |||
draggedItems = event.getDraggedItems(); |
@@ -24,14 +24,14 @@ public class GridDropTargetTest { | |||
@Test | |||
public void dropAllowedOnSortedGridRows_defaultValue_isTrue() { | |||
Assert.assertTrue("Default drop allowed should be backwards compatible", | |||
target.isDropAllowedOnSortedGridRows()); | |||
target.isDropAllowedOnRowsWhenSorted()); | |||
} | |||
@Test | |||
public void dropAllowedOnSortedGridRows_notAllowed_changesDropModeWhenSorted() { | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(false); | |||
target.setDropAllowedOnRowsWhenSorted(false); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
@@ -64,11 +64,11 @@ public class GridDropTargetTest { | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(false); | |||
target.setDropAllowedOnRowsWhenSorted(false); | |||
Assert.assertEquals(DropMode.ON_GRID, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(true); | |||
target.setDropAllowedOnRowsWhenSorted(true); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
} | |||
@@ -77,7 +77,7 @@ public class GridDropTargetTest { | |||
public void dropAllowedOnSortedGridRows_notAllowedBackToAllowed_changesBackToUserDefinedMode() { | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(false); | |||
target.setDropAllowedOnRowsWhenSorted(false); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
@@ -85,7 +85,7 @@ public class GridDropTargetTest { | |||
Assert.assertEquals(DropMode.ON_GRID, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(true); | |||
target.setDropAllowedOnRowsWhenSorted(true); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
@@ -98,19 +98,19 @@ public class GridDropTargetTest { | |||
public void dropAllowedOnSortedGridRows_swappingAllowedDropOnSortedOffAndOn() { | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(false); | |||
target.setDropAllowedOnRowsWhenSorted(false); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(false); | |||
target.setDropAllowedOnRowsWhenSorted(false); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(true); | |||
target.setDropAllowedOnRowsWhenSorted(true); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(true); | |||
target.setDropAllowedOnRowsWhenSorted(true); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
} | |||
@@ -119,7 +119,7 @@ public class GridDropTargetTest { | |||
public void dropAllowedOnSortedGridRows_changingDropModeWhileSorted_replacesPreviouslyCachedButDoesntOverride() { | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(false); | |||
target.setDropAllowedOnRowsWhenSorted(false); | |||
Assert.assertEquals(DropMode.BETWEEN, target.getDropMode()); | |||
@@ -131,7 +131,7 @@ public class GridDropTargetTest { | |||
Assert.assertEquals(DropMode.ON_GRID, target.getDropMode()); | |||
Assert.assertFalse("Changing drop mode should not have any effect here", | |||
target.isDropAllowedOnSortedGridRows()); | |||
target.isDropAllowedOnRowsWhenSorted()); | |||
grid.clearSortOrder(); | |||
@@ -145,7 +145,7 @@ public class GridDropTargetTest { | |||
Assert.assertEquals(DropMode.ON_GRID, target.getDropMode()); | |||
target.setDropAllowedOnSortedGridRows(true); | |||
target.setDropAllowedOnRowsWhenSorted(true); | |||
Assert.assertEquals(DropMode.ON_TOP_OR_BETWEEN, target.getDropMode()); | |||
} |
@@ -15,8 +15,8 @@ import com.vaadin.data.provider.ListDataProvider; | |||
import com.vaadin.shared.ui.grid.DropLocation; | |||
import com.vaadin.ui.Grid; | |||
import com.vaadin.ui.components.grid.DropIndexCalculator; | |||
import com.vaadin.ui.components.grid.GridRowDragger; | |||
import com.vaadin.ui.components.grid.GridDropEvent; | |||
import com.vaadin.ui.components.grid.GridRowDragger; | |||
import com.vaadin.ui.components.grid.SourceDataProviderUpdater; | |||
public class GridRowDraggerOneGridTest { | |||
@@ -143,7 +143,7 @@ public class GridRowDraggerOneGridTest { | |||
public void alwaysDropToEndCalculator() { | |||
source.setItems("0", "1", "2"); | |||
dragger.setDropIndexCalculator(DropIndexCalculator.ALWAYS_DROP_TO_END); | |||
dragger.setDropIndexCalculator(DropIndexCalculator.alwaysDropToEnd()); | |||
drop("1", DropLocation.ABOVE, "0"); | |||
@@ -208,7 +208,7 @@ public class GridRowDraggerOneGridTest { | |||
public void dropOnSortedGrid_byDefault_dropsToTheEnd() { | |||
Assert.assertFalse( | |||
"Default drops on sorted grid rows should not be allowed", | |||
dragger.getGridDropTarget().isDropAllowedOnSortedGridRows()); | |||
dragger.getGridDropTarget().isDropAllowedOnRowsWhenSorted()); | |||
source.setItems("0", "1", "2", "3", "4"); | |||
@@ -15,8 +15,8 @@ import com.vaadin.data.provider.ListDataProvider; | |||
import com.vaadin.shared.ui.grid.DropLocation; | |||
import com.vaadin.ui.Grid; | |||
import com.vaadin.ui.components.grid.DropIndexCalculator; | |||
import com.vaadin.ui.components.grid.GridRowDragger; | |||
import com.vaadin.ui.components.grid.GridDropEvent; | |||
import com.vaadin.ui.components.grid.GridRowDragger; | |||
import com.vaadin.ui.components.grid.SourceDataProviderUpdater; | |||
public class GridRowDraggerTwoGridsTest { | |||
@@ -186,7 +186,7 @@ public class GridRowDraggerTwoGridsTest { | |||
source.setItems("0"); | |||
target.setItems("1", "2"); | |||
dragger.setDropIndexCalculator(DropIndexCalculator.ALWAYS_DROP_TO_END); | |||
dragger.setDropIndexCalculator(DropIndexCalculator.alwaysDropToEnd()); | |||
drop("1", DropLocation.ABOVE, "0"); | |||
@@ -255,7 +255,7 @@ public class GridRowDraggerTwoGridsTest { | |||
public void dropOnSortedGrid_byDefault_dropsToTheEnd() { | |||
Assert.assertFalse( | |||
"Default drops on sorted grid rows should not be allowed", | |||
dragger.getGridDropTarget().isDropAllowedOnSortedGridRows()); | |||
dragger.getGridDropTarget().isDropAllowedOnRowsWhenSorted()); | |||
source.setItems("0", "1", "2"); | |||
target.setItems("4", "5"); |
@@ -19,6 +19,7 @@ package com.vaadin.shared.communication; | |||
import java.io.Serializable; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
import java.util.Set; | |||
import com.vaadin.shared.Connector; | |||
import com.vaadin.shared.annotations.NoLayout; | |||
@@ -63,12 +64,9 @@ public class SharedState implements Serializable { | |||
public boolean enabled = true; | |||
/** | |||
* A Map of event identifiers with registered listeners, {@code key} is | |||
* event identifier, {@code value} is the listeners count. | |||
* | |||
* @since 8.2 | |||
* A set of event identifiers with registered listeners. | |||
*/ | |||
@NoLayout | |||
public Map<String, Integer> registeredEventListeners; | |||
public Set<String> registeredEventListeners; | |||
} |
@@ -16,7 +16,7 @@ | |||
package com.vaadin.shared.ui; | |||
import java.io.Serializable; | |||
import java.util.HashMap; | |||
import java.util.HashSet; | |||
import com.vaadin.shared.AbstractComponentState; | |||
import com.vaadin.shared.Registration; | |||
@@ -67,19 +67,12 @@ public final class ComponentStateUtil implements Serializable { | |||
@Deprecated | |||
public static final void removeRegisteredEventListener(SharedState state, | |||
String eventIdentifier) { | |||
if (state.registeredEventListeners != null) { | |||
Integer count = state.registeredEventListeners.get(eventIdentifier); | |||
if (count != null) { | |||
if (count > 1) { | |||
state.registeredEventListeners.put(eventIdentifier, | |||
count - 1); | |||
} else { | |||
state.registeredEventListeners.remove(eventIdentifier); | |||
if (state.registeredEventListeners.isEmpty()) { | |||
state.registeredEventListeners = null; | |||
} | |||
} | |||
} | |||
if (state.registeredEventListeners == null) { | |||
return; | |||
} | |||
state.registeredEventListeners.remove(eventIdentifier); | |||
if (state.registeredEventListeners.size() == 0) { | |||
state.registeredEventListeners = null; | |||
} | |||
} | |||
@@ -94,13 +87,9 @@ public final class ComponentStateUtil implements Serializable { | |||
public static final Registration addRegisteredEventListener( | |||
SharedState state, String eventListenerId) { | |||
if (state.registeredEventListeners == null) { | |||
state.registeredEventListeners = new HashMap<>(); | |||
} | |||
Integer count = state.registeredEventListeners.get(eventListenerId); | |||
if (count == null) { | |||
count = 0; | |||
state.registeredEventListeners = new HashSet<>(); | |||
} | |||
state.registeredEventListeners.put(eventListenerId, count + 1); | |||
state.registeredEventListeners.add(eventListenerId); | |||
return () -> removeRegisteredEventListener(state, eventListenerId); | |||
} | |||
} |
@@ -80,6 +80,6 @@ public class ColumnState extends AbstractGridExtensionState { | |||
* | |||
* @since 8.2 | |||
*/ | |||
public ContentMode contentMode; | |||
public ContentMode tooltipContentMode; | |||
} |
@@ -66,9 +66,9 @@ public abstract class AbstractGridDnD extends AbstractTestUIWithLog { | |||
} | |||
}); | |||
CheckBox dropOnSortedGridRows = new CheckBox("Drop on Sorted Grid Rows", | |||
dropTarget.isDropAllowedOnSortedGridRows()); | |||
dropTarget.isDropAllowedOnRowsWhenSorted()); | |||
dropOnSortedGridRows.addValueChangeListener(event -> { | |||
dropTarget.setDropAllowedOnSortedGridRows(event.getValue()); | |||
dropTarget.setDropAllowedOnRowsWhenSorted(event.getValue()); | |||
}); | |||
RadioButtonGroup<Integer> frozenColumnSelect = new RadioButtonGroup<>( |
@@ -44,7 +44,7 @@ public class GridRowDraggerTwoGrids extends AbstractGridDnD { | |||
CheckBox addItemsToEnd = new CheckBox("Add Items To End", false); | |||
addItemsToEnd.addValueChangeListener( | |||
event -> gridDragger.setDropIndexCalculator(event.getValue() | |||
? DropIndexCalculator.ALWAYS_DROP_TO_END : null)); | |||
? DropIndexCalculator.alwaysDropToEnd() : null)); | |||
CheckBox removeItemsFromSource = new CheckBox( | |||
"Remove items from source grid", true); | |||
removeItemsFromSource.addValueChangeListener(event -> gridDragger |