summaryrefslogtreecommitdiffstats
path: root/compatibility-client
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-09-21 14:25:46 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-21 15:25:46 +0300
commit11ddb11cbc72b0ee233e503058d4e104030e4aa3 (patch)
treea3cef3be53ee41bba3d8ab8b64b0e10b2483a5fa /compatibility-client
parente118f4d860adeaca1690ef095906ae6be84f3cb5 (diff)
downloadvaadin-framework-11ddb11cbc72b0ee233e503058d4e104030e4aa3.tar.gz
vaadin-framework-11ddb11cbc72b0ee233e503058d4e104030e4aa3.zip
Update modifier order to follow Java Specification suggestions (#10050)
Also includes some other minor cleanup.
Diffstat (limited to 'compatibility-client')
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/renderers/ClickableRenderer.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendarPanel.java36
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VIsOverId.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VItemIdIs.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/VTargetInSubtree.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/ScrollbarBundle.java4
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/events/RowHeightChangedEvent.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnReorderEvent.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnResizeEvent.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnVisibilityChangeEvent.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/SelectAllEvent.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java6
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java12
14 files changed, 29 insertions, 49 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/renderers/ClickableRenderer.java b/compatibility-client/src/main/java/com/vaadin/v7/client/renderers/ClickableRenderer.java
index e76c3e4934..204ec064b6 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/renderers/ClickableRenderer.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/renderers/ClickableRenderer.java
@@ -160,7 +160,7 @@ public abstract class ClickableRenderer<T, W extends Widget>
return cellReference;
}
- private native static Escalator getEscalator(Grid<?> grid)
+ private static native Escalator getEscalator(Grid<?> grid)
/*-{
return grid.@com.vaadin.v7.client.widgets.Grid::escalator;
}-*/;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java
index 77e5cbeab1..864b48595d 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendar.java
@@ -247,7 +247,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
void contextMenu(ContextMenuEvent event, Widget widget);
}
- private static abstract class AbstractEventComparator
+ private abstract static class AbstractEventComparator
implements Comparator<CalendarEvent> {
@Override
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendarPanel.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendarPanel.java
index 8780c980ab..afc0a7340e 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendarPanel.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VCalendarPanel.java
@@ -1183,38 +1183,27 @@ public class VCalendarPanel extends FocusableFlexTable implements
// Ctrl and Shift selection not supported
if (ctrl || shift) {
return false;
- }
-
- else if (keycode == getPreviousKey()) {
+ } else if (keycode == getPreviousKey()) {
focusNextYear(10); // Add 10 years
return true;
- }
-
- else if (keycode == getForwardKey()) {
+ } else if (keycode == getForwardKey()) {
focusNextYear(1); // Add 1 year
return true;
- }
-
- else if (keycode == getNextKey()) {
+ } else if (keycode == getNextKey()) {
focusPreviousYear(10); // Subtract 10 years
return true;
- }
-
- else if (keycode == getBackwardKey()) {
+ } else if (keycode == getBackwardKey()) {
focusPreviousYear(1); // Subtract 1 year
return true;
-
} else if (keycode == getSelectKey()) {
value = (Date) focusedDate.clone();
onSubmit();
return true;
-
} else if (keycode == getResetKey()) {
// Restore showing value the selected value
focusedDate.setTime(value.getTime());
renderCalendar();
return true;
-
} else if (keycode == getCloseKey()) {
// TODO fire listener, on users responsibility??
@@ -1402,24 +1391,15 @@ public class VCalendarPanel extends FocusableFlexTable implements
boolean shift) {
if (!isEnabled() || isReadonly()) {
return false;
- }
-
- else if (resolution == Resolution.YEAR) {
+ } else if (resolution == Resolution.YEAR) {
return handleNavigationYearMode(keycode, ctrl, shift);
- }
-
- else if (resolution == Resolution.MONTH) {
+ } else if (resolution == Resolution.MONTH) {
return handleNavigationMonthMode(keycode, ctrl, shift);
- }
-
- else if (resolution == Resolution.DAY) {
+ } else if (resolution == Resolution.DAY) {
return handleNavigationDayMode(keycode, ctrl, shift);
- }
-
- else {
+ } else {
return handleNavigationDayMode(keycode, ctrl, shift);
}
-
}
/**
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VIsOverId.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VIsOverId.java
index 6a3e389c0a..f2fec93627 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VIsOverId.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VIsOverId.java
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.dd.AcceptCriterion;
import com.vaadin.v7.ui.AbstractSelect;
@AcceptCriterion(AbstractSelect.TargetItemIs.class)
-final public class VIsOverId extends VAcceptCriterion {
+public final class VIsOverId extends VAcceptCriterion {
@Override
protected boolean accept(VDragEvent drag, UIDL configuration) {
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VItemIdIs.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VItemIdIs.java
index 1536f720cd..dfb643fc14 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VItemIdIs.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/dd/VItemIdIs.java
@@ -23,7 +23,7 @@ import com.vaadin.shared.ui.dd.AcceptCriterion;
import com.vaadin.v7.ui.AbstractSelect;
@AcceptCriterion(AbstractSelect.AcceptItem.class)
-final public class VItemIdIs extends VAcceptCriterion {
+public final class VItemIdIs extends VAcceptCriterion {
@Override
protected boolean accept(VDragEvent drag, UIDL configuration) {
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/VTargetInSubtree.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/VTargetInSubtree.java
index 75c9385877..24514714a9 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/VTargetInSubtree.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/VTargetInSubtree.java
@@ -26,7 +26,7 @@ import com.vaadin.v7.client.ui.VTree.TreeNode;
import com.vaadin.v7.ui.Tree;
@AcceptCriterion(Tree.TargetInSubtree.class)
-final public class VTargetInSubtree extends VAcceptCriterion {
+public final class VTargetInSubtree extends VAcceptCriterion {
@Override
protected boolean accept(VDragEvent drag, UIDL configuration) {
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/ScrollbarBundle.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/ScrollbarBundle.java
index 8e6d9a5243..3bfae76005 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/ScrollbarBundle.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/ScrollbarBundle.java
@@ -205,7 +205,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
*
* @see VerticalScrollbarBundle#getElement()
*/
- public final static class VerticalScrollbarBundle extends ScrollbarBundle {
+ public static final class VerticalScrollbarBundle extends ScrollbarBundle {
@Override
public void setStylePrimaryName(String primaryStyleName) {
@@ -275,7 +275,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
*
* @see HorizontalScrollbarBundle#getElement()
*/
- public final static class HorizontalScrollbarBundle
+ public static final class HorizontalScrollbarBundle
extends ScrollbarBundle {
@Override
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/events/RowHeightChangedEvent.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/events/RowHeightChangedEvent.java
index c883a26716..99b26bb9de 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/events/RowHeightChangedEvent.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/events/RowHeightChangedEvent.java
@@ -29,7 +29,7 @@ public class RowHeightChangedEvent extends GwtEvent<RowHeightChangedHandler> {
/**
* Handler type.
*/
- public final static Type<RowHeightChangedHandler> TYPE = new Type<RowHeightChangedHandler>();
+ public static final Type<RowHeightChangedHandler> TYPE = new Type<RowHeightChangedHandler>();
public static final Type<RowHeightChangedHandler> getType() {
return TYPE;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnReorderEvent.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnReorderEvent.java
index 399ed128a2..4c8dbc16af 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnReorderEvent.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnReorderEvent.java
@@ -31,7 +31,7 @@ public class ColumnReorderEvent<T> extends GwtEvent<ColumnReorderHandler<T>> {
/**
* Handler type.
*/
- private final static Type<ColumnReorderHandler<?>> TYPE = new Type<ColumnReorderHandler<?>>();
+ private static final Type<ColumnReorderHandler<?>> TYPE = new Type<ColumnReorderHandler<?>>();
public static final Type<ColumnReorderHandler<?>> getType() {
return TYPE;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnResizeEvent.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnResizeEvent.java
index ba50893411..04b067cf63 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnResizeEvent.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnResizeEvent.java
@@ -32,7 +32,7 @@ public class ColumnResizeEvent<T> extends GwtEvent<ColumnResizeHandler<T>> {
/**
* Handler type.
*/
- private final static Type<ColumnResizeHandler<?>> TYPE = new Type<ColumnResizeHandler<?>>();
+ private static final Type<ColumnResizeHandler<?>> TYPE = new Type<ColumnResizeHandler<?>>();
private Column<?, T> column;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnVisibilityChangeEvent.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnVisibilityChangeEvent.java
index e58b678e3d..8937308dd8 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnVisibilityChangeEvent.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/ColumnVisibilityChangeEvent.java
@@ -31,7 +31,7 @@ import com.vaadin.v7.client.widgets.Grid.Column;
public class ColumnVisibilityChangeEvent<T>
extends GwtEvent<ColumnVisibilityChangeHandler<T>> {
- private final static Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<ColumnVisibilityChangeHandler<?>>();
+ private static final Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<ColumnVisibilityChangeHandler<?>>();
public static final Type<ColumnVisibilityChangeHandler<?>> getType() {
return TYPE;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/SelectAllEvent.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/SelectAllEvent.java
index c46a192292..ae9ca4c3da 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/SelectAllEvent.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/events/SelectAllEvent.java
@@ -30,7 +30,7 @@ public class SelectAllEvent<T> extends GwtEvent<SelectAllHandler<T>> {
/**
* Handler type.
*/
- private final static Type<SelectAllHandler<?>> TYPE = new Type<SelectAllHandler<?>>();;
+ private static final Type<SelectAllHandler<?>> TYPE = new Type<SelectAllHandler<?>>();;
private SelectionModel.Multi<T> selectionModel;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java
index 4eea41c0ff..8b71ccc52a 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java
@@ -323,7 +323,7 @@ public class Escalator extends Widget
* {@link com.google.gwt.dom.client.NativeEvent NativeEvent} isn't
* properly populated with the correct values.
*/
- private final static class CustomTouchEvent
+ private static final class CustomTouchEvent
extends JavaScriptObject {
protected CustomTouchEvent() {
}
@@ -1481,7 +1481,7 @@ public class Escalator extends Widget
return elem;
}
- abstract protected void recalculateSectionHeight();
+ protected abstract void recalculateSectionHeight();
/**
* Returns the height of all rows in the row container.
@@ -1731,7 +1731,7 @@ public class Escalator extends Widget
* @return <code>true</code> iff this the given element, or any of its
* descendants, can be frozen
*/
- abstract protected boolean rowCanBeFrozen(TableRowElement tr);
+ protected abstract boolean rowCanBeFrozen(TableRowElement tr);
/**
* Iterates through all the cells in a column and returns the width of
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
index a59e61d9dc..eb88bb895f 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
@@ -2295,7 +2295,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
}
}
- public static abstract class AbstractGridKeyEvent<HANDLER extends AbstractGridKeyEventHandler>
+ public abstract static class AbstractGridKeyEvent<HANDLER extends AbstractGridKeyEventHandler>
extends KeyEvent<HANDLER> {
/**
@@ -2360,7 +2360,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
protected abstract void doDispatch(HANDLER handler, Section section);
}
- public static abstract class AbstractGridMouseEvent<HANDLER extends AbstractGridMouseEventHandler>
+ public abstract static class AbstractGridMouseEvent<HANDLER extends AbstractGridMouseEventHandler>
extends MouseEvent<HANDLER> {
/**
@@ -4702,7 +4702,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
* @param <T>
* the row type
*/
- public static abstract class Column<C, T> {
+ public abstract static class Column<C, T> {
/**
* Default renderer for GridColumns. Renders everything into text
@@ -8955,17 +8955,17 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
* @param parent
* The parent to set
*/
- private static native final void setParent(Widget widget, Grid<?> parent)
+ private static final native void setParent(Widget widget, Grid<?> parent)
/*-{
widget.@com.google.gwt.user.client.ui.Widget::setParent(Lcom/google/gwt/user/client/ui/Widget;)(parent);
}-*/;
- private static native final void onAttach(Widget widget)
+ private static final native void onAttach(Widget widget)
/*-{
widget.@Widget::onAttach()();
}-*/;
- private static native final void onDetach(Widget widget)
+ private static final native void onDetach(Widget widget)
/*-{
widget.@Widget::onDetach()();
}-*/;