Change-Id: I50cdcef0beb2f384636eb40c2f3f7493db52ac87tags/8.0.0.alpha1
@@ -26,6 +26,11 @@ | |||
<artifactId>vaadin-compatibility-server</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>${project.groupId}</groupId> | |||
<artifactId>vaadin-compatibility-shared</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
@@ -43,33 +48,33 @@ | |||
</executions> | |||
</plugin> | |||
<plugin> | |||
<artifactId>maven-resources-plugin</artifactId> | |||
<executions> | |||
<!-- Copy .java files to package --> | |||
<execution> | |||
<id>copy-sources</id> | |||
<!-- here the phase you need --> | |||
<phase>prepare-package</phase> | |||
<goals> | |||
<goal>copy-resources</goal> | |||
</goals> | |||
<configuration> | |||
<outputDirectory>${project.build.outputDirectory}</outputDirectory> | |||
<resources> | |||
<resource> | |||
<directory>src/main/resources</directory> | |||
<filtering>false</filtering> | |||
</resource> | |||
<resource> | |||
<directory>src/main/java</directory> | |||
<filtering>false</filtering> | |||
</resource> | |||
</resources> | |||
</configuration> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
<plugin> | |||
<artifactId>maven-resources-plugin</artifactId> | |||
<executions> | |||
<!-- Copy .java files to package --> | |||
<execution> | |||
<id>copy-sources</id> | |||
<!-- here the phase you need --> | |||
<phase>prepare-package</phase> | |||
<goals> | |||
<goal>copy-resources</goal> | |||
</goals> | |||
<configuration> | |||
<outputDirectory>${project.build.outputDirectory}</outputDirectory> | |||
<resources> | |||
<resource> | |||
<directory>src/main/resources</directory> | |||
<filtering>false</filtering> | |||
</resource> | |||
<resource> | |||
<directory>src/main/java</directory> | |||
<filtering>false</filtering> | |||
</resource> | |||
</resources> | |||
</configuration> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-surefire-plugin</artifactId> |
@@ -19,9 +19,9 @@ import java.util.Collection; | |||
import com.vaadin.client.data.DataSource.RowHandle; | |||
import com.vaadin.client.extensions.AbstractExtensionConnector; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.v7.client.widget.grid.selection.SelectionModel; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import elemental.json.JsonObject; | |||
@@ -17,10 +17,10 @@ package com.vaadin.v7.client.connectors; | |||
import com.google.web.bindery.event.shared.HandlerRegistration; | |||
import com.vaadin.client.MouseEventDetailsBuilder; | |||
import com.vaadin.shared.ui.grid.renderers.RendererClickRpc; | |||
import com.vaadin.v7.client.renderers.ClickableRenderer; | |||
import com.vaadin.v7.client.renderers.ClickableRenderer.RendererClickEvent; | |||
import com.vaadin.v7.client.renderers.ClickableRenderer.RendererClickHandler; | |||
import com.vaadin.v7.shared.ui.grid.renderers.RendererClickRpc; | |||
import elemental.json.JsonObject; | |||
@@ -53,18 +53,6 @@ import com.vaadin.client.ui.SimpleManagedLayout; | |||
import com.vaadin.shared.MouseEventDetails; | |||
import com.vaadin.shared.data.sort.SortDirection; | |||
import com.vaadin.shared.ui.Connect; | |||
import com.vaadin.shared.ui.grid.EditorClientRpc; | |||
import com.vaadin.shared.ui.grid.EditorServerRpc; | |||
import com.vaadin.shared.ui.grid.GridClientRpc; | |||
import com.vaadin.shared.ui.grid.GridColumnState; | |||
import com.vaadin.shared.ui.grid.GridConstants; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.shared.ui.grid.GridServerRpc; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.shared.ui.grid.GridStaticSectionState; | |||
import com.vaadin.shared.ui.grid.GridStaticSectionState.CellState; | |||
import com.vaadin.shared.ui.grid.GridStaticSectionState.RowState; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.v7.client.connectors.RpcDataSourceConnector.DetailsListener; | |||
import com.vaadin.v7.client.connectors.RpcDataSourceConnector.RpcDataSource; | |||
import com.vaadin.v7.client.widget.escalator.events.RowHeightChangedEvent; | |||
@@ -95,6 +83,18 @@ import com.vaadin.v7.client.widgets.Grid.FooterCell; | |||
import com.vaadin.v7.client.widgets.Grid.FooterRow; | |||
import com.vaadin.v7.client.widgets.Grid.HeaderCell; | |||
import com.vaadin.v7.client.widgets.Grid.HeaderRow; | |||
import com.vaadin.v7.shared.ui.grid.EditorClientRpc; | |||
import com.vaadin.v7.shared.ui.grid.EditorServerRpc; | |||
import com.vaadin.v7.shared.ui.grid.GridClientRpc; | |||
import com.vaadin.v7.shared.ui.grid.GridColumnState; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants; | |||
import com.vaadin.v7.shared.ui.grid.GridServerRpc; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticSectionState; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticSectionState.CellState; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticSectionState.RowState; | |||
import elemental.json.JsonObject; | |||
import elemental.json.JsonValue; |
@@ -30,10 +30,7 @@ import com.vaadin.client.annotations.OnStateChange; | |||
import com.vaadin.client.data.DataSource; | |||
import com.vaadin.client.data.DataSource.RowHandle; | |||
import com.vaadin.shared.ui.Connect; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.shared.ui.grid.Range; | |||
import com.vaadin.shared.ui.grid.selection.MultiSelectionModelServerRpc; | |||
import com.vaadin.shared.ui.grid.selection.MultiSelectionModelState; | |||
import com.vaadin.v7.client.renderers.ComplexRenderer; | |||
import com.vaadin.v7.client.renderers.Renderer; | |||
import com.vaadin.v7.client.widget.grid.DataAvailableEvent; | |||
@@ -46,6 +43,9 @@ import com.vaadin.v7.client.widget.grid.selection.SpaceSelectHandler; | |||
import com.vaadin.v7.client.widget.grid.selection.SelectionModel.Multi; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.HeaderCell; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import com.vaadin.v7.shared.ui.grid.selection.MultiSelectionModelServerRpc; | |||
import com.vaadin.v7.shared.ui.grid.selection.MultiSelectionModelState; | |||
import com.vaadin.v7.ui.Grid.MultiSelectionModel; | |||
import elemental.json.JsonObject; |
@@ -26,8 +26,8 @@ import com.vaadin.client.extensions.AbstractExtensionConnector; | |||
import com.vaadin.shared.data.DataProviderRpc; | |||
import com.vaadin.shared.data.DataRequestRpc; | |||
import com.vaadin.shared.ui.Connect; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.shared.ui.grid.Range; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import elemental.json.Json; | |||
import elemental.json.JsonArray; |
@@ -19,14 +19,14 @@ import com.vaadin.client.ServerConnector; | |||
import com.vaadin.client.annotations.OnStateChange; | |||
import com.vaadin.client.data.DataSource.RowHandle; | |||
import com.vaadin.shared.ui.Connect; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.shared.ui.grid.selection.SingleSelectionModelServerRpc; | |||
import com.vaadin.shared.ui.grid.selection.SingleSelectionModelState; | |||
import com.vaadin.v7.client.renderers.Renderer; | |||
import com.vaadin.v7.client.widget.grid.selection.ClickSelectHandler; | |||
import com.vaadin.v7.client.widget.grid.selection.SelectionModel; | |||
import com.vaadin.v7.client.widget.grid.selection.SpaceSelectHandler; | |||
import com.vaadin.v7.client.widget.grid.selection.SelectionModel.Single; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import com.vaadin.v7.shared.ui.grid.selection.SingleSelectionModelServerRpc; | |||
import com.vaadin.v7.shared.ui.grid.selection.SingleSelectionModelState; | |||
import com.vaadin.v7.ui.Grid.SingleSelectionModel; | |||
import elemental.json.JsonObject; |
@@ -28,13 +28,13 @@ import com.google.gwt.user.client.ui.Composite; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.google.web.bindery.event.shared.HandlerRegistration; | |||
import com.vaadin.client.WidgetUtil; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.client.widget.escalator.Cell; | |||
import com.vaadin.v7.client.widget.escalator.RowContainer; | |||
import com.vaadin.v7.client.widget.grid.CellReference; | |||
import com.vaadin.v7.client.widget.grid.EventCellReference; | |||
import com.vaadin.v7.client.widgets.Escalator; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* An abstract superclass for renderers that render clickable widgets. Click |
@@ -16,10 +16,10 @@ | |||
package com.vaadin.v7.client.widget.grid; | |||
import com.google.gwt.dom.client.TableCellElement; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.client.widget.escalator.Cell; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.Column; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* A data class which contains information which identifies a cell being the |
@@ -16,11 +16,11 @@ | |||
package com.vaadin.v7.client.widget.grid.events; | |||
import com.google.gwt.dom.client.BrowserEvents; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.client.widget.grid.CellReference; | |||
import com.vaadin.v7.client.widget.grid.events.AbstractGridMouseEventHandler.GridClickHandler; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.AbstractGridMouseEvent; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* Represents native mouse click event in Grid. |
@@ -16,11 +16,11 @@ | |||
package com.vaadin.v7.client.widget.grid.events; | |||
import com.google.gwt.dom.client.BrowserEvents; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.client.widget.grid.CellReference; | |||
import com.vaadin.v7.client.widget.grid.events.AbstractGridMouseEventHandler.GridDoubleClickHandler; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.AbstractGridMouseEvent; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* Represents native mouse double click event in Grid. |
@@ -17,11 +17,11 @@ package com.vaadin.v7.client.widget.grid.events; | |||
import com.google.gwt.dom.client.BrowserEvents; | |||
import com.google.gwt.event.dom.client.KeyCodes; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.client.widget.grid.CellReference; | |||
import com.vaadin.v7.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyDownHandler; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.AbstractGridKeyEvent; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* Represents native key down event in Grid. |
@@ -16,11 +16,11 @@ | |||
package com.vaadin.v7.client.widget.grid.events; | |||
import com.google.gwt.dom.client.BrowserEvents; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.client.widget.grid.CellReference; | |||
import com.vaadin.v7.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyPressHandler; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.AbstractGridKeyEvent; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* Represents native key press event in Grid. |
@@ -17,11 +17,11 @@ package com.vaadin.v7.client.widget.grid.events; | |||
import com.google.gwt.dom.client.BrowserEvents; | |||
import com.google.gwt.event.dom.client.KeyCodes; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.client.widget.grid.CellReference; | |||
import com.vaadin.v7.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyUpHandler; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.AbstractGridKeyEvent; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* Represents native key up event in Grid. |
@@ -17,7 +17,6 @@ package com.vaadin.v7.client.widget.grid.selection; | |||
import com.google.gwt.event.dom.client.KeyCodes; | |||
import com.google.gwt.event.shared.HandlerRegistration; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.v7.client.widget.grid.DataAvailableEvent; | |||
import com.vaadin.v7.client.widget.grid.DataAvailableHandler; | |||
import com.vaadin.v7.client.widget.grid.events.BodyKeyDownHandler; | |||
@@ -25,6 +24,7 @@ import com.vaadin.v7.client.widget.grid.events.BodyKeyUpHandler; | |||
import com.vaadin.v7.client.widget.grid.events.GridKeyDownEvent; | |||
import com.vaadin.v7.client.widget.grid.events.GridKeyUpEvent; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
/** | |||
* Generic class to perform selections when pressing space key. |
@@ -65,9 +65,7 @@ import com.vaadin.client.DeferredWorker; | |||
import com.vaadin.client.Profiler; | |||
import com.vaadin.client.WidgetUtil; | |||
import com.vaadin.client.ui.SubPartAware; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.shared.ui.grid.Range; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.shared.util.SharedUtil; | |||
import com.vaadin.v7.client.widget.escalator.Cell; | |||
import com.vaadin.v7.client.widget.escalator.ColumnConfiguration; | |||
@@ -93,6 +91,8 @@ import com.vaadin.v7.client.widget.escalator.events.RowHeightChangedEvent; | |||
import com.vaadin.v7.client.widget.grid.events.ScrollEvent; | |||
import com.vaadin.v7.client.widget.grid.events.ScrollHandler; | |||
import com.vaadin.v7.client.widgets.Escalator.JsniUtil.TouchHandlerBundle; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
/*- | |||
@@ -92,12 +92,7 @@ import com.vaadin.client.ui.dd.DragHandle.DragHandleCallback; | |||
import com.vaadin.client.widgets.Overlay; | |||
import com.vaadin.shared.Registration; | |||
import com.vaadin.shared.data.sort.SortDirection; | |||
import com.vaadin.shared.ui.grid.GridConstants; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.shared.ui.grid.GridStaticCellType; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.shared.ui.grid.Range; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.shared.util.SharedUtil; | |||
import com.vaadin.v7.client.renderers.ComplexRenderer; | |||
import com.vaadin.v7.client.renderers.Renderer; | |||
@@ -184,6 +179,11 @@ import com.vaadin.v7.client.widgets.Escalator.SubPartArguments; | |||
import com.vaadin.v7.client.widgets.Grid.Editor.State; | |||
import com.vaadin.v7.client.widgets.Grid.StaticSection.StaticCell; | |||
import com.vaadin.v7.client.widgets.Grid.StaticSection.StaticRow; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticCellType; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* A data grid view that supports columns and lazy loading of data rows from a |
@@ -31,7 +31,6 @@ import com.vaadin.server.ClientConnector; | |||
import com.vaadin.server.KeyMapper; | |||
import com.vaadin.shared.data.DataProviderRpc; | |||
import com.vaadin.shared.data.DataRequestRpc; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.shared.ui.grid.Range; | |||
import com.vaadin.v7.data.Container; | |||
import com.vaadin.v7.data.Container.Indexed; | |||
@@ -45,6 +44,7 @@ import com.vaadin.v7.data.Property; | |||
import com.vaadin.v7.data.Property.ValueChangeEvent; | |||
import com.vaadin.v7.data.Property.ValueChangeListener; | |||
import com.vaadin.v7.data.Property.ValueChangeNotifier; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import com.vaadin.v7.ui.Grid; | |||
import com.vaadin.v7.ui.Grid.Column; | |||
@@ -61,24 +61,6 @@ import com.vaadin.server.KeyMapper; | |||
import com.vaadin.server.VaadinSession; | |||
import com.vaadin.shared.MouseEventDetails; | |||
import com.vaadin.shared.data.sort.SortDirection; | |||
import com.vaadin.shared.ui.grid.EditorClientRpc; | |||
import com.vaadin.shared.ui.grid.EditorServerRpc; | |||
import com.vaadin.shared.ui.grid.GridClientRpc; | |||
import com.vaadin.shared.ui.grid.GridColumnState; | |||
import com.vaadin.shared.ui.grid.GridConstants; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.shared.ui.grid.GridServerRpc; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.shared.ui.grid.GridStaticCellType; | |||
import com.vaadin.shared.ui.grid.GridStaticSectionState; | |||
import com.vaadin.shared.ui.grid.GridStaticSectionState.CellState; | |||
import com.vaadin.shared.ui.grid.GridStaticSectionState.RowState; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.shared.ui.grid.selection.MultiSelectionModelServerRpc; | |||
import com.vaadin.shared.ui.grid.selection.MultiSelectionModelState; | |||
import com.vaadin.shared.ui.grid.selection.SingleSelectionModelServerRpc; | |||
import com.vaadin.shared.ui.grid.selection.SingleSelectionModelState; | |||
import com.vaadin.shared.util.SharedUtil; | |||
import com.vaadin.ui.AbstractFocusable; | |||
import com.vaadin.ui.Component; | |||
@@ -114,6 +96,24 @@ import com.vaadin.v7.event.ItemClickEvent.ItemClickListener; | |||
import com.vaadin.v7.event.ItemClickEvent.ItemClickNotifier; | |||
import com.vaadin.v7.server.communication.data.DataGenerator; | |||
import com.vaadin.v7.server.communication.data.RpcDataProviderExtension; | |||
import com.vaadin.v7.shared.ui.grid.EditorClientRpc; | |||
import com.vaadin.v7.shared.ui.grid.EditorServerRpc; | |||
import com.vaadin.v7.shared.ui.grid.GridClientRpc; | |||
import com.vaadin.v7.shared.ui.grid.GridColumnState; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants; | |||
import com.vaadin.v7.shared.ui.grid.GridServerRpc; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticCellType; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticSectionState; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticSectionState.CellState; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticSectionState.RowState; | |||
import com.vaadin.v7.shared.ui.grid.selection.MultiSelectionModelServerRpc; | |||
import com.vaadin.v7.shared.ui.grid.selection.MultiSelectionModelState; | |||
import com.vaadin.v7.shared.ui.grid.selection.SingleSelectionModelServerRpc; | |||
import com.vaadin.v7.shared.ui.grid.selection.SingleSelectionModelState; | |||
import com.vaadin.v7.ui.renderers.HtmlRenderer; | |||
import com.vaadin.v7.ui.renderers.Renderer; | |||
import com.vaadin.v7.ui.renderers.TextRenderer; |
@@ -20,8 +20,8 @@ import java.lang.reflect.Method; | |||
import com.vaadin.event.ConnectorEventListener; | |||
import com.vaadin.event.MouseEvents.ClickEvent; | |||
import com.vaadin.shared.MouseEventDetails; | |||
import com.vaadin.shared.ui.grid.renderers.RendererClickRpc; | |||
import com.vaadin.util.ReflectTools; | |||
import com.vaadin.v7.shared.ui.grid.renderers.RendererClickRpc; | |||
import com.vaadin.v7.ui.Grid; | |||
import com.vaadin.v7.ui.Grid.AbstractRenderer; | |||
import com.vaadin.v7.ui.Grid.Column; |
@@ -40,10 +40,10 @@ import org.junit.Before; | |||
import org.junit.Test; | |||
import com.vaadin.server.KeyMapper; | |||
import com.vaadin.shared.ui.grid.GridColumnState; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.shared.util.SharedUtil; | |||
import com.vaadin.v7.data.util.IndexedContainer; | |||
import com.vaadin.v7.shared.ui.grid.GridColumnState; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import com.vaadin.v7.ui.Grid; | |||
import com.vaadin.v7.ui.Grid.Column; | |||
import com.vaadin.v7.ui.Grid.ColumnResizeEvent; |
@@ -18,7 +18,7 @@ package com.vaadin.v7.tests.server.component.grid; | |||
import org.junit.Assert; | |||
import org.junit.Test; | |||
import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.v7.shared.ui.grid.GridState; | |||
import com.vaadin.v7.ui.Grid; | |||
/** |
@@ -19,8 +19,8 @@ import static org.junit.Assert.assertSame; | |||
import org.junit.Test; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.tests.design.DeclarativeTestBase; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.ui.Grid; | |||
import com.vaadin.v7.ui.Grid.MultiSelectionModel; | |||
import com.vaadin.v7.ui.Grid.NoSelectionModel; |
@@ -0,0 +1,45 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import java.io.Serializable; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* The column group data shared between the server and the client | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public class ColumnGroupState implements Serializable { | |||
/** | |||
* The columns that is included in the group | |||
*/ | |||
public List<String> columns = new ArrayList<String>(); | |||
/** | |||
* The header text of the group | |||
*/ | |||
public String header; | |||
/** | |||
* The footer text of the group | |||
*/ | |||
public String footer; | |||
} |
@@ -0,0 +1,189 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import java.io.Serializable; | |||
import java.util.Comparator; | |||
import com.vaadin.shared.Connector; | |||
/** | |||
* A description of an indexing modification for a connector. This is used by | |||
* Grid for internal bookkeeping updates. | |||
* | |||
* @since 7.5.0 | |||
* @author Vaadin Ltd | |||
*/ | |||
public class DetailsConnectorChange implements Serializable { | |||
public static final Comparator<DetailsConnectorChange> REMOVED_FIRST_COMPARATOR = new Comparator<DetailsConnectorChange>() { | |||
@Override | |||
public int compare(DetailsConnectorChange a, DetailsConnectorChange b) { | |||
boolean deleteA = a.getNewIndex() == null; | |||
boolean deleteB = b.getNewIndex() == null; | |||
if (deleteA && !deleteB) { | |||
return -1; | |||
} else if (!deleteA && deleteB) { | |||
return 1; | |||
} else { | |||
return 0; | |||
} | |||
} | |||
}; | |||
private Connector connector; | |||
private Integer oldIndex; | |||
private Integer newIndex; | |||
private boolean shouldStillBeVisible; | |||
/** Create a new connector index change */ | |||
public DetailsConnectorChange() { | |||
} | |||
/** | |||
* Convenience constructor for setting all the fields in one line. | |||
* <p> | |||
* Calling this constructor will also assert that the state of the pojo is | |||
* consistent by internal assumptions. | |||
* | |||
* @param connector | |||
* the changed connector | |||
* @param oldIndex | |||
* the old index | |||
* @param newIndex | |||
* the new index | |||
* @param shouldStillBeVisible | |||
* details should be visible regardless of {@code connector} | |||
*/ | |||
public DetailsConnectorChange(Connector connector, Integer oldIndex, | |||
Integer newIndex, boolean shouldStillBeVisible) { | |||
this.connector = connector; | |||
this.oldIndex = oldIndex; | |||
this.newIndex = newIndex; | |||
this.shouldStillBeVisible = shouldStillBeVisible; | |||
assert assertStateIsOk(); | |||
} | |||
private boolean assertStateIsOk() { | |||
boolean connectorAndNewIndexIsNotNull = connector != null | |||
&& newIndex != null; | |||
boolean connectorAndNewIndexIsNullThenOldIndexIsSet = connector == null | |||
&& newIndex == null && oldIndex != null; | |||
assert (connectorAndNewIndexIsNotNull | |||
|| connectorAndNewIndexIsNullThenOldIndexIsSet) : "connector: " | |||
+ nullityString(connector) + ", oldIndex: " | |||
+ nullityString(oldIndex) + ", newIndex: " | |||
+ nullityString(newIndex); | |||
return true; | |||
} | |||
private static String nullityString(Object object) { | |||
return object == null ? "null" : "non-null"; | |||
} | |||
/** | |||
* Gets the old index for the connector. | |||
* <p> | |||
* If <code>null</code>, the connector is recently added. This means that | |||
* {@link #getConnector()} is expected not to return <code>null</code>. | |||
* | |||
* @return the old index for the connector | |||
*/ | |||
public Integer getOldIndex() { | |||
assert assertStateIsOk(); | |||
return oldIndex; | |||
} | |||
/** | |||
* Gets the new index for the connector. | |||
* <p> | |||
* If <code>null</code>, the connector should be removed. This means that | |||
* {@link #getConnector()} is expected to return <code>null</code> as well. | |||
* | |||
* @return the new index for the connector | |||
*/ | |||
public Integer getNewIndex() { | |||
assert assertStateIsOk(); | |||
return newIndex; | |||
} | |||
/** | |||
* Gets the changed connector. | |||
* | |||
* @return the changed connector. Might be <code>null</code> | |||
*/ | |||
public Connector getConnector() { | |||
assert assertStateIsOk(); | |||
return connector; | |||
} | |||
/** | |||
* Sets the changed connector. | |||
* | |||
* @param connector | |||
* the changed connector. May be <code>null</code> | |||
*/ | |||
public void setConnector(Connector connector) { | |||
this.connector = connector; | |||
} | |||
/** | |||
* Sets the old index | |||
* | |||
* @param oldIndex | |||
* the old index. May be <code>null</code> if a new connector is | |||
* being inserted | |||
*/ | |||
public void setOldIndex(Integer oldIndex) { | |||
this.oldIndex = oldIndex; | |||
} | |||
/** | |||
* Sets the new index | |||
* | |||
* @param newIndex | |||
* the new index. May be <code>null</code> if a connector is | |||
* being removed | |||
*/ | |||
public void setNewIndex(Integer newIndex) { | |||
this.newIndex = newIndex; | |||
} | |||
/** | |||
* Checks whether whether the details should remain open, even if connector | |||
* might be <code>null</code>. | |||
* | |||
* @return <code>true</code> iff the details should remain open, even if | |||
* connector might be <code>null</code> | |||
*/ | |||
public boolean isShouldStillBeVisible() { | |||
return shouldStillBeVisible; | |||
} | |||
/** | |||
* Sets whether the details should remain open, even if connector might be | |||
* <code>null</code>. | |||
* | |||
* @param shouldStillBeVisible | |||
* <code>true</code> iff the details should remain open, even if | |||
* connector might be <code>null</code> | |||
*/ | |||
public void setShouldStillBeVisible(boolean shouldStillBeVisible) { | |||
this.shouldStillBeVisible = shouldStillBeVisible; | |||
} | |||
} |
@@ -0,0 +1,69 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import java.util.List; | |||
import com.vaadin.shared.communication.ClientRpc; | |||
/** | |||
* An RPC interface for the grid editor server-to-client communications. | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public interface EditorClientRpc extends ClientRpc { | |||
/** | |||
* Tells the client to open the editor and bind data to it. | |||
* | |||
* @param rowIndex | |||
* the index of the edited row | |||
*/ | |||
void bind(int rowIndex); | |||
/** | |||
* Tells the client to cancel editing and hide the editor. | |||
* | |||
* @param rowIndex | |||
* the index of the edited row | |||
*/ | |||
void cancel(int rowIndex); | |||
/** | |||
* Confirms a pending {@link EditorServerRpc#bind(int) bind request} sent by | |||
* the client. | |||
* | |||
* @param bindSucceeded | |||
* <code>true</code> iff the bind action was successful | |||
*/ | |||
void confirmBind(boolean bindSucceeded); | |||
/** | |||
* Confirms a pending {@link EditorServerRpc#save(int) save request} sent by | |||
* the client. | |||
* | |||
* @param saveSucceeded | |||
* <code>true</code> iff the save action was successful | |||
* @param errorMessage | |||
* the error message to show the user | |||
* @param errorColumnsIds | |||
* a list of column keys that should get error markers, or | |||
* <code>null</code> if there should be no error markers | |||
*/ | |||
void confirmSave(boolean saveSucceeded, String errorMessage, | |||
List<String> errorColumnsIds); | |||
} |
@@ -0,0 +1,58 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import com.vaadin.shared.communication.ServerRpc; | |||
/** | |||
* An RPC interface for the grid editor client-to-server communications. | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public interface EditorServerRpc extends ServerRpc { | |||
/** | |||
* Asks the server to open the editor and bind data to it. When a bind | |||
* request is sent, it must be acknowledged with a | |||
* {@link EditorClientRpc#confirmBind() confirm call} before the client can | |||
* open the editor. | |||
* | |||
* @param rowIndex | |||
* the index of the edited row | |||
*/ | |||
void bind(int rowIndex); | |||
/** | |||
* Asks the server to save unsaved changes in the editor to the data source. | |||
* When a save request is sent, it must be acknowledged with a | |||
* {@link EditorClientRpc#confirmSave() confirm call}. | |||
* | |||
* @param rowIndex | |||
* the index of the edited row | |||
*/ | |||
void save(int rowIndex); | |||
/** | |||
* Tells the server to cancel editing. When sending a cancel request, the | |||
* client does not need to wait for confirmation by the server before hiding | |||
* the editor. | |||
* | |||
* @param rowIndex | |||
* the index of the edited row | |||
*/ | |||
void cancel(int rowIndex); | |||
} |
@@ -0,0 +1,58 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import com.vaadin.shared.communication.ClientRpc; | |||
/** | |||
* Server-to-client RPC interface for the Grid component. | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public interface GridClientRpc extends ClientRpc { | |||
/** | |||
* Command client Grid to scroll to a specific data row and its (optional) | |||
* details. | |||
* | |||
* @param row | |||
* zero-based row index. If the row index is below zero or above | |||
* the row count of the client-side data source, a client-side | |||
* exception will be triggered. Since this exception has no | |||
* handling by default, an out-of-bounds value will cause a | |||
* client-side crash. | |||
* @param destination | |||
* desired placement of scrolled-to row. See the documentation | |||
* for {@link ScrollDestination} for more information. | |||
*/ | |||
public void scrollToRow(int row, ScrollDestination destination); | |||
/** | |||
* Command client Grid to scroll to the first row. | |||
*/ | |||
public void scrollToStart(); | |||
/** | |||
* Command client Grid to scroll to the last row. | |||
*/ | |||
public void scrollToEnd(); | |||
/** | |||
* Command client Grid to recalculate column widths. | |||
*/ | |||
public void recalculateColumnWidths(); | |||
} |
@@ -0,0 +1,94 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import java.io.Serializable; | |||
import com.vaadin.shared.Connector; | |||
/** | |||
* Column state DTO for transferring column properties from the server to the | |||
* client | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public class GridColumnState implements Serializable { | |||
/** | |||
* Id used by grid connector to map server side column with client side | |||
* column | |||
*/ | |||
public String id; | |||
/** | |||
* Column width in pixels. Default column width is | |||
* {@value GridConstants#DEFAULT_COLUMN_WIDTH_PX}. | |||
*/ | |||
public double width = GridConstants.DEFAULT_COLUMN_WIDTH_PX; | |||
/** | |||
* The connector for the renderer used to render the cells in this column. | |||
*/ | |||
public Connector rendererConnector; | |||
/** | |||
* Whether the values in this column are editable when the editor interface | |||
* is active. | |||
*/ | |||
public boolean editable = true; | |||
/** | |||
* The connector for the field used to edit cells in this column when the | |||
* editor interface is active. | |||
*/ | |||
public Connector editorConnector; | |||
/** | |||
* Whether this column is sortable by the user | |||
*/ | |||
public boolean sortable = false; | |||
/** How much of the remaining space this column will reserve. */ | |||
public int expandRatio = GridConstants.DEFAULT_EXPAND_RATIO; | |||
/** | |||
* The maximum expansion width of this column. -1 for "no maximum". If | |||
* maxWidth is less than the calculated width, maxWidth is ignored. | |||
*/ | |||
public double maxWidth = GridConstants.DEFAULT_MAX_WIDTH; | |||
/** | |||
* The minimum expansion width of this column. -1 for "no minimum". If | |||
* minWidth is less than the calculated width, minWidth will win. | |||
*/ | |||
public double minWidth = GridConstants.DEFAULT_MIN_WIDTH; | |||
/** Whether this column is currently hidden. */ | |||
public boolean hidden = false; | |||
/** Whether the column can be hidden by the user. */ | |||
public boolean hidable = false; | |||
/** The caption for the column hiding toggle. */ | |||
public String hidingToggleCaption; | |||
/** Column header caption */ | |||
public String headerCaption; | |||
/** Whether this column is resizable by the user. */ | |||
public boolean resizable = true; | |||
} |
@@ -0,0 +1,101 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import java.io.Serializable; | |||
/** | |||
* Container class for common constants and default values used by the Grid | |||
* component. | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public final class GridConstants implements Serializable { | |||
/** | |||
* Enum describing different sections of Grid. | |||
* | |||
* @since 7.6 | |||
*/ | |||
public enum Section { | |||
HEADER, BODY, FOOTER | |||
} | |||
/** | |||
* Default padding in pixels when scrolling programmatically, without an | |||
* explicitly defined padding value. | |||
*/ | |||
public static final int DEFAULT_PADDING = 0; | |||
/** | |||
* Delay before a long tap action is triggered. Number in milliseconds. | |||
*/ | |||
public static final int LONG_TAP_DELAY = 500; | |||
/** | |||
* The threshold in pixels a finger can move while long tapping. | |||
*/ | |||
public static final int LONG_TAP_THRESHOLD = 3; | |||
/* Column constants */ | |||
/** | |||
* Default maximum width for columns. | |||
*/ | |||
public static final double DEFAULT_MAX_WIDTH = -1; | |||
/** | |||
* Default minimum width for columns. | |||
*/ | |||
public static final double DEFAULT_MIN_WIDTH = 10.0d; | |||
/** | |||
* Default expand ratio for columns. | |||
*/ | |||
public static final int DEFAULT_EXPAND_RATIO = -1; | |||
/** | |||
* Default width for columns. | |||
*/ | |||
public static final double DEFAULT_COLUMN_WIDTH_PX = -1; | |||
/** | |||
* Event ID for item click events | |||
*/ | |||
public static final String ITEM_CLICK_EVENT_ID = "itemClick"; | |||
/** The default save button caption in the editor */ | |||
public static final String DEFAULT_SAVE_CAPTION = "Save"; | |||
/** The default cancel button caption in the editor */ | |||
public static final String DEFAULT_CANCEL_CAPTION = "Cancel"; | |||
/** | |||
* Event ID constant for editor open event | |||
*/ | |||
public static final String EDITOR_OPEN_EVENT_ID = "editorOpen"; | |||
/** | |||
* Event ID constant for editor move event | |||
*/ | |||
public static final String EDITOR_MOVE_EVENT_ID = "editorMove"; | |||
/** | |||
* Event ID constant for editor close event | |||
*/ | |||
public static final String EDITOR_CLOSE_EVENT_ID = "editorClose"; | |||
} |
@@ -0,0 +1,103 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import java.util.List; | |||
import com.vaadin.shared.MouseEventDetails; | |||
import com.vaadin.shared.communication.ServerRpc; | |||
import com.vaadin.shared.data.sort.SortDirection; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
/** | |||
* Client-to-server RPC interface for the Grid component | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public interface GridServerRpc extends ServerRpc { | |||
void sort(String[] columnIds, SortDirection[] directions, | |||
boolean userOriginated); | |||
/** | |||
* Informs the server that an item has been clicked in Grid. | |||
* | |||
* @param rowKey | |||
* a key identifying the clicked item | |||
* @param columnId | |||
* column id identifying the clicked property | |||
* @param details | |||
* mouse event details | |||
*/ | |||
void itemClick(String rowKey, String columnId, MouseEventDetails details); | |||
/** | |||
* Informs the server that a context click has happened inside of Grid. | |||
* | |||
* @since 7.6 | |||
* @param rowIndex | |||
* index of clicked row in Grid section | |||
* @param rowKey | |||
* a key identifying the clicked item | |||
* @param columnId | |||
* column id identifying the clicked property | |||
* @param section | |||
* grid section (header, footer, body) | |||
* @param details | |||
* mouse event details | |||
*/ | |||
void contextClick(int rowIndex, String rowKey, String columnId, | |||
Section section, MouseEventDetails details); | |||
/** | |||
* Informs the server that the columns of the Grid have been reordered. | |||
* | |||
* @since 7.5.0 | |||
* @param newColumnOrder | |||
* a list of column ids in the new order | |||
* @param oldColumnOrder | |||
* a list of column ids in order before the change | |||
*/ | |||
void columnsReordered(List<String> newColumnOrder, | |||
List<String> oldColumnOrder); | |||
/** | |||
* Informs the server that a column's visibility has been changed. | |||
* | |||
* @since 7.5.0 | |||
* @param id | |||
* the id of the column | |||
* @param hidden | |||
* <code>true</code> if hidden, <code>false</code> if unhidden | |||
* @param userOriginated | |||
* <code>true</code> if triggered by user, <code>false</code> if | |||
* by code | |||
*/ | |||
void columnVisibilityChanged(String id, boolean hidden, | |||
boolean userOriginated); | |||
/** | |||
* Informs the server that a column has been resized by the user. | |||
* | |||
* @since 7.6 | |||
* @param id | |||
* the id of the column | |||
* @param pixels | |||
* the new width of the column in pixels | |||
*/ | |||
void columnResized(String id, double pixels); | |||
} |
@@ -0,0 +1,205 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import com.vaadin.shared.annotations.DelegateToWidget; | |||
import com.vaadin.shared.data.sort.SortDirection; | |||
import com.vaadin.shared.ui.TabIndexState; | |||
/** | |||
* The shared state for the {@link com.vaadin.ui.components.grid.Grid} component | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public class GridState extends TabIndexState { | |||
/** | |||
* A description of which of the three bundled SelectionModels is currently | |||
* in use. | |||
* <p> | |||
* Used as a data transfer object instead of the client/server ones, because | |||
* they don't know about each others classes. | |||
* | |||
* @see com.vaadin.ui.components.grid.Grid.SelectionMode | |||
* @see com.vaadin.client.ui.grid.Grid.SelectionMode | |||
*/ | |||
public enum SharedSelectionMode { | |||
/** | |||
* Representation of a single selection mode | |||
* | |||
* @see com.vaadin.ui.components.grid.Grid.SelectionMode#SINGLE | |||
* @see com.vaadin.client.ui.grid.Grid.SelectionMode#SINGLE | |||
*/ | |||
SINGLE, | |||
/** | |||
* Representation of a multiselection mode | |||
* | |||
* @see com.vaadin.ui.components.grid.Grid.SelectionMode#MULTI | |||
* @see com.vaadin.client.ui.grid.Grid.SelectionMode#MULTI | |||
*/ | |||
MULTI, | |||
/** | |||
* Representation of a no-selection mode | |||
* | |||
* @see com.vaadin.ui.components.grid.Grid.SelectionMode#NONE | |||
* @see com.vaadin.client.ui.grid.Grid.SelectionMode#NONE | |||
*/ | |||
NONE; | |||
} | |||
/** | |||
* The default value for height-by-rows for both GWT widgets | |||
* {@link com.vaadin.ui.components.grid Grid} and | |||
* {@link com.vaadin.client.ui.grid.Escalator Escalator} | |||
*/ | |||
public static final double DEFAULT_HEIGHT_BY_ROWS = 10.0d; | |||
/** | |||
* The key in which a row's data can be found | |||
* | |||
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) | |||
*/ | |||
public static final String JSONKEY_DATA = "d"; | |||
/** | |||
* The key in which a row's own key can be found | |||
* | |||
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) | |||
*/ | |||
public static final String JSONKEY_ROWKEY = "k"; | |||
/** | |||
* The key in which a row's generated style can be found | |||
* | |||
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) | |||
*/ | |||
public static final String JSONKEY_ROWSTYLE = "rs"; | |||
/** | |||
* The key in which a generated styles for a row's cells can be found | |||
* | |||
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) | |||
*/ | |||
public static final String JSONKEY_CELLSTYLES = "cs"; | |||
/** | |||
* The key in which a row's description can be found | |||
* | |||
* @since 7.6 | |||
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) | |||
*/ | |||
public static final String JSONKEY_ROWDESCRIPTION = "rd"; | |||
/** | |||
* The key in which a cell's description can be found | |||
* | |||
* @since 7.6 | |||
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) | |||
*/ | |||
public static final String JSONKEY_CELLDESCRIPTION = "cd"; | |||
/** | |||
* The key that tells whether details are visible for the row. | |||
* | |||
* @since 7.5.0 | |||
* | |||
* @see com.vaadin.ui.Grid#setDetailsGenerator(com.vaadin.ui.Grid.DetailsGenerator) | |||
* @see com.vaadin.ui.Grid#setDetailsVisible(Object, boolean) | |||
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, | |||
* elemental.json.JsonArray) | |||
*/ | |||
public static final String JSONKEY_DETAILS_VISIBLE = "dv"; | |||
/** | |||
* The key that tells whether row is selected. | |||
* | |||
* @since 7.6 | |||
*/ | |||
public static final String JSONKEY_SELECTED = "s"; | |||
{ | |||
primaryStyleName = "v-grid"; | |||
} | |||
/** | |||
* Columns in grid. | |||
*/ | |||
public List<GridColumnState> columns = new ArrayList<GridColumnState>(); | |||
/** | |||
* Column order in grid. | |||
*/ | |||
public List<String> columnOrder = new ArrayList<String>(); | |||
public GridStaticSectionState header = new GridStaticSectionState(); | |||
public GridStaticSectionState footer = new GridStaticSectionState(); | |||
/** The number of frozen columns */ | |||
public int frozenColumnCount = 0; | |||
/** The height of the Grid in terms of body rows. */ | |||
@DelegateToWidget | |||
public double heightByRows = DEFAULT_HEIGHT_BY_ROWS; | |||
/** The mode by which Grid defines its height. */ | |||
@DelegateToWidget | |||
public HeightMode heightMode = HeightMode.CSS; | |||
/** Keys of the currently sorted columns */ | |||
public String[] sortColumns = new String[0]; | |||
/** Directions for each sorted column */ | |||
public SortDirection[] sortDirs = new SortDirection[0]; | |||
/** The enabled state of the editor interface */ | |||
public boolean editorEnabled = false; | |||
/** | |||
* Buffered editor mode | |||
* | |||
* @since 7.6 | |||
*/ | |||
@DelegateToWidget | |||
public boolean editorBuffered = true; | |||
/** | |||
* Whether rows and/or cells have generated descriptions (tooltips) | |||
* | |||
* @since 7.6 | |||
*/ | |||
public boolean hasDescriptions; | |||
/** The caption for the save button in the editor */ | |||
@DelegateToWidget | |||
public String editorSaveCaption = GridConstants.DEFAULT_SAVE_CAPTION; | |||
/** The caption for the cancel button in the editor */ | |||
@DelegateToWidget | |||
public String editorCancelCaption = GridConstants.DEFAULT_CANCEL_CAPTION; | |||
/** Whether the columns can be reordered */ | |||
@DelegateToWidget | |||
public boolean columnReorderingAllowed; | |||
} |
@@ -0,0 +1,39 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
/** | |||
* Enumeration, specifying the content type of a Cell in a GridStaticSection. | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public enum GridStaticCellType { | |||
/** | |||
* Text content | |||
*/ | |||
TEXT, | |||
/** | |||
* HTML content | |||
*/ | |||
HTML, | |||
/** | |||
* Widget content | |||
*/ | |||
WIDGET; | |||
} |
@@ -0,0 +1,68 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
import java.io.Serializable; | |||
import java.util.ArrayList; | |||
import java.util.HashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Set; | |||
import com.vaadin.shared.Connector; | |||
/** | |||
* Shared state for Grid headers and footers. | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public class GridStaticSectionState implements Serializable { | |||
public static class CellState implements Serializable { | |||
public String text = ""; | |||
public String html = ""; | |||
public Connector connector = null; | |||
public GridStaticCellType type = GridStaticCellType.TEXT; | |||
public String columnId; | |||
public String styleName = null; | |||
} | |||
public static class RowState implements Serializable { | |||
public List<CellState> cells = new ArrayList<CellState>(); | |||
public boolean defaultRow = false; | |||
/** | |||
* Map from column id set to cell state for merged state. | |||
*/ | |||
public Map<Set<String>, CellState> cellGroups = new HashMap<Set<String>, CellState>(); | |||
/** | |||
* The style name for the row. Null if none. | |||
*/ | |||
public String styleName = null; | |||
} | |||
public List<RowState> rows = new ArrayList<RowState>(); | |||
public boolean visible = true; | |||
} |
@@ -0,0 +1,48 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
/** | |||
* The modes for height calculation that are supported by Grid ( | |||
* {@link com.vaadin.client.ui.grid.Grid client} and | |||
* {@link com.vaadin.ui.components.grid.Grid server}) / | |||
* {@link com.vaadin.client.ui.grid.Escalator Escalator}. | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
* @see com.vaadin.client.ui.grid.Grid#setHeightMode(HeightMode) | |||
* @see com.vaadin.ui.components.grid.Grid#setHeightMode(HeightMode) | |||
* @see com.vaadin.client.ui.grid.Escalator#setHeightMode(HeightMode) | |||
*/ | |||
public enum HeightMode { | |||
/** | |||
* The height of the Component or Widget is defined by a CSS-like value. | |||
* (e.g. "100px", "50em" or "25%") | |||
*/ | |||
CSS, | |||
/** | |||
* The height of the Component or Widget in question is defined by a number | |||
* of rows. | |||
*/ | |||
ROW, | |||
/** | |||
* The height of the Component or Widget in question is defined by its | |||
* contents. | |||
*/ | |||
UNDEFINED; | |||
} |
@@ -0,0 +1,55 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid; | |||
/** | |||
* Enumeration, specifying the destinations that are supported when scrolling | |||
* rows or columns into view. | |||
* | |||
* @since 7.4 | |||
* @author Vaadin Ltd | |||
*/ | |||
public enum ScrollDestination { | |||
/** | |||
* Scroll as little as possible to show the target element. If the element | |||
* fits into view, this works as START or END depending on the current | |||
* scroll position. If the element does not fit into view, this works as | |||
* START. | |||
*/ | |||
ANY, | |||
/** | |||
* Scrolls so that the element is shown at the start of the viewport. The | |||
* viewport will, however, not scroll beyond its contents. | |||
*/ | |||
START, | |||
/** | |||
* Scrolls so that the element is shown in the middle of the viewport. The | |||
* viewport will, however, not scroll beyond its contents, given more | |||
* elements than what the viewport is able to show at once. Under no | |||
* circumstances will the viewport scroll before its first element. | |||
*/ | |||
MIDDLE, | |||
/** | |||
* Scrolls so that the element is shown at the end of the viewport. The | |||
* viewport will, however, not scroll before its first element. | |||
*/ | |||
END | |||
} |
@@ -0,0 +1,31 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid.renderers; | |||
import com.vaadin.shared.MouseEventDetails; | |||
import com.vaadin.shared.communication.ServerRpc; | |||
public interface RendererClickRpc extends ServerRpc { | |||
/** | |||
* Called when a click event has occurred and there are server side | |||
* listeners for the event. | |||
* | |||
* @param mouseDetails | |||
* Details about the mouse when the event took place | |||
*/ | |||
public void click(String rowKey, String columnId, | |||
MouseEventDetails mouseDetails); | |||
} |
@@ -0,0 +1,55 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid.selection; | |||
import java.util.List; | |||
import com.vaadin.shared.communication.ServerRpc; | |||
/** | |||
* ServerRpc for MultiSelectionModel. | |||
* | |||
* @since 7.6 | |||
* @author Vaadin Ltd | |||
*/ | |||
public interface MultiSelectionModelServerRpc extends ServerRpc { | |||
/** | |||
* Select a list of rows based on their row keys on the server-side. | |||
* | |||
* @param rowKeys | |||
* list of row keys to select | |||
*/ | |||
public void select(List<String> rowKeys); | |||
/** | |||
* Deselect a list of rows based on their row keys on the server-side. | |||
* | |||
* @param rowKeys | |||
* list of row keys to deselect | |||
*/ | |||
public void deselect(List<String> rowKeys); | |||
/** | |||
* Selects all rows on the server-side. | |||
*/ | |||
public void selectAll(); | |||
/** | |||
* Deselects all rows on the server-side. | |||
*/ | |||
public void deselectAll(); | |||
} |
@@ -0,0 +1,31 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid.selection; | |||
import com.vaadin.shared.communication.SharedState; | |||
/** | |||
* SharedState object for MultiSelectionModel. | |||
* | |||
* @since 7.6 | |||
* @author Vaadin Ltd | |||
*/ | |||
public class MultiSelectionModelState extends SharedState { | |||
/* Select All -checkbox status */ | |||
public boolean allSelected; | |||
} |
@@ -0,0 +1,35 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid.selection; | |||
import com.vaadin.shared.communication.ServerRpc; | |||
/** | |||
* ServerRpc for SingleSelectionModel. | |||
* | |||
* @since 7.6 | |||
* @author Vaadin Ltd | |||
*/ | |||
public interface SingleSelectionModelServerRpc extends ServerRpc { | |||
/** | |||
* Selects a row on server-side. | |||
* | |||
* @param rowKey | |||
* row key of selected row; {@code null} if deselect | |||
*/ | |||
public void select(String rowKey); | |||
} |
@@ -0,0 +1,30 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
* License for the specific language governing permissions and limitations under | |||
* the License. | |||
*/ | |||
package com.vaadin.v7.shared.ui.grid.selection; | |||
import com.vaadin.shared.communication.SharedState; | |||
/** | |||
* SharedState object for SingleSelectionModel. | |||
* | |||
* @since 7.6 | |||
* @author Vaadin Ltd | |||
*/ | |||
public class SingleSelectionModelState extends SharedState { | |||
/* Allow deselecting rows */ | |||
public boolean deselectAllowed = true; | |||
} |
@@ -20,7 +20,6 @@ import java.util.HashMap; | |||
import java.util.Map; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.Alignment; | |||
import com.vaadin.ui.Component; | |||
@@ -31,6 +30,7 @@ import com.vaadin.v7.data.Property.ValueChangeEvent; | |||
import com.vaadin.v7.data.Property.ValueChangeListener; | |||
import com.vaadin.v7.event.ItemClickEvent; | |||
import com.vaadin.v7.event.ItemClickEvent.ItemClickListener; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.ui.Grid; | |||
import com.vaadin.v7.ui.Grid.DetailsGenerator; | |||
import com.vaadin.v7.ui.Grid.RowReference; |
@@ -4,11 +4,11 @@ import java.util.Arrays; | |||
import java.util.List; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.TabSheet; | |||
import com.vaadin.ui.VerticalLayout; | |||
import com.vaadin.v7.data.Property; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.ui.Grid; | |||
import com.vaadin.v7.ui.NativeSelect; | |||
@@ -16,7 +16,6 @@ | |||
package com.vaadin.tests.components.grid; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.tests.components.AbstractTestUI; | |||
import com.vaadin.ui.Button; | |||
import com.vaadin.ui.Button.ClickEvent; | |||
@@ -25,6 +24,7 @@ import com.vaadin.ui.HorizontalLayout; | |||
import com.vaadin.ui.VerticalLayout; | |||
import com.vaadin.v7.data.Item; | |||
import com.vaadin.v7.data.util.IndexedContainer; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.v7.ui.Grid; | |||
@SuppressWarnings("serial") |
@@ -35,8 +35,6 @@ import com.vaadin.event.SelectionEvent.SelectionListener; | |||
import com.vaadin.event.SortEvent; | |||
import com.vaadin.event.SortEvent.SortListener; | |||
import com.vaadin.shared.data.sort.SortDirection; | |||
import com.vaadin.shared.ui.grid.GridStaticCellType; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.tests.components.AbstractComponentTest; | |||
import com.vaadin.ui.Button; | |||
import com.vaadin.ui.Button.ClickEvent; | |||
@@ -55,6 +53,8 @@ import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException; | |||
import com.vaadin.v7.data.util.IndexedContainer; | |||
import com.vaadin.v7.event.ItemClickEvent; | |||
import com.vaadin.v7.event.ItemClickEvent.ItemClickListener; | |||
import com.vaadin.v7.shared.ui.grid.GridStaticCellType; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.ui.Field; | |||
import com.vaadin.v7.ui.Grid; | |||
import com.vaadin.v7.ui.Grid.CellDescriptionGenerator; |
@@ -18,10 +18,10 @@ package com.vaadin.tests.components.grid.basicfeatures; | |||
import com.vaadin.annotations.Theme; | |||
import com.vaadin.annotations.Title; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.ui.UI; | |||
import com.vaadin.ui.themes.ValoTheme; | |||
import com.vaadin.v7.data.Container; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.ui.Grid; | |||
@Title("Server Grid height by row on init") |
@@ -15,12 +15,12 @@ | |||
*/ | |||
package com.vaadin.tests.contextclick; | |||
import com.vaadin.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.tests.util.PersonContainer; | |||
import com.vaadin.ui.Button; | |||
import com.vaadin.ui.Button.ClickEvent; | |||
import com.vaadin.ui.HorizontalLayout; | |||
import com.vaadin.v7.data.Item; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants.Section; | |||
import com.vaadin.v7.ui.Grid; | |||
import com.vaadin.v7.ui.Grid.GridContextClickEvent; | |||
@@ -17,8 +17,8 @@ package com.vaadin.tests.minitutorials.v7_4; | |||
import com.vaadin.annotations.Theme; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.ui.UI; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.ui.Grid; | |||
@Theme("valo") |
@@ -9,7 +9,6 @@ import com.google.gwt.dom.client.TableCellElement; | |||
import com.google.gwt.user.client.DOM; | |||
import com.google.gwt.user.client.ui.Composite; | |||
import com.google.gwt.user.client.ui.HTML; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.v7.client.widget.escalator.EscalatorUpdater; | |||
import com.vaadin.v7.client.widget.escalator.FlyweightCell; | |||
import com.vaadin.v7.client.widget.escalator.Row; | |||
@@ -18,6 +17,7 @@ import com.vaadin.v7.client.widget.escalator.Spacer; | |||
import com.vaadin.v7.client.widget.escalator.SpacerUpdater; | |||
import com.vaadin.v7.client.widget.escalator.RowContainer.BodyRowContainer; | |||
import com.vaadin.v7.client.widgets.Escalator; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
public class EscalatorBasicClientFeaturesWidget | |||
extends PureGWTTestApplication<Escalator> { |
@@ -47,7 +47,6 @@ import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.client.data.DataSource; | |||
import com.vaadin.client.data.DataSource.RowHandle; | |||
import com.vaadin.client.ui.VLabel; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.tests.widgetset.client.grid.GridBasicClientFeaturesWidget.Data; | |||
import com.vaadin.v7.client.renderers.DateRenderer; | |||
import com.vaadin.v7.client.renderers.HtmlRenderer; | |||
@@ -89,6 +88,7 @@ import com.vaadin.v7.client.widgets.Grid.Column; | |||
import com.vaadin.v7.client.widgets.Grid.FooterRow; | |||
import com.vaadin.v7.client.widgets.Grid.HeaderRow; | |||
import com.vaadin.v7.client.widgets.Grid.SelectionMode; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
/** | |||
* Grid basic client features test application. |
@@ -15,11 +15,11 @@ | |||
*/ | |||
package com.vaadin.tests.widgetset.client.grid; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.client.widget.grid.datasources.ListDataSource; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.Column; | |||
import com.vaadin.v7.client.widgets.Grid.SelectionMode; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
public class GridDefaultTextRendererWidget | |||
extends PureGWTTestApplication<Grid<String>> { |
@@ -4,10 +4,10 @@ import java.util.Arrays; | |||
import com.google.gwt.user.client.ui.Composite; | |||
import com.google.gwt.user.client.ui.SimplePanel; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.v7.client.widget.grid.datasources.ListDataSource; | |||
import com.vaadin.v7.client.widgets.Grid; | |||
import com.vaadin.v7.client.widgets.Grid.Column; | |||
import com.vaadin.v7.shared.ui.grid.HeightMode; | |||
public class GridHeightByRowOnInitWidget extends Composite { | |||
private final SimplePanel panel = new SimplePanel(); |
@@ -31,12 +31,12 @@ import org.openqa.selenium.NoSuchElementException; | |||
import org.openqa.selenium.WebElement; | |||
import com.vaadin.shared.ui.grid.Range; | |||
import com.vaadin.shared.ui.grid.ScrollDestination; | |||
import com.vaadin.testbench.By; | |||
import com.vaadin.testbench.ElementQuery; | |||
import com.vaadin.testbench.TestBenchElement; | |||
import com.vaadin.testbench.customelements.FixedNotificationElement; | |||
import com.vaadin.tests.components.grid.basicfeatures.GridBasicClientFeaturesTest; | |||
import com.vaadin.v7.shared.ui.grid.ScrollDestination; | |||
public class GridDetailsClientTest extends GridBasicClientFeaturesTest { | |||
@@ -32,12 +32,12 @@ import org.openqa.selenium.NoSuchElementException; | |||
import org.openqa.selenium.WebElement; | |||
import org.openqa.selenium.interactions.Actions; | |||
import com.vaadin.shared.ui.grid.GridConstants; | |||
import com.vaadin.testbench.elements.GridElement.GridCellElement; | |||
import com.vaadin.testbench.elements.GridElement.GridEditorElement; | |||
import com.vaadin.testbench.parallel.BrowserUtil; | |||
import com.vaadin.tests.components.grid.basicfeatures.GridBasicClientFeaturesTest; | |||
import com.vaadin.tests.components.grid.basicfeatures.GridBasicFeatures; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants; | |||
public class GridEditorClientTest extends GridBasicClientFeaturesTest { | |||
@@ -28,10 +28,10 @@ import org.openqa.selenium.NoSuchElementException; | |||
import org.openqa.selenium.WebElement; | |||
import org.openqa.selenium.interactions.Actions; | |||
import com.vaadin.shared.ui.grid.GridConstants; | |||
import com.vaadin.testbench.TestBenchElement; | |||
import com.vaadin.testbench.elements.GridElement.GridCellElement; | |||
import com.vaadin.testbench.elements.GridElement.GridEditorElement; | |||
import com.vaadin.v7.shared.ui.grid.GridConstants; | |||
import com.vaadin.testbench.elements.NotificationElement; | |||
public class GridEditorBufferedTest extends GridEditorTest { |