@@ -19,6 +19,7 @@ package com.vaadin.client; | |||
import java.util.ArrayList; | |||
import java.util.HashMap; | |||
import java.util.HashSet; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Map.Entry; | |||
import java.util.Set; | |||
@@ -170,7 +171,7 @@ public class JavaScriptConnectorHelper { | |||
return false; | |||
} | |||
protected void showInitProblem(ArrayList<String> attemptedNames) { | |||
protected void showInitProblem(List<String> attemptedNames) { | |||
// Default does nothing | |||
} | |||
@@ -15,6 +15,8 @@ | |||
*/ | |||
package com.vaadin.client.ui; | |||
import java.util.List; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.client.JavaScriptConnectorHelper; | |||
import com.vaadin.client.communication.HasJavaScriptConnectorHelper; | |||
@@ -30,7 +32,7 @@ public final class JavaScriptComponentConnector extends | |||
this) { | |||
@Override | |||
protected void showInitProblem( | |||
java.util.ArrayList<String> attemptedNames) { | |||
List<String> attemptedNames) { | |||
getWidget().showNoInitFound(attemptedNames); | |||
} | |||
}; |
@@ -15,7 +15,7 @@ | |||
*/ | |||
package com.vaadin.client.ui; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import com.google.gwt.dom.client.Document; | |||
import com.google.gwt.user.client.ui.Widget; | |||
@@ -23,7 +23,7 @@ import com.google.gwt.user.client.ui.Widget; | |||
public class JavaScriptWidget extends Widget { | |||
/** | |||
* Creats a JavaScriptWidget based on a <div> element | |||
* Creates a JavaScriptWidget based on a <div> element | |||
*/ | |||
public JavaScriptWidget() { | |||
this("div"); | |||
@@ -39,7 +39,7 @@ public class JavaScriptWidget extends Widget { | |||
setElement(Document.get().createElement(tagName)); | |||
} | |||
public void showNoInitFound(ArrayList<String> attemptedNames) { | |||
public void showNoInitFound(List<String> attemptedNames) { | |||
String message = "Could not initialize JavaScriptConnector because no JavaScript init function was found. Make sure one of these functions are defined: <ul>"; | |||
for (String name : attemptedNames) { | |||
message += "<li>" + name + "</li>"; |
@@ -16,7 +16,7 @@ | |||
package com.vaadin.client.ui; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import com.google.gwt.core.client.Scheduler.ScheduledCommand; | |||
import com.google.gwt.dom.client.Element; | |||
@@ -343,7 +343,7 @@ public class VUI extends SimplePanel implements ResizeHandler, | |||
connection.flushActiveConnector(); | |||
} | |||
private native static void loadAppIdListFromDOM(ArrayList<String> list) | |||
private native static void loadAppIdListFromDOM(List<String> list) | |||
/*-{ | |||
var j; | |||
for(j in $wnd.vaadin.vaadinConfigurations) { |
@@ -312,7 +312,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
fireOrderEvent(list); | |||
} | |||
private static void fireOrderEvent(ArrayList<VWindow> windows) { | |||
private static void fireOrderEvent(List<VWindow> windows) { | |||
WINDOW_ORDER_HANDLER | |||
.fireEvent(new WindowOrderEvent(new ArrayList<>(windows))); | |||
} |
@@ -15,7 +15,7 @@ | |||
*/ | |||
package com.vaadin.client.ui.window; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import com.google.gwt.event.shared.GwtEvent; | |||
import com.vaadin.client.ui.VWindow; | |||
@@ -31,7 +31,7 @@ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { | |||
private static final Type<WindowOrderHandler> TYPE = new Type<>(); | |||
private final ArrayList<VWindow> windows; | |||
private final List<VWindow> windows; | |||
/** | |||
* Creates a new event with the given order. | |||
@@ -39,7 +39,7 @@ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { | |||
* @param windows | |||
* The new order position for the VWindow | |||
*/ | |||
public WindowOrderEvent(ArrayList<VWindow> windows) { | |||
public WindowOrderEvent(List<VWindow> windows) { | |||
this.windows = windows; | |||
} | |||
@@ -263,7 +263,7 @@ public abstract class UI extends AbstractSingleComponentContainer | |||
@Override | |||
public void windowOrderChanged( | |||
HashMap<Integer, Connector> windowOrders) { | |||
Map<Integer, Connector> windowOrders) { | |||
Map<Integer, Window> orders = new LinkedHashMap<>(); | |||
for (Entry<Integer, Connector> entry : windowOrders.entrySet()) { | |||
if (entry.getValue() instanceof Window) { |
@@ -15,7 +15,7 @@ | |||
*/ | |||
package com.vaadin.shared.ui; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
import com.vaadin.shared.Connector; | |||
import com.vaadin.shared.communication.ServerRpc; | |||
@@ -37,5 +37,5 @@ public interface WindowOrderRpc extends ServerRpc { | |||
* @param windowOrders | |||
* new windows order | |||
*/ | |||
void windowOrderChanged(HashMap<Integer, Connector> windowOrders); | |||
void windowOrderChanged(Map<Integer, Connector> windowOrders); | |||
} |