Also includes some other minor cleanup.tags/8.2.0.alpha2
@@ -495,7 +495,7 @@ public class ApplicationConfiguration implements EntryPoint { | |||
* the id of the application to get configuration data for | |||
* @return a native javascript object containing the configuration data | |||
*/ | |||
private native static JsoConfiguration getJsoConfiguration(String appId) | |||
private static native JsoConfiguration getJsoConfiguration(String appId) | |||
/*-{ | |||
return $wnd.vaadin.getApp(appId); | |||
}-*/; | |||
@@ -838,7 +838,7 @@ public class ApplicationConfiguration implements EntryPoint { | |||
* @param widgetsetName | |||
* the name of this widgetset | |||
*/ | |||
public native static void registerCallback(String widgetsetName) | |||
public static native void registerCallback(String widgetsetName) | |||
/*-{ | |||
var callbackHandler = $entry(@com.vaadin.client.ApplicationConfiguration::startApplication(Ljava/lang/String;)); | |||
$wnd.vaadin.registerWidgetset(widgetsetName, callbackHandler); | |||
@@ -872,7 +872,7 @@ public class ApplicationConfiguration implements EntryPoint { | |||
return !isDebugAvailable(); | |||
} | |||
private native static boolean isDebugAvailable() | |||
private static native boolean isDebugAvailable() | |||
/*-{ | |||
if($wnd.vaadin.debug) { | |||
return true; |
@@ -195,7 +195,7 @@ public class ApplicationConnection implements HasHandlers { | |||
} | |||
} | |||
public static abstract class ApplicationConnectionEvent | |||
public abstract static class ApplicationConnectionEvent | |||
extends GwtEvent<CommunicationHandler> { | |||
private ApplicationConnection connection; |
@@ -351,7 +351,7 @@ public class BrowserInfo { | |||
return browserDetails.isOpera() && getBrowserMajorVersion() == 11; | |||
} | |||
public native static String getBrowserString() | |||
public static native String getBrowserString() | |||
/*-{ | |||
return $wnd.navigator.userAgent; | |||
}-*/; |
@@ -139,7 +139,7 @@ public class ConnectorMap { | |||
* element of the connector whose id is desired | |||
* @return the id of the element's connector, if it's a connector | |||
*/ | |||
native static final String getConnectorId(Element el) | |||
static final native String getConnectorId(Element el) | |||
/*-{ | |||
return el.tkPid; | |||
}-*/; |
@@ -21,7 +21,7 @@ import com.google.gwt.core.client.JsArrayString; | |||
import com.google.gwt.dom.client.Element; | |||
public class MeasuredSize { | |||
private final static boolean debugSizeChanges = false; | |||
private static final boolean debugSizeChanges = false; | |||
public static class MeasureResult { | |||
private final boolean widthChanged; |
@@ -384,7 +384,7 @@ public class Profiler { | |||
return RELATIVE_TIME_SUPPLIER.getRelativeTime(); | |||
} | |||
private static native final void logGwtEvent(String name, String type) | |||
private static final native void logGwtEvent(String name, String type) | |||
/*-{ | |||
$wnd.__gwtStatsEvent({ | |||
evtGroup: @com.vaadin.client.Profiler::evtGroup, |
@@ -122,7 +122,7 @@ public class SuperDevMode { | |||
+ ".nocache.js"; | |||
} | |||
private native static String getRecompileParameters(String moduleName) | |||
private static native String getRecompileParameters(String moduleName) | |||
/*-{ | |||
var prop_map = $wnd.__gwt_activeModules[moduleName].bindings(); | |||
@@ -217,7 +217,7 @@ public class SuperDevMode { | |||
return isSuperDevModeEnabledInModule(moduleName); | |||
} | |||
protected native static boolean isSuperDevModeEnabledInModule( | |||
protected static native boolean isSuperDevModeEnabledInModule( | |||
String moduleName) | |||
/*-{ | |||
if (!$wnd.__gwt_activeModules) |
@@ -476,7 +476,7 @@ public final class UIDL extends JavaScriptObject { | |||
* @deprecated should not be used anymore | |||
*/ | |||
@Deprecated | |||
public final static class XML extends JavaScriptObject { | |||
public static final class XML extends JavaScriptObject { | |||
protected XML() { | |||
} | |||
@@ -1149,7 +1149,7 @@ public class Util { | |||
* a JavaScript object to be converted to a string | |||
* @return JSON in string representation | |||
*/ | |||
private native static String stringify(JavaScriptObject json) | |||
private static native String stringify(JavaScriptObject json) | |||
/*-{ | |||
return JSON.stringify(json); | |||
}-*/; | |||
@@ -1162,7 +1162,7 @@ public class Util { | |||
* @param jsonAsString | |||
* @return a JavaScript object constructed from the parse | |||
*/ | |||
public native static <T extends JavaScriptObject> T parse( | |||
public static native <T extends JavaScriptObject> T parse( | |||
String jsonAsString) | |||
/*-{ | |||
return JSON.parse(jsonAsString); |
@@ -692,12 +692,12 @@ public class VCaption extends HTML { | |||
return getOwnerPid(e); | |||
} | |||
private native static void setOwnerPid(Element el, String pid) | |||
private static native void setOwnerPid(Element el, String pid) | |||
/*-{ | |||
el.vOwnerPid = pid; | |||
}-*/; | |||
public native static String getOwnerPid(Element el) | |||
public static native String getOwnerPid(Element el) | |||
/*-{ | |||
return el.vOwnerPid; | |||
}-*/; |
@@ -1167,7 +1167,7 @@ public class WidgetUtil { | |||
* | |||
* @return The active element or null if no active element could be found. | |||
*/ | |||
public native static Element getFocusedElement() | |||
public static native Element getFocusedElement() | |||
/*-{ | |||
if ($wnd.document.activeElement) { | |||
return $wnd.document.activeElement; | |||
@@ -1315,7 +1315,7 @@ public class WidgetUtil { | |||
* | |||
* @since 7.3 | |||
*/ | |||
public native static void setSelectionRange(Element elem, int pos, | |||
public static native void setSelectionRange(Element elem, int pos, | |||
int length, String direction) | |||
/*-{ | |||
try { | |||
@@ -1335,7 +1335,7 @@ public class WidgetUtil { | |||
* <code>true</code> if selection is enabled; <code>false</code> | |||
* if not | |||
*/ | |||
public native static void setTextSelectionEnabled(Element e, boolean enable) | |||
public static native void setTextSelectionEnabled(Element e, boolean enable) | |||
/*-{ | |||
if (!enable) { | |||
e.ondrag = function () { return false; }; | |||
@@ -1353,7 +1353,7 @@ public class WidgetUtil { | |||
* | |||
* @since 7.6 | |||
*/ | |||
public native static void clearTextSelection() | |||
public static native void clearTextSelection() | |||
/*-{ | |||
if ($wnd.getSelection) { | |||
$wnd.getSelection().removeAllRanges(); |
@@ -417,9 +417,8 @@ public class AtmospherePushConnection implements PushConnection { | |||
getConnectionStateHandler().pushReconnectPending(this); | |||
} | |||
public static abstract class AbstractJSO extends JavaScriptObject { | |||
public abstract static class AbstractJSO extends JavaScriptObject { | |||
protected AbstractJSO() { | |||
} | |||
protected final native String getStringValue(String key) |
@@ -1613,7 +1613,7 @@ public class MessageHandler { | |||
} | |||
} | |||
private static native final int calculateBootstrapTime() | |||
private static final native int calculateBootstrapTime() | |||
/*-{ | |||
if ($wnd.performance && $wnd.performance.timing) { | |||
return (new Date).getTime() - $wnd.performance.timing.responseStart; |
@@ -234,7 +234,7 @@ public class StateChangeEvent | |||
* the JavaScript object to check | |||
* @return true if the property is defined | |||
*/ | |||
private static native final boolean isInJson(String property, | |||
private static final native boolean isInJson(String property, | |||
JavaScriptObject target) | |||
/*-{ | |||
var segments = property.split('.'); |
@@ -206,7 +206,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { | |||
* Path is of type "targetWidgetPath#componentPart" or | |||
* "targetWidgetPath". | |||
*/ | |||
String parts[] = path.split(LegacyLocatorStrategy.SUBPART_SEPARATOR, 2); | |||
String[] parts = path.split(LegacyLocatorStrategy.SUBPART_SEPARATOR, 2); | |||
String widgetPath = parts[0]; | |||
// Note that this only works if baseElement can be mapped to a | |||
@@ -328,7 +328,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { | |||
* if the element could not be found. | |||
*/ | |||
private Element getElementByDOMPath(Element baseElement, String path) { | |||
String parts[] = path.split(PARENTCHILD_SEPARATOR); | |||
String[] parts = path.split(PARENTCHILD_SEPARATOR); | |||
Element element = baseElement; | |||
for (int i = 0, l = parts.length; i < l; ++i) { | |||
@@ -501,7 +501,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { | |||
@SuppressWarnings("unchecked") | |||
private Widget getWidgetFromPath(String path, Widget baseWidget) { | |||
Widget w = baseWidget; | |||
String parts[] = path.split(PARENTCHILD_SEPARATOR); | |||
String[] parts = path.split(PARENTCHILD_SEPARATOR); | |||
for (int i = 0; i < parts.length; i++) { | |||
String part = parts[i]; |
@@ -37,7 +37,7 @@ import elemental.json.JsonValue; | |||
@Connect(com.vaadin.ui.Grid.Column.class) | |||
public class ColumnConnector extends AbstractExtensionConnector { | |||
public static abstract class CustomColumn | |||
public abstract static class CustomColumn | |||
extends Column<Object, JsonObject> { | |||
private final String connectorId; |
@@ -882,7 +882,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> { | |||
* @return a non-null object that uniquely and consistently represents the | |||
* row object | |||
*/ | |||
abstract public Object getRowKey(T row); | |||
public abstract Object getRowKey(T row); | |||
@Override | |||
public int size() { |
@@ -33,7 +33,7 @@ public interface CacheStrategy { | |||
* This simple approach rules out more advanced heuristics that would take | |||
* the current scrolling direction or past scrolling behavior into account. | |||
*/ | |||
public static abstract class AbstractBasicSymmetricalCacheStrategy | |||
public abstract static class AbstractBasicSymmetricalCacheStrategy | |||
implements CacheStrategy { | |||
@Override |
@@ -126,37 +126,37 @@ public abstract class PointerEvent<H extends EventHandler> | |||
return isPrimary(getNativeEvent()); | |||
} | |||
private static native final int getPointerId(NativeEvent e) | |||
private static final native int getPointerId(NativeEvent e) | |||
/*-{ | |||
return e.pointerId; | |||
}-*/; | |||
private static native final int getWidth(NativeEvent e) | |||
private static final native int getWidth(NativeEvent e) | |||
/*-{ | |||
return e.width; | |||
}-*/; | |||
private static native final int getHeight(NativeEvent e) | |||
private static final native int getHeight(NativeEvent e) | |||
/*-{ | |||
return e.height; | |||
}-*/; | |||
private static native final double getPressure(NativeEvent e) | |||
private static final native double getPressure(NativeEvent e) | |||
/*-{ | |||
return e.pressure; | |||
}-*/; | |||
private static native final double getTiltX(NativeEvent e) | |||
private static final native double getTiltX(NativeEvent e) | |||
/*-{ | |||
return e.tiltX; | |||
}-*/; | |||
private static native final double getTiltY(NativeEvent e) | |||
private static final native double getTiltY(NativeEvent e) | |||
/*-{ | |||
return e.tiltY; | |||
}-*/; | |||
private static native final String getPointerType(NativeEvent e) | |||
private static final native String getPointerType(NativeEvent e) | |||
/*-{ | |||
var pointerType = e.pointerType; | |||
if (typeof pointerType === "number") { | |||
@@ -165,7 +165,7 @@ public abstract class PointerEvent<H extends EventHandler> | |||
return pointerType || ""; | |||
}-*/; | |||
private static native final boolean isPrimary(NativeEvent e) | |||
private static final native boolean isPrimary(NativeEvent e) | |||
/*-{ | |||
return e.isPrimary; | |||
}-*/; |
@@ -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.client.widgets.Grid::escalator; | |||
}-*/; |
@@ -71,12 +71,12 @@ public class HierarchyRenderer extends ClickableRenderer<Object, Widget> { | |||
return (TableCellElement) element; | |||
} | |||
private native static RowReference<Object> getRowReference( | |||
private static native RowReference<Object> getRowReference( | |||
RendererCellReference cell) /*-{ | |||
return cell.@com.vaadin.client.widget.grid.CellReference::getRowReference()(); | |||
}-*/; | |||
private native static FlyweightCell getFlyweightCell( | |||
private static native FlyweightCell getFlyweightCell( | |||
RendererCellReference cell) /*-{ | |||
return cell.@com.vaadin.client.widget.grid.RendererCellReference::cell; | |||
}-*/; |
@@ -2010,7 +2010,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>> | |||
private void setLabel() { | |||
if (getDateField() instanceof VAbstractPopupCalendar) { | |||
((VAbstractPopupCalendar) getDateField()).setFocusedDate(this); | |||
((VAbstractPopupCalendar<?, ?>) getDateField()).setFocusedDate(this); | |||
} | |||
} | |||
} |
@@ -606,14 +606,14 @@ public abstract class VAbstractSplitPanel extends ComplexPanel { | |||
* | |||
* @since 7.5.1 | |||
*/ | |||
abstract protected void startResize(); | |||
protected abstract void startResize(); | |||
/** | |||
* Called when stopping drag resize | |||
* | |||
* @since 7.5.1 | |||
*/ | |||
abstract protected void stopResize(); | |||
protected abstract void stopResize(); | |||
/** | |||
* Gets the first container |
@@ -170,11 +170,11 @@ public class VDragAndDropWrapper extends VCustomComponent | |||
return false; | |||
} | |||
protected final static int NONE = 0; | |||
protected final static int COMPONENT = 1; | |||
protected final static int WRAPPER = 2; | |||
protected final static int HTML5 = 3; | |||
protected final static int COMPONENT_OTHER = 4; | |||
protected static final int NONE = 0; | |||
protected static final int COMPONENT = 1; | |||
protected static final int WRAPPER = 2; | |||
protected static final int HTML5 = 3; | |||
protected static final int COMPONENT_OTHER = 4; | |||
/** For internal use only. May be removed or replaced in the future. */ | |||
public int dragStartMode; |
@@ -45,7 +45,7 @@ import com.vaadin.shared.ui.MarginInfo; | |||
*/ | |||
public class VFormLayout extends SimplePanel { | |||
private final static String CLASSNAME = "v-formlayout"; | |||
private static final String CLASSNAME = "v-formlayout"; | |||
/** For internal use only. May be removed or replaced in the future. */ | |||
public VFormLayoutTable table; |
@@ -416,7 +416,7 @@ public class VPopupView extends HTML | |||
} | |||
return handler; | |||
} | |||
}// class CustomPopup | |||
} | |||
public HandlerRegistration addVisibilityChangeHandler( | |||
final VisibilityChangeHandler visibilityChangeHandler) { | |||
@@ -442,4 +442,4 @@ public class VPopupView extends HTML | |||
return popupShowInProgress; | |||
} | |||
}// class VPopupView | |||
} |
@@ -343,7 +343,7 @@ public class VUI extends SimplePanel implements ResizeHandler, | |||
connection.flushActiveConnector(); | |||
} | |||
private native static void loadAppIdListFromDOM(List<String> list) | |||
private static native void loadAppIdListFromDOM(List<String> list) | |||
/*-{ | |||
var j; | |||
for(j in $wnd.vaadin.vaadinConfigurations) { |
@@ -93,7 +93,7 @@ public class CssLayoutConnector extends AbstractLayoutConnector { | |||
// as it is added directly to the child component? | |||
String[] cssRules = css.split(";"); | |||
for (String cssRule : cssRules) { | |||
String parts[] = cssRule.split(":", 2); | |||
String[] parts = cssRule.split(":", 2); | |||
if (parts.length == 2) { | |||
style.setProperty(makeCamelCase(parts[0].trim()), | |||
parts[1].trim()); |
@@ -113,7 +113,7 @@ public abstract class VAbstractDropHandler implements VDropHandler { | |||
* | |||
* @param drag | |||
*/ | |||
abstract protected void dragAccepted(VDragEvent drag); | |||
protected abstract void dragAccepted(VDragEvent drag); | |||
protected void validate(final VAcceptCallback cb, final VDragEvent event) { | |||
Command checkCriteria = new Command() { |
@@ -31,7 +31,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; | |||
*/ | |||
@Deprecated | |||
@AcceptCriterion(AcceptAll.class) | |||
final public class VAcceptAll extends VAcceptCriterion { | |||
public final class VAcceptAll extends VAcceptCriterion { | |||
@Override | |||
protected boolean accept(VDragEvent drag, UIDL configuration) { |
@@ -28,7 +28,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; | |||
*/ | |||
@Deprecated | |||
@AcceptCriterion(And.class) | |||
final public class VAnd extends VAcceptCriterion implements VAcceptCallback { | |||
public final class VAnd extends VAcceptCriterion implements VAcceptCallback { | |||
private boolean b1; | |||
static VAcceptCriterion getCriteria(VDragEvent drag, UIDL configuration, |
@@ -28,7 +28,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; | |||
*/ | |||
@Deprecated | |||
@AcceptCriterion(ContainsDataFlavor.class) | |||
final public class VContainsDataFlavor extends VAcceptCriterion { | |||
public final class VContainsDataFlavor extends VAcceptCriterion { | |||
@Override | |||
protected boolean accept(VDragEvent drag, UIDL configuration) { |
@@ -31,7 +31,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; | |||
*/ | |||
@Deprecated | |||
@AcceptCriterion(SourceIs.class) | |||
final public class VDragSourceIs extends VAcceptCriterion { | |||
public final class VDragSourceIs extends VAcceptCriterion { | |||
@Override | |||
protected boolean accept(VDragEvent drag, UIDL configuration) { |
@@ -31,12 +31,12 @@ public class VHtml5File extends JavaScriptObject { | |||
protected VHtml5File() { | |||
} | |||
public native final String getName() | |||
public final native String getName() | |||
/*-{ | |||
return this.name; | |||
}-*/; | |||
public native final String getType() | |||
public final native String getType() | |||
/*-{ | |||
return this.type; | |||
}-*/; | |||
@@ -47,7 +47,7 @@ public class VHtml5File extends JavaScriptObject { | |||
* and then cast back to a long value. | |||
* www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html#important | |||
*/ | |||
public native final double getSize() | |||
public final native double getSize() | |||
/*-{ | |||
return this.size ? this.size : 0; | |||
}-*/; |
@@ -25,7 +25,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; | |||
* and extending classes | |||
*/ | |||
@Deprecated | |||
final public class VOverTreeNode extends VAcceptCriterion { | |||
public final class VOverTreeNode extends VAcceptCriterion { | |||
@Override | |||
protected boolean accept(VDragEvent drag, UIDL configuration) { |
@@ -167,11 +167,10 @@ public class MenuBarConnector extends AbstractComponentConnector | |||
itr = iteratorStack.pop(); | |||
currentMenu = menuStack.pop(); | |||
} | |||
} // while | |||
} | |||
getLayoutManager().setNeedsHorizontalLayout(this); | |||
}// updateFromUIDL | |||
} | |||
@Override | |||
public VMenuBar getWidget() { |
@@ -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 |
@@ -29,7 +29,7 @@ public class RowHeightChangedEvent extends GwtEvent<RowHeightChangedHandler> { | |||
/** | |||
* Handler type. | |||
*/ | |||
public final static Type<RowHeightChangedHandler> TYPE = new Type<>(); | |||
public static final Type<RowHeightChangedHandler> TYPE = new Type<>(); | |||
public static final Type<RowHeightChangedHandler> getType() { | |||
return TYPE; |
@@ -34,7 +34,7 @@ public class ColumnReorderEvent<T> extends GwtEvent<ColumnReorderHandler<T>> { | |||
/** | |||
* Handler type. | |||
*/ | |||
private final static Type<ColumnReorderHandler<?>> TYPE = new Type<>(); | |||
private static final Type<ColumnReorderHandler<?>> TYPE = new Type<>(); | |||
public static final Type<ColumnReorderHandler<?>> getType() { | |||
return TYPE; |
@@ -32,7 +32,7 @@ public class ColumnResizeEvent<T> extends GwtEvent<ColumnResizeHandler<T>> { | |||
/** | |||
* Handler type. | |||
*/ | |||
private final static Type<ColumnResizeHandler<?>> TYPE = new Type<>(); | |||
private static final Type<ColumnResizeHandler<?>> TYPE = new Type<>(); | |||
private Column<?, T> column; | |||
@@ -31,7 +31,7 @@ import com.vaadin.client.widgets.Grid.Column; | |||
public class ColumnVisibilityChangeEvent<T> | |||
extends GwtEvent<ColumnVisibilityChangeHandler<T>> { | |||
private final static Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<>(); | |||
private static final Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<>(); | |||
public static final Type<ColumnVisibilityChangeHandler<?>> getType() { | |||
return TYPE; |
@@ -324,7 +324,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() { | |||
} | |||
@@ -1496,7 +1496,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. | |||
@@ -1746,7 +1746,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 |
@@ -2292,7 +2292,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> { | |||
/** | |||
@@ -2358,7 +2358,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> { | |||
/** | |||
@@ -8972,17 +8972,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()(); | |||
}-*/; |
@@ -352,7 +352,7 @@ public class Overlay extends PopupPanel { | |||
return topFix; | |||
} | |||
private native static int detectRelativeBodyFixes(String axis) | |||
private static native int detectRelativeBodyFixes(String axis) | |||
/*-{ | |||
try { | |||
var b = $wnd.document.body; |
@@ -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; | |||
}-*/; |
@@ -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 |
@@ -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); | |||
} | |||
} | |||
/** |
@@ -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) { |
@@ -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) { |
@@ -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) { |
@@ -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 |
@@ -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; |
@@ -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; |
@@ -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; | |||
@@ -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; |
@@ -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; | |||
@@ -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 |
@@ -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()(); | |||
}-*/; |
@@ -151,7 +151,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE | |||
} | |||
} | |||
private static abstract class BaseItemAddOrRemoveEvent extends EventObject | |||
private abstract static class BaseItemAddOrRemoveEvent extends EventObject | |||
implements Serializable { | |||
protected Object itemId; | |||
protected int index; |
@@ -75,13 +75,13 @@ public class FilesystemContainer implements Container.Hierarchical { | |||
*/ | |||
public static Collection<String> FILE_PROPERTIES; | |||
private final static Method FILEITEM_LASTMODIFIED; | |||
private static final Method FILEITEM_LASTMODIFIED; | |||
private final static Method FILEITEM_NAME; | |||
private static final Method FILEITEM_NAME; | |||
private final static Method FILEITEM_ICON; | |||
private static final Method FILEITEM_ICON; | |||
private final static Method FILEITEM_SIZE; | |||
private static final Method FILEITEM_SIZE; | |||
static { | |||
@@ -182,7 +182,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String> | |||
* datasource. | |||
* @return | |||
*/ | |||
abstract public String format(T value); | |||
public abstract String format(T value); | |||
/** | |||
* Parse string and convert it to format compatible with datasource. | |||
@@ -196,7 +196,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String> | |||
* Any type of exception can be thrown to indicate that the | |||
* conversion was not succesful. | |||
*/ | |||
abstract public T parse(String formattedValue) throws Exception; | |||
public abstract T parse(String formattedValue) throws Exception; | |||
/** | |||
* Sets the Property's read-only mode to the specified status. |
@@ -99,7 +99,7 @@ public class TextFileProperty extends AbstractProperty<String> { | |||
: new InputStreamReader(fis, charset); | |||
BufferedReader r = new BufferedReader(isr); | |||
StringBuilder b = new StringBuilder(); | |||
char buf[] = new char[8 * 1024]; | |||
char[] buf = new char[8 * 1024]; | |||
int len; | |||
while ((len = r.read(buf)) != -1) { | |||
b.append(buf, 0, len); |
@@ -39,7 +39,7 @@ import com.vaadin.server.VaadinSession; | |||
@Deprecated | |||
public class DefaultConverterFactory implements ConverterFactory { | |||
private final static Logger log = Logger | |||
private static final Logger log = Logger | |||
.getLogger(DefaultConverterFactory.class.getName()); | |||
@Override |
@@ -33,7 +33,7 @@ import com.vaadin.v7.data.util.converter.Converter.ConversionException; | |||
* @deprecated As of 8.0, no replacement available. | |||
*/ | |||
@Deprecated | |||
final public class ColumnProperty implements Property { | |||
public final class ColumnProperty implements Property { | |||
private static final long serialVersionUID = -3694463129581802457L; | |||
private RowItem owner; |
@@ -159,7 +159,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
@Override | |||
public Object addItem() throws UnsupportedOperationException { | |||
Object emptyKey[] = new Object[queryDelegate.getPrimaryKeyColumns() | |||
Object[] emptyKey = new Object[queryDelegate.getPrimaryKeyColumns() | |||
.size()]; | |||
RowId itemId = new TemporaryRowId(emptyKey); | |||
// Create new empty column properties for the row item. |
@@ -45,7 +45,7 @@ public class QueryBuilder implements Serializable { | |||
addFilterTranslator(new SimpleStringTranslator()); | |||
} | |||
public synchronized static void addFilterTranslator( | |||
public static synchronized void addFilterTranslator( | |||
FilterTranslator translator) { | |||
filterTranslators.add(translator); | |||
} | |||
@@ -79,7 +79,7 @@ public class QueryBuilder implements Serializable { | |||
* the statement helper to update with the value(s) of the filter | |||
* @return a string representing the filter. | |||
*/ | |||
public synchronized static String getWhereStringForFilter(Filter filter, | |||
public static synchronized String getWhereStringForFilter(Filter filter, | |||
StatementHelper sh) { | |||
for (FilterTranslator ft : filterTranslators) { | |||
if (ft.translatesFilter(filter)) { |
@@ -124,7 +124,7 @@ public interface FieldEvents { | |||
* @since 6.5 | |||
*/ | |||
@Deprecated | |||
public static abstract class TextChangeEvent extends Component.Event { | |||
public abstract static class TextChangeEvent extends Component.Event { | |||
public TextChangeEvent(Component source) { | |||
super(source); |
@@ -437,7 +437,7 @@ public abstract class AbstractColorPicker extends AbstractLegacyComponent | |||
* Sets the default styles of the component | |||
* | |||
*/ | |||
abstract protected void setDefaultStyles(); | |||
protected abstract void setDefaultStyles(); | |||
/** | |||
* Shows a popup-window for color selection. |
@@ -2046,7 +2046,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements | |||
* @since 6.3 | |||
* | |||
*/ | |||
private static abstract class AbstractItemSetCriterion | |||
private abstract static class AbstractItemSetCriterion | |||
extends ClientSideCriterion { | |||
protected final Collection<Object> itemIds = new HashSet<Object>(); | |||
protected AbstractSelect select; |
@@ -327,7 +327,7 @@ public class Grid extends AbstractComponent | |||
* @since 7.6.1 | |||
*/ | |||
@Deprecated | |||
public final static class DetailComponentManager | |||
public static final class DetailComponentManager | |||
extends AbstractGridExtension implements DataGenerator { | |||
/** | |||
@@ -982,7 +982,7 @@ public class Grid extends AbstractComponent | |||
* Base class for editor related events | |||
*/ | |||
@Deprecated | |||
public static abstract class EditorEvent extends Component.Event { | |||
public abstract static class EditorEvent extends Component.Event { | |||
private Object itemID; | |||
@@ -1437,7 +1437,7 @@ public class Grid extends AbstractComponent | |||
* reusable. | |||
*/ | |||
@Deprecated | |||
public static abstract class AbstractSelectionModel extends | |||
public abstract static class AbstractSelectionModel extends | |||
AbstractGridExtension implements SelectionModel, DataGenerator { | |||
protected final LinkedHashSet<Object> selection = new LinkedHashSet<Object>(); | |||
@@ -2646,7 +2646,7 @@ public class Grid extends AbstractComponent | |||
} | |||
} | |||
abstract protected String getCellTagName(); | |||
protected abstract String getCellTagName(); | |||
void detach() { | |||
for (CELLTYPE cell : cells.values()) { | |||
@@ -4314,7 +4314,7 @@ public class Grid extends AbstractComponent | |||
* the type this renderer knows how to present | |||
*/ | |||
@Deprecated | |||
public static abstract class AbstractRenderer<T> | |||
public abstract static class AbstractRenderer<T> | |||
extends AbstractGridExtension implements Renderer<T> { | |||
private final Class<T> presentationType; | |||
@@ -4473,7 +4473,7 @@ public class Grid extends AbstractComponent | |||
* @since 7.5 | |||
*/ | |||
@Deprecated | |||
public static abstract class AbstractGridExtension | |||
public abstract static class AbstractGridExtension | |||
extends AbstractExtension { | |||
/** |
@@ -5232,7 +5232,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* during that drag and drop operation. | |||
*/ | |||
@Deprecated | |||
public static abstract class TableDropCriterion | |||
public abstract static class TableDropCriterion | |||
extends ServerSideCriterion { | |||
private Table table; |
@@ -1636,7 +1636,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, | |||
* during that drag and drop operation. | |||
*/ | |||
@Deprecated | |||
public static abstract class TreeDropCriterion extends ServerSideCriterion { | |||
public abstract static class TreeDropCriterion extends ServerSideCriterion { | |||
private Tree tree; | |||
@@ -6,9 +6,9 @@ import java.util.concurrent.atomic.AtomicLong; | |||
public class BeanItemContainerGenerator { | |||
public static class PortableRandom { | |||
private final static long multiplier = 0x5DEECE66DL; | |||
private final static long addend = 0xBL; | |||
private final static long mask = (1L << 48) - 1; | |||
private static final long multiplier = 0x5DEECE66DL; | |||
private static final long addend = 0xBL; | |||
private static final long mask = (1L << 48) - 1; | |||
private AtomicLong seed; | |||
public PortableRandom(long seed) { |
@@ -12,7 +12,7 @@ import org.junit.Test; | |||
public class PerformanceTestIndexedContainerTest { | |||
private static final int REPEATS = 10; | |||
private final static int ITEMS = 50000; | |||
private static final int ITEMS = 50000; | |||
private static final long ADD_ITEM_FAIL_THRESHOLD = 200; | |||
// TODO should improve performance of these methods | |||
private static final long ADD_ITEM_AT_FAIL_THRESHOLD = 5000; |
@@ -41,11 +41,11 @@ import com.vaadin.v7.ui.Table.TableContextClickEvent; | |||
*/ | |||
public class ContextClickListenerTest extends AbstractComponent { | |||
private final static ContextClickEvent contextClickEvent = EasyMock | |||
private static final ContextClickEvent contextClickEvent = EasyMock | |||
.createMock(ContextClickEvent.class); | |||
private final static GridContextClickEvent gridContextClickEvent = EasyMock | |||
private static final GridContextClickEvent gridContextClickEvent = EasyMock | |||
.createMock(GridContextClickEvent.class); | |||
private final static TableContextClickEvent tableContextClickEvent = EasyMock | |||
private static final TableContextClickEvent tableContextClickEvent = EasyMock | |||
.createMock(TableContextClickEvent.class); | |||
private final AssertListener contextListener = new AssertListener(); |
@@ -595,7 +595,7 @@ public class DataCommunicator<T> extends AbstractExtension { | |||
* @since 8.1 | |||
* | |||
*/ | |||
protected DataKeyMapper<T> createKeyMapper(ValueProvider<T,Object> identifierGetter) { | |||
protected DataKeyMapper<T> createKeyMapper(ValueProvider<T, Object> identifierGetter) { | |||
return new KeyMapper<T>(identifierGetter); | |||
} | |||
@@ -165,7 +165,7 @@ public interface FieldEvents { | |||
public void blur(BlurEvent event); | |||
} | |||
public static abstract class FocusAndBlurServerRpcImpl | |||
public abstract static class FocusAndBlurServerRpcImpl | |||
implements FocusAndBlurServerRpc { | |||
private final Component component; |
@@ -41,5 +41,5 @@ public abstract class ShortcutListener extends ShortcutAction | |||
} | |||
@Override | |||
abstract public void handleAction(Object sender, Object target); | |||
public abstract void handleAction(Object sender, Object target); | |||
} |
@@ -30,7 +30,7 @@ import com.vaadin.server.PaintTarget; | |||
*/ | |||
public class Or extends ClientSideCriterion { | |||
private static final long serialVersionUID = 1L; | |||
private final AcceptCriterion criteria[]; | |||
private final AcceptCriterion[] criteria; | |||
/** | |||
* @param criteria |
@@ -46,7 +46,7 @@ import com.vaadin.ui.Window; | |||
@SuppressWarnings({ "serial", "deprecation" }) | |||
public class ComponentSizeValidator implements Serializable { | |||
private final static int LAYERS_SHOWN = 4; | |||
private static final int LAYERS_SHOWN = 4; | |||
/** | |||
* Recursively checks given component and its subtree for invalid layout |
@@ -49,7 +49,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
/* Document type declarations */ | |||
private final static String UIDL_ARG_NAME = "name"; | |||
private static final String UIDL_ARG_NAME = "name"; | |||
private final Deque<String> mOpenTags; | |||
@@ -206,7 +206,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* @return A new string instance where all occurrences of XML sensitive | |||
* characters are substituted with entities. | |||
*/ | |||
static public String escapeXML(String xml) { | |||
public static String escapeXML(String xml) { | |||
if (xml == null || xml.length() <= 0) { | |||
return ""; | |||
} | |||
@@ -248,7 +248,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* The string to escape | |||
* @return Escaped version of the string | |||
*/ | |||
static public String escapeJSON(String s) { | |||
public static String escapeJSON(String s) { | |||
// FIXME: Move this method to another class as other classes use it | |||
// also. | |||
if (s == null) { |
@@ -63,7 +63,7 @@ public class VaadinPortlet extends GenericPortlet | |||
* Base class for portlet requests that need access to HTTP servlet | |||
* requests. | |||
*/ | |||
public static abstract class VaadinHttpAndPortletRequest | |||
public abstract static class VaadinHttpAndPortletRequest | |||
extends VaadinPortletRequest { | |||
/** |
@@ -1019,7 +1019,7 @@ public class VaadinServlet extends HttpServlet implements Constants { | |||
private void streamContent(HttpServletResponse response, InputStream is) | |||
throws IOException { | |||
final OutputStream os = response.getOutputStream(); | |||
final byte buffer[] = new byte[DEFAULT_BUFFER_SIZE]; | |||
final byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; | |||
int bytes; | |||
while ((bytes = is.read(buffer)) >= 0) { | |||
os.write(buffer, 0, bytes); |
@@ -308,7 +308,7 @@ public class FileUploadHandler implements RequestHandler { | |||
"The multipart stream ended unexpectedly"); | |||
} | |||
bout.write(readByte); | |||
if(bout.size() > MULTIPART_BOUNDARY_LINE_LIMIT) { | |||
if (bout.size() > MULTIPART_BOUNDARY_LINE_LIMIT) { | |||
throw new IOException( | |||
"The multipart stream does not contain boundary"); | |||
} | |||
@@ -564,7 +564,7 @@ public class FileUploadHandler implements RequestHandler { | |||
throw new NoInputStreamException(); | |||
} | |||
final byte buffer[] = new byte[MAX_UPLOAD_BUFFER_SIZE]; | |||
final byte[] buffer = new byte[MAX_UPLOAD_BUFFER_SIZE]; | |||
long lastStreamingEvent = 0; | |||
int bytesReadToBuffer = 0; | |||
do { |
@@ -308,7 +308,7 @@ public class PushHandler { | |||
// We don't want to use callWithUi here, as it assumes there's a client | |||
// request active and does requestStart and requestEnd among other | |||
// things. | |||
if(event == null){ | |||
if (event == null) { | |||
getLogger().log(Level.SEVERE, | |||
"Could not get event. This should never happen."); | |||
return; | |||
@@ -316,7 +316,7 @@ public class PushHandler { | |||
AtmosphereResource resource = event.getResource(); | |||
if(resource == null){ | |||
if (resource == null) { | |||
getLogger().log(Level.SEVERE, | |||
"Could not get resource. This should never happen."); | |||
return; |
@@ -58,7 +58,7 @@ public class ClassPathExplorer { | |||
/** | |||
* File filter that only accepts directories. | |||
*/ | |||
private final static FileFilter DIRECTORIES_ONLY = (File f) -> | |||
private static final FileFilter DIRECTORIES_ONLY = (File f) -> | |||
f.exists() && f.isDirectory(); | |||
/** | |||
@@ -301,7 +301,7 @@ public class ClassPathExplorer { | |||
* | |||
* @return filtered list of class path entries | |||
*/ | |||
private final static List<String> getRawClasspathEntries() { | |||
private static final List<String> getRawClasspathEntries() { | |||
// try to keep the order of the classpath | |||
List<String> locations = new ArrayList<>(); | |||
@@ -339,7 +339,7 @@ public class ClassPathExplorer { | |||
* string | |||
* @return map of classpath locations, see {@link #classpathLocations} | |||
*/ | |||
private final static Map<String, URL> getClasspathLocations( | |||
private static final Map<String, URL> getClasspathLocations( | |||
List<String> rawClasspathEntries) { | |||
long start = System.currentTimeMillis(); | |||
// try to keep the order of the classpath | |||
@@ -428,7 +428,7 @@ public class ClassPathExplorer { | |||
* @param file | |||
* @param locations | |||
*/ | |||
private final static void include(String name, File file, | |||
private static final void include(String name, File file, | |||
Map<String, URL> locations) { | |||
if (!file.exists()) { | |||
return; |
@@ -144,7 +144,7 @@ public abstract class AbstractLocalDateField | |||
if (value == null) return ""; | |||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT); | |||
Locale locale = getLocale(); | |||
if (locale != null){ | |||
if (locale != null) { | |||
dateTimeFormatter = dateTimeFormatter.withLocale(locale); | |||
} | |||
return value.format(dateTimeFormatter); |
@@ -183,7 +183,7 @@ public class Composite extends AbstractComponent implements HasComponents { | |||
private Component getRootOrThrow() { | |||
Component root = getCompositionRoot(); | |||
if(root == null) throw new IllegalStateException("Composition root has not been set"); | |||
if (root == null) throw new IllegalStateException("Composition root has not been set"); | |||
return root; | |||
} | |||
@@ -202,7 +202,7 @@ public class Composite extends AbstractComponent implements HasComponents { | |||
private <T> T getRootAbstractComponentPropertyOrNull(SerializableFunction<AbstractComponent, T> getter) { | |||
Component root = getCompositionRoot(); | |||
if(root instanceof AbstractComponent) { | |||
if (root instanceof AbstractComponent) { | |||
return getter.apply((AbstractComponent) root); | |||
} | |||
return null; |
@@ -199,8 +199,8 @@ public class MenuBar extends AbstractComponent | |||
tmpItem.getCommand().menuSelected(tmpItem); | |||
} | |||
} | |||
} // if | |||
}// changeVariables | |||
} | |||
} | |||
/** | |||
* Constructs an empty, horizontal menu | |||
@@ -941,7 +941,7 @@ public class MenuBar extends AbstractComponent | |||
this.checked = checked; | |||
markAsDirty(); | |||
} | |||
}// class MenuItem | |||
} | |||
@Override | |||
public void writeDesign(Element design, DesignContext designContext) { | |||
@@ -1091,4 +1091,4 @@ public class MenuBar extends AbstractComponent | |||
result.add("html-content-allowed"); | |||
return result; | |||
} | |||
}// class MenuBar | |||
} |
@@ -235,7 +235,7 @@ public class Tree<T> extends Composite | |||
* | |||
* @since 8.1 | |||
*/ | |||
public final static class TreeMultiSelectionModel<T> | |||
public static final class TreeMultiSelectionModel<T> | |||
extends MultiSelectionModelImpl<T> { | |||
@Override |
@@ -58,10 +58,10 @@ public class DesignAttributeHandler implements Serializable { | |||
return Logger.getLogger(DesignAttributeHandler.class.getName()); | |||
} | |||
private final static Map<Class<?>, AttributeCacheEntry> cache = new ConcurrentHashMap<>(); | |||
private static final Map<Class<?>, AttributeCacheEntry> cache = new ConcurrentHashMap<>(); | |||
// translates string <-> object | |||
private final static DesignFormatter FORMATTER = new DesignFormatter(); | |||
private static final DesignFormatter FORMATTER = new DesignFormatter(); | |||
/** | |||
* Returns the currently used formatter. All primitive types and all types |
@@ -42,13 +42,13 @@ public class FileTypeResolver implements Serializable { | |||
/** | |||
* Default icon given if no icon is specified for a mime-type. | |||
*/ | |||
static public Resource DEFAULT_ICON = new ThemeResource( | |||
public static Resource DEFAULT_ICON = new ThemeResource( | |||
"../runo/icons/16/document.png"); | |||
/** | |||
* Default mime-type. | |||
*/ | |||
static public String DEFAULT_MIME_TYPE = "application/octet-stream"; | |||
public static String DEFAULT_MIME_TYPE = "application/octet-stream"; | |||
/** | |||
* Initial file extension to mime-type mapping. |
@@ -271,7 +271,7 @@ public class ClassesSerializableTest { | |||
* | |||
* @return List of class path segment strings | |||
*/ | |||
private final static List<String> getRawClasspathEntries() { | |||
private static final List<String> getRawClasspathEntries() { | |||
// try to keep the order of the classpath | |||
List<String> locations = new ArrayList<>(); | |||
@@ -382,7 +382,7 @@ public class ClassesSerializableTest { | |||
* File representing the directory to scan | |||
* @return collection of fully qualified class names in the directory | |||
*/ | |||
private final static Collection<String> findClassesInDirectory( | |||
private static final Collection<String> findClassesInDirectory( | |||
String parentPackage, File parent) { | |||
if (parent.isHidden() | |||
|| parent.getPath().contains(File.separator + ".")) { |
@@ -112,7 +112,7 @@ public class ClasspathHelper { | |||
} | |||
} | |||
private final static List<String> getRawClasspathEntries() { | |||
private static final List<String> getRawClasspathEntries() { | |||
List<String> locations = new ArrayList<>(); | |||
String pathSep = System.getProperty("path.separator"); |
@@ -232,7 +232,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { | |||
return getApplicationRunnerURIs(request).applicationClassname; | |||
} | |||
private final static class ProxyDeploymentConfiguration | |||
private static final class ProxyDeploymentConfiguration | |||
implements InvocationHandler, Serializable { | |||
private final DeploymentConfiguration originalConfiguration; | |||
@@ -61,7 +61,7 @@ import com.vaadin.launcher.util.BrowserLauncher; | |||
public class DevelopmentServerLauncher { | |||
private static final String KEYSTORE = "src/main/resources/com/vaadin/launcher/keystore"; | |||
private final static int serverPort = 8888; | |||
private static final int serverPort = 8888; | |||
/** | |||
* Main function for running Jetty. |
@@ -39,7 +39,7 @@ public abstract class AbstractComponentTestCase<T extends AbstractComponent> | |||
private List<T> testComponents = new ArrayList<>(); | |||
abstract protected Class<T> getTestClass(); | |||
protected abstract Class<T> getTestClass(); | |||
protected static ThemeResource uncacheableThemeResource( | |||
String resourceLocation) { | |||
@@ -51,7 +51,7 @@ public abstract class AbstractComponentTestCase<T extends AbstractComponent> | |||
return new ThemeResource(resourceLocation); | |||
} | |||
abstract protected void initializeComponents(); | |||
protected abstract void initializeComponents(); | |||
@Override | |||
protected void setup(VaadinRequest request) { |
@@ -26,8 +26,8 @@ import com.vaadin.ui.VerticalLayout; | |||
public class ButtonClick extends AbstractReindeerTestUI { | |||
public final static String SUCCESS_TEXT = "Click received succesfully!"; | |||
public final static String WRONG_BUTTON_TEXT = "Wrong button clicked."; | |||
public static final String SUCCESS_TEXT = "Click received succesfully!"; | |||
public static final String WRONG_BUTTON_TEXT = "Wrong button clicked."; | |||
@Override | |||
protected void setup(VaadinRequest request) { |
@@ -41,16 +41,16 @@ public class MenuBarsWithNesting extends AbstractReindeerTestUI { | |||
private final Label label = new Label("Initial content"); | |||
// The captions and icons used in the second MenuBar. | |||
public final static String[] itemNames = { "Icon item", "Arrow down", | |||
public static final String[] itemNames = { "Icon item", "Arrow down", | |||
"Arrow up", "Warning" }; | |||
private final static Resource[] itemIcons = { | |||
private static final Resource[] itemIcons = { | |||
new ThemeResource("window/img/restore.png"), VaadinIcons.ARROW_DOWN, | |||
VaadinIcons.ARROW_UP, VaadinIcons.WARNING }; | |||
// The last menu item is nested with the following submenu items. | |||
public final static String[] nestedItemnames = { "No icon", "Font icon", | |||
public static final String[] nestedItemnames = { "No icon", "Font icon", | |||
"Image icon" }; | |||
private final static Resource[] nestedItemIcons = { null, VaadinIcons.LINK, | |||
private static final Resource[] nestedItemIcons = { null, VaadinIcons.LINK, | |||
new ThemeResource("window/img/restore.png") }; | |||
private MenuBar.Command selectionCommand; |