Browse Source

#5692 Generics: mostly UIDL.getChildIterator related changes; UIDL.getChildIterator() related code should be improved

svn changeset:15333/svn branch:6.5
tags/6.7.0.beta1
Henri Sara 13 years ago
parent
commit
eca26c9630

+ 1
- 3
src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java View File

@@ -18,11 +18,9 @@ import com.google.gwt.user.client.ui.KeyboardListenerCollection;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.Container;
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea;

/**
* A helper class to implement keyboard shorcut handling. Keeps a list of owners
@@ -94,7 +92,7 @@ public class ShortcutActionHandler {
*/
public void updateActionMap(UIDL c) {
actions.clear();
final Iterator it = c.getChildIterator();
final Iterator<?> it = c.getChildIterator();
while (it.hasNext()) {
final UIDL action = (UIDL) it.next();


+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java View File

@@ -107,7 +107,7 @@ public class VFormLayout extends SimplePanel implements Container {
uidl.hasAttribute("spacing"));

int i = 0;
for (final Iterator it = uidl.getChildIterator(); it.hasNext(); i++) {
for (final Iterator<?> it = uidl.getChildIterator(); it.hasNext(); i++) {
prepareCell(i, 1);
final UIDL childUidl = (UIDL) it.next();
final Paintable p = client.getPaintable(childUidl);

+ 5
- 4
src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java View File

@@ -143,10 +143,10 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {

LinkedList<Cell> relativeHeighted = new LinkedList<Cell>();

for (final Iterator i = uidl.getChildIterator(); i.hasNext();) {
for (final Iterator<?> i = uidl.getChildIterator(); i.hasNext();) {
final UIDL r = (UIDL) i.next();
if ("gr".equals(r.getTag())) {
for (final Iterator j = r.getChildIterator(); j.hasNext();) {
for (final Iterator<?> j = r.getChildIterator(); j.hasNext();) {
final UIDL c = (UIDL) j.next();
if ("gc".equals(c.getTag())) {
Cell cell = getCell(c);
@@ -483,8 +483,9 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {
private void renderRemainingComponentsWithNoRelativeHeight(
LinkedList<Cell> pendingCells) {

for (Iterator iterator = pendingCells.iterator(); iterator.hasNext();) {
Cell cell = (Cell) iterator.next();
for (Iterator<Cell> iterator = pendingCells.iterator(); iterator
.hasNext();) {
Cell cell = iterator.next();
if (!cell.hasRelativeHeight()) {
cell.render();
iterator.remove();

+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/VListSelect.java View File

@@ -46,7 +46,7 @@ public class VListSelect extends VOptionGroupBase {
// can't unselect last item in singleselect mode
select.addItem("", null);
}
for (final Iterator i = uidl.getChildIterator(); i.hasNext();) {
for (final Iterator<?> i = uidl.getChildIterator(); i.hasNext();) {
final UIDL optionUidl = (UIDL) i.next();
select.addItem(optionUidl.getStringAttribute("caption"),
optionUidl.getStringAttribute("key"));

+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java View File

@@ -38,7 +38,7 @@ public class VNativeSelect extends VOptionGroupBase implements Field {
select.addItem("", null);
}
boolean selected = false;
for (final Iterator i = uidl.getChildIterator(); i.hasNext();) {
for (final Iterator<?> i = uidl.getChildIterator(); i.hasNext();) {
final UIDL optionUidl = (UIDL) i.next();
select.addItem(optionUidl.getStringAttribute("caption"),
optionUidl.getStringAttribute("key"));

+ 3
- 3
src/com/vaadin/terminal/gwt/client/ui/VTree.java View File

@@ -171,7 +171,7 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
}

private void updateActionMap(UIDL c) {
final Iterator it = c.getChildIterator();
final Iterator<?> it = c.getChildIterator();
while (it.hasNext()) {
final UIDL action = (UIDL) it.next();
final String key = action.getStringAttribute("key");
@@ -223,7 +223,7 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
isNullSelectionAllowed = uidl.getBooleanAttribute("nullselect");

body.clear();
for (final Iterator i = uidl.getChildIterator(); i.hasNext();) {
for (final Iterator<?> i = uidl.getChildIterator(); i.hasNext();) {
final UIDL childUidl = (UIDL) i.next();
if ("actions".equals(childUidl.getTag())) {
updateActionMap(childUidl);
@@ -890,7 +890,7 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
DOM.setInnerText(nodeCaptionSpan, text);
}

private void renderChildNodes(Iterator i) {
private void renderChildNodes(Iterator<?> i) {
childNodeContainer.clear();
childNodeContainer.setVisible(true);
while (i.hasNext()) {

+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java View File

@@ -115,7 +115,7 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
remove.setEnabled(enabled);
options.clear();
selections.clear();
for (final Iterator i = uidl.getChildIterator(); i.hasNext();) {
for (final Iterator<?> i = uidl.getChildIterator(); i.hasNext();) {
final UIDL optionUidl = (UIDL) i.next();
if (optionUidl.hasAttribute("selected")) {
selections.addItem(optionUidl.getStringAttribute("caption"),

+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/VView.java View File

@@ -271,7 +271,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
String script = childUidl.getStringAttribute("script");
eval(script);
} else if (tag == "notifications") {
for (final Iterator it = childUidl.getChildIterator(); it
for (final Iterator<?> it = childUidl.getChildIterator(); it
.hasNext();) {
final UIDL notification = (UIDL) it.next();
String html = "";

+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/VWindow.java View File

@@ -403,7 +403,7 @@ public class VWindow extends VOverlay implements Container, ScrollListener,
shortcutHandler.updateActionMap(childUidl);
} else if (childUidl.getTag().equals("notifications")) {
// TODO needed? move ->
for (final Iterator it = childUidl.getChildIterator(); it
for (final Iterator<?> it = childUidl.getChildIterator(); it
.hasNext();) {
final UIDL notification = (UIDL) it.next();
String html = "";

Loading…
Cancel
Save