Skip to content

Commit 4806947

Browse files
authored
Applied save actions to compatibility Grid client-side classes. (#12389)
1 parent c83f6bf commit 4806947

File tree

9 files changed

+107
-96
lines changed

9 files changed

+107
-96
lines changed

compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/ColumnConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ public double getColumnWidthActual(int index)
172172
throws IllegalArgumentException;
173173

174174
/**
175-
* Refreshes a range of columns in the current row containers in each Escalator
176-
* section.
175+
* Refreshes a range of columns in the current row containers in each
176+
* Escalator section.
177177
* <p>
178178
* The data for the refreshed columns is queried from the current cell
179179
* renderer.

compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/EscalatorUpdater.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
* The updater is responsible for internally handling all remote communication,
2727
* should the displayed data need to be fetched remotely.
2828
* <p>
29-
* This has a similar function to {@link com.vaadin.v7.client.widgets.Grid Grid's}
30-
* {@link com.vaadin.v7.client.renderers.Renderer Renderers}
31-
* , although they operate on different abstraction levels.
29+
* This has a similar function to {@link com.vaadin.v7.client.widgets.Grid
30+
* Grid's} {@link com.vaadin.v7.client.renderers.Renderer Renderers} , although
31+
* they operate on different abstraction levels.
3232
*
3333
* @since 7.4
3434
* @author Vaadin Ltd

compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/events/SpacerVisibilityChangedEvent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public static final Type<SpacerVisibilityChangedHandler> getType() {
4242
* Creates a spacer visibility changed event.
4343
*
4444
* @param rowIndex
45-
* index of row to which the spacer belongs
45+
* index of row to which the spacer belongs
4646
* @param visible
47-
* {@code true} if the spacer element is shown, {@code false} if the
48-
* spacer element is hidden
47+
* {@code true} if the spacer element is shown, {@code false} if
48+
* the spacer element is hidden
4949
*/
5050
public SpacerVisibilityChangedEvent(int rowIndex, boolean visible) {
5151
this.rowIndex = rowIndex;
@@ -65,7 +65,7 @@ public int getRowIndex() {
6565
* Gets whether the spacer element is displayed.
6666
*
6767
* @return {@code true} if the spacer element is shown, {@code false} if the
68-
* spacer element is hidden
68+
* spacer element is hidden
6969
*/
7070
public boolean isVisible() {
7171
return visible;

compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/AutoScroller.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,9 @@ private void doScrollAreaChecks(int pageCordinate) {
355355
endBound = Math.max(finalEndBound, pageCordinate);
356356
} else {
357357
/*
358-
* Subsequent runs make sure that the scroll area grows (but doesn't
359-
* shrink) with the finger, but no further than the final bound.
358+
* Subsequent runs make sure that the scroll area grows (but
359+
* doesn't shrink) with the finger, but no further than the
360+
* final bound.
360361
*/
361362
int oldTopBound = startBound;
362363
if (startBound < finalStartBound) {

compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/DataAvailableEvent.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public DataAvailableEvent(Range rowsAvailable) {
3434
}
3535

3636
/**
37-
* Returns the range of available rows in {@link com.vaadin.client.data.DataSource DataSource} for this event.
37+
* Returns the range of available rows in
38+
* {@link com.vaadin.client.data.DataSource DataSource} for this event.
3839
*
3940
* @return range of available rows
4041
*/

compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/selection/AbstractRowHandleSelectionModel.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ public abstract class AbstractRowHandleSelectionModel<T>
3939
*
4040
* @param handle
4141
* the handle to select by
42-
* @return <code>true</code> if the selection state was changed by this
43-
* call
42+
* @return <code>true</code> if the selection state was changed by this call
4443
* @throws UnsupportedOperationException
4544
* if the selection model does not support either handles or
4645
* selection
@@ -55,8 +54,7 @@ public abstract class AbstractRowHandleSelectionModel<T>
5554
*
5655
* @param handle
5756
* the handle to deselect by
58-
* @return <code>true</code> if the selection state was changed by this
59-
* call
57+
* @return <code>true</code> if the selection state was changed by this call
6058
* @throws UnsupportedOperationException
6159
* if the selection model does not support either handles or
6260
* deselection

compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/selection/MultiSelectionRenderer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,9 @@ private void doScrollAreaChecks(int pageY) {
434434
bottomBound = Math.max(finalBottomBound, pageY);
435435
} else {
436436
/*
437-
* Subsequent runs make sure that the scroll area grows (but doesn't
438-
* shrink) with the finger, but no further than the final bound.
437+
* Subsequent runs make sure that the scroll area grows (but
438+
* doesn't shrink) with the finger, but no further than the
439+
* final bound.
439440
*/
440441
int oldTopBound = topBound;
441442
if (topBound < finalTopBound) {

compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,7 @@ public native JavaScriptObject getTouchEndHandler()
392392
// Two movement objects for storing status and processing touches
393393
private Movement yMov, xMov;
394394
static final double MIN_VEL = 0.6, MAX_VEL = 4, F_VEL = 1500,
395-
F_ACC = 0.7,
396-
F_AXIS = 1;
395+
F_ACC = 0.7, F_AXIS = 1;
397396

398397
// The object to deal with one direction scrolling
399398
private class Movement {
@@ -705,13 +704,13 @@ protected native JavaScriptObject createScrollListenerFunction(
705704
/*-{
706705
var vScroll = esc.@com.vaadin.v7.client.widgets.Escalator::verticalScrollbar;
707706
var vScrollElem = vScroll.@com.vaadin.v7.client.widget.escalator.ScrollbarBundle::getElement()();
708-
707+
709708
var hScroll = esc.@com.vaadin.v7.client.widgets.Escalator::horizontalScrollbar;
710709
var hScrollElem = hScroll.@com.vaadin.v7.client.widget.escalator.ScrollbarBundle::getElement()();
711-
710+
712711
return $entry(function(e) {
713712
var target = e.target;
714-
713+
715714
// in case the scroll event was native (i.e. scrollbars were dragged, or
716715
// the scrollTop/Left was manually modified), the bundles have old cache
717716
// values. We need to make sure that the caches are kept up to date.
@@ -732,29 +731,29 @@ protected native JavaScriptObject createMousewheelListenerFunction(
732731
return $entry(function(e) {
733732
var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX;
734733
var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY;
735-
734+
736735
// Delta mode 0 is in pixels; we don't need to do anything...
737-
736+
738737
// A delta mode of 1 means we're scrolling by lines instead of pixels
739738
// We need to scale the number of lines by the default line height
740739
if (e.deltaMode === 1) {
741740
var brc = esc.@com.vaadin.v7.client.widgets.Escalator::body;
742741
deltaY *= brc.@com.vaadin.v7.client.widgets.Escalator.AbstractRowContainer::getDefaultRowHeight()();
743742
}
744-
743+
745744
// Other delta modes aren't supported
746745
if ((e.deltaMode !== undefined) && (e.deltaMode >= 2 || e.deltaMode < 0)) {
747746
var msg = "Unsupported wheel delta mode \"" + e.deltaMode + "\"";
748-
747+
749748
// Print warning message
750749
esc.@com.vaadin.v7.client.widgets.Escalator::logWarning(*)(msg);
751750
}
752-
751+
753752
// IE8 has only delta y
754753
if (isNaN(deltaY)) {
755754
deltaY = -0.5*e.wheelDelta;
756755
}
757-
756+
758757
@com.vaadin.v7.client.widgets.Escalator.JsniUtil::moveScrollFromEvent(*)(esc, deltaX, deltaY, e);
759758
});
760759
}-*/;
@@ -4772,15 +4771,13 @@ private boolean isInViewport() {
47724771
public void show() {
47734772
getRootElement().getStyle().clearDisplay();
47744773
getDecoElement().getStyle().clearDisplay();
4775-
Escalator.this.fireEvent(
4776-
new SpacerVisibilityChangedEvent(getRow(), true));
4774+
fireEvent(new SpacerVisibilityChangedEvent(getRow(), true));
47774775
}
47784776

47794777
public void hide() {
47804778
getRootElement().getStyle().setDisplay(Display.NONE);
47814779
getDecoElement().getStyle().setDisplay(Display.NONE);
4782-
Escalator.this.fireEvent(
4783-
new SpacerVisibilityChangedEvent(getRow(), false));
4780+
fireEvent(new SpacerVisibilityChangedEvent(getRow(), false));
47844781
}
47854782

47864783
/**

0 commit comments

Comments
 (0)