From 556730ab5ae0daefbbc2e077463c68d2081eaec3 Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Mon, 25 Jun 2012 11:47:49 +0000 Subject: #8957 Ensure non-negative width svn changeset:23973/svn branch:6.8 --- .../vaadin/terminal/gwt/client/ui/VScrollTable.java | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 24097c0949..fa7621e512 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -3500,20 +3500,15 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, DOM.setStyleAttribute(captionContainer, "width", ""); setWidth(""); } else { - /* * Reduce width with one pixel for the right border since the * footers does not have any spacers between them. */ - int borderWidths = 1; + final int borderWidths = 1; // Set the container width (check for negative value) - if (w - borderWidths >= 0) { - captionContainer.getStyle().setPropertyPx("width", - w - borderWidths); - } else { - captionContainer.getStyle().setPropertyPx("width", 0); - } + captionContainer.getStyle().setPropertyPx("width", + Math.max(w - borderWidths, 0)); /* * if we already have tBody, set the header width properly, if @@ -3521,21 +3516,16 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, * unless TD width is not explicitly set. */ if (scrollBody != null) { - /* - * Reduce with one since footer does not have any spacers, - * instead a 1 pixel border. - */ int tdWidth = width + scrollBody.getCellExtraWidth() - borderWidths; - setWidth(tdWidth + "px"); + setWidth(Math.max(tdWidth, 0) + "px"); } else { Scheduler.get().scheduleDeferred(new Command() { public void execute() { - int borderWidths = 1; int tdWidth = width + scrollBody.getCellExtraWidth() - borderWidths; - setWidth(tdWidth + "px"); + setWidth(Math.max(tdWidth, 0) + "px"); } }); } -- cgit v1.2.3 From d4d61d68982b5ce5ff435ab7c8644709cdc5950e Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Tue, 26 Jun 2012 15:02:39 +0000 Subject: #8193 Listen to RootPanel keydown events to handle shortcut actions from PopupPanel/VOverlay widgets svn changeset:23977/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/ui/VView.java | 27 ++++++-- src/com/vaadin/terminal/gwt/client/ui/VWindow.java | 3 + .../popupview/PopupViewClickShortcut.java | 75 ++++++++++++++++++++++ 3 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java (limited to 'src') diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java index 6fdacc9607..3f0347c306 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java @@ -18,6 +18,8 @@ import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style; import com.google.gwt.dom.client.Style.Display; import com.google.gwt.event.dom.client.DomEvent.Type; +import com.google.gwt.event.dom.client.KeyDownEvent; +import com.google.gwt.event.dom.client.KeyDownHandler; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.event.shared.EventHandler; @@ -136,12 +138,31 @@ public class VView extends SimplePanel implements Container, ResizeHandler, // should not be in the document focus flow getElement().setTabIndex(-1); TouchScrollDelegate.enableTouchScrolling(this, getElement()); + + // Handle shortcut actions originated from the main window. Subwindow + // shortcut actions are handled by the subwindows themselves. + RootPanel.get().addDomHandler(new KeyDownHandler() { + public void onKeyDown(KeyDownEvent event) { + + Event nativeEvent = event.getNativeEvent().cast(); + com.google.gwt.user.client.Element target = nativeEvent + .getEventTarget().cast(); + // Ensure the event originates from our application even in case + // we're embedded. + if (actionHandler != null + && (!isEmbedded() || (Util.getPaintableForElement( + connection, getParent(), target) != null))) { + actionHandler.handleKeyboardEvent(nativeEvent); + } + } + }, KeyDownEvent.getType()); } /** * Start to periodically monitor for parent element resizes if embedded * application (e.g. portlet). */ + @Override protected void onLoad() { super.onLoad(); if (isMonitoringParentSize()) { @@ -569,10 +590,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler, public void onBrowserEvent(Event event) { super.onBrowserEvent(event); int type = DOM.eventGetType(event); - if (type == Event.ONKEYDOWN && actionHandler != null) { - actionHandler.handleKeyboardEvent(event); - return; - } else if (scrollable && type == Event.ONSCROLL) { + if (scrollable && type == Event.ONSCROLL) { updateScrollPosition(); } } @@ -934,5 +952,4 @@ public class VView extends SimplePanel implements Container, ResizeHandler, public void focus() { getElement().focus(); } - } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java index 2384ee7ddd..9b124ae466 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java @@ -1377,6 +1377,9 @@ public class VWindow extends VOverlay implements Container, if (shortcutHandler != null) { shortcutHandler .handleKeyboardEvent(Event.as(event.getNativeEvent())); + // Don't let the event propagate to the RootPanel where VView + // listens to shortcut events of the main window. + event.stopPropagation(); return; } } diff --git a/tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java b/tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java new file mode 100644 index 0000000000..7009d03f77 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java @@ -0,0 +1,75 @@ +package com.vaadin.tests.components.popupview; + +import com.vaadin.event.ShortcutAction.KeyCode; +import com.vaadin.event.ShortcutAction.ModifierKey; +import com.vaadin.tests.components.TestBase; +import com.vaadin.tests.util.Log; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.ComponentContainer; +import com.vaadin.ui.Layout; +import com.vaadin.ui.PopupView; +import com.vaadin.ui.Table; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.Window; + +public class PopupViewClickShortcut extends TestBase { + + private Window sub = new Window("Table", makeTable("Subwindow", KeyCode.S)); + + private Log log = new Log(5); + + @Override + protected void setup() { + sub.center(); + getMainWindow().addWindow(sub); + addComponent(log); + addComponent(new PopupView("Show popup table", makeTable("Popup", + KeyCode.P))); + addComponent(makeTable("Main window", KeyCode.M)); + sub.addComponent(new PopupView("Show popup table", makeTable( + "Subwindow popup", KeyCode.U))); + } + + private ComponentContainer makeTable(final String caption, int keyCode) { + final Table t = new Table(); + t.setSelectable(true); + t.setHeight("200px"); + t.setWidth("200px"); + t.addContainerProperty("foo", String.class, "foo"); + for (int i = 0; i < 5; i++) { + t.addItem(new String[] { "foo " + i }, i); + } + + final Layout l = new VerticalLayout(); + l.setCaption(caption); + l.setWidth(null); + + Button b = new Button("Submit " + caption, new Button.ClickListener() { + private int i = 5; + + public void buttonClick(ClickEvent event) { + log.log("Submitted from " + + event.getButton().getParent().getCaption()); + t.addItem(new String[] { "added " + i++ }, i); + } + }); + b.setClickShortcut(keyCode, ModifierKey.ALT); + + l.addComponent(t); + l.addComponent(b); + + return l; + } + + @Override + protected String getDescription() { + return "Enter ClickShortcut does not work with PopupView"; + } + + @Override + protected Integer getTicketNumber() { + return 8193; + } + +} -- cgit v1.2.3 From 3aab8e558b60088bb6dca5e75a320ef3dc6b0aba Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Mon, 9 Jul 2012 10:13:27 +0000 Subject: #7387 Render block elements in TreeTable hierarchy column correctly: draw the expand/collapse arrow as position: absolute and use padding for indentation. Also fix typo "ident" -> "indent". svn changeset:23994/svn branch:6.8 --- .../VAADIN/themes/base/treetable/treetable.css | 14 ++++--- WebContent/VAADIN/themes/reindeer/table/table.css | 6 +-- .../vaadin/terminal/gwt/client/ui/VTreeTable.java | 44 ++++++++++++++-------- 3 files changed, 41 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/WebContent/VAADIN/themes/base/treetable/treetable.css b/WebContent/VAADIN/themes/base/treetable/treetable.css index 1bc21b890c..662839a4a2 100644 --- a/WebContent/VAADIN/themes/base/treetable/treetable.css +++ b/WebContent/VAADIN/themes/base/treetable/treetable.css @@ -4,13 +4,13 @@ height: 10px; /* defines the amount of indent per level */ width: 18px; -} -.v-ie7 .v-treetable-treespacer{ - height: 100%; /* #7388 */ + position: absolute; + left: 0; + top: 5px; } .v-treetable-node-closed { - background: url(../treetable/img/arrow-right.png) right center no-repeat; + background: url(../treetable/img/arrow-right.png) right top no-repeat; } .v-ie6 .v-treetable-node-closed { @@ -18,7 +18,7 @@ } .v-treetable-node-open { - background: url(../treetable/img/arrow-down.png) right center no-repeat; + background: url(../treetable/img/arrow-down.png) right top no-repeat; } .v-ie6 .v-treetable-node-open { @@ -36,6 +36,10 @@ z-index: 10; } +.v-treetable .v-table-cell-wrapper { + position: relative; +} + .v-treetable .v-table-body .v-table-table .v-table-row-animating { zoom:1; z-index:1; diff --git a/WebContent/VAADIN/themes/reindeer/table/table.css b/WebContent/VAADIN/themes/reindeer/table/table.css index 2e6c597160..cab7d6a01f 100644 --- a/WebContent/VAADIN/themes/reindeer/table/table.css +++ b/WebContent/VAADIN/themes/reindeer/table/table.css @@ -130,9 +130,9 @@ text-shadow: #f3f5f8 0 1px 0; line-height: normal; } -.v-table-generated-row .v-table-cell-content { - padding-top: 1px; - padding-bottom: 2px; +.v-table-generated-row .v-table-cell-wrapper { + padding-top: 4px; + padding-bottom: 5px; } .v-table-cell-content:last-child { border-right-color: transparent; diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java b/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java index 324efcb67d..9899ec25e4 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java @@ -173,7 +173,7 @@ public class VTreeTable extends VScrollTable { } class VTreeTableScrollBody extends VScrollTable.VScrollTableBody { - private int identWidth = -1; + private int indentWidth = -1; VTreeTableScrollBody() { super(); @@ -241,7 +241,7 @@ public class VTreeTable extends VScrollTable { container.insertFirst(treeSpacer); depth = rowUidl.hasAttribute("depth") ? rowUidl .getIntAttribute("depth") : 0; - setIdent(); + setIndent(); isTreeCellAdded = true; return true; } @@ -278,18 +278,19 @@ public class VTreeTable extends VScrollTable { } - private void setIdent() { - if (getIdentWidth() > 0 && depth != 0) { - treeSpacer.getStyle().setWidth( - (depth + 1) * getIdentWidth(), Unit.PX); + private void setIndent() { + if (getIndentWidth() > 0) { + treeSpacer.getParentElement().getStyle() + .setPaddingLeft(getIndent(), Unit.PX); + treeSpacer.getStyle().setWidth(getIndent(), Unit.PX); } } @Override protected void onAttach() { super.onAttach(); - if (getIdentWidth() < 0) { - detectIdent(this); + if (getIndentWidth() < 0) { + detectIndent(this); } } @@ -326,6 +327,19 @@ public class VTreeTable extends VScrollTable { return consumedSpace; } + @Override + protected void setCellWidth(int cellIx, int width) { + if (cellIx == colIndexOfHierarchy + (showRowHeaders ? 1 : 0)) { + // take indentation padding into account if this is the + // hierarchy column + width -= getIndent(); + } + super.setCellWidth(cellIx, width); + } + + private int getIndent() { + return (depth + 1) * getIndentWidth(); + } } protected class VTreeTableGeneratedRow extends VTreeTableRow { @@ -452,20 +466,20 @@ public class VTreeTable extends VScrollTable { } } - private int getIdentWidth() { - return identWidth; + private int getIndentWidth() { + return indentWidth; } - private void detectIdent(VTreeTableRow vTreeTableRow) { - identWidth = vTreeTableRow.treeSpacer.getOffsetWidth(); - if (identWidth == 0) { - identWidth = -1; + private void detectIndent(VTreeTableRow vTreeTableRow) { + indentWidth = vTreeTableRow.treeSpacer.getOffsetWidth(); + if (indentWidth == 0) { + indentWidth = -1; return; } Iterator iterator = iterator(); while (iterator.hasNext()) { VTreeTableRow next = (VTreeTableRow) iterator.next(); - next.setIdent(); + next.setIndent(); } } -- cgit v1.2.3 From 0676a3a814529deca31a40080982509c4238519c Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Mon, 9 Jul 2012 12:32:17 +0000 Subject: Revert #8193 patch because of regressions svn changeset:24000/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/ui/VView.java | 27 ++++------------------ src/com/vaadin/terminal/gwt/client/ui/VWindow.java | 3 --- 2 files changed, 5 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java index 3f0347c306..6fdacc9607 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java @@ -18,8 +18,6 @@ import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style; import com.google.gwt.dom.client.Style.Display; import com.google.gwt.event.dom.client.DomEvent.Type; -import com.google.gwt.event.dom.client.KeyDownEvent; -import com.google.gwt.event.dom.client.KeyDownHandler; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.event.shared.EventHandler; @@ -138,31 +136,12 @@ public class VView extends SimplePanel implements Container, ResizeHandler, // should not be in the document focus flow getElement().setTabIndex(-1); TouchScrollDelegate.enableTouchScrolling(this, getElement()); - - // Handle shortcut actions originated from the main window. Subwindow - // shortcut actions are handled by the subwindows themselves. - RootPanel.get().addDomHandler(new KeyDownHandler() { - public void onKeyDown(KeyDownEvent event) { - - Event nativeEvent = event.getNativeEvent().cast(); - com.google.gwt.user.client.Element target = nativeEvent - .getEventTarget().cast(); - // Ensure the event originates from our application even in case - // we're embedded. - if (actionHandler != null - && (!isEmbedded() || (Util.getPaintableForElement( - connection, getParent(), target) != null))) { - actionHandler.handleKeyboardEvent(nativeEvent); - } - } - }, KeyDownEvent.getType()); } /** * Start to periodically monitor for parent element resizes if embedded * application (e.g. portlet). */ - @Override protected void onLoad() { super.onLoad(); if (isMonitoringParentSize()) { @@ -590,7 +569,10 @@ public class VView extends SimplePanel implements Container, ResizeHandler, public void onBrowserEvent(Event event) { super.onBrowserEvent(event); int type = DOM.eventGetType(event); - if (scrollable && type == Event.ONSCROLL) { + if (type == Event.ONKEYDOWN && actionHandler != null) { + actionHandler.handleKeyboardEvent(event); + return; + } else if (scrollable && type == Event.ONSCROLL) { updateScrollPosition(); } } @@ -952,4 +934,5 @@ public class VView extends SimplePanel implements Container, ResizeHandler, public void focus() { getElement().focus(); } + } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java index 9b124ae466..2384ee7ddd 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java @@ -1377,9 +1377,6 @@ public class VWindow extends VOverlay implements Container, if (shortcutHandler != null) { shortcutHandler .handleKeyboardEvent(Event.as(event.getNativeEvent())); - // Don't let the event propagate to the RootPanel where VView - // listens to shortcut events of the main window. - event.stopPropagation(); return; } } -- cgit v1.2.3 From ba2d51b6bd751eb9574bf245b56293f6dcdc2c06 Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Mon, 9 Jul 2012 15:47:51 +0000 Subject: #7387 bugfix: ensure non-negative width svn changeset:24004/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java b/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java index 9899ec25e4..4b1448cdfb 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTreeTable.java @@ -332,7 +332,7 @@ public class VTreeTable extends VScrollTable { if (cellIx == colIndexOfHierarchy + (showRowHeaders ? 1 : 0)) { // take indentation padding into account if this is the // hierarchy column - width -= getIndent(); + width = Math.max(width - getIndent(), 0); } super.setCellWidth(cellIx, width); } -- cgit v1.2.3 From 2738dca83648db5323652b4ac4c53d46eb6001c0 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Wed, 11 Jul 2012 09:25:04 +0000 Subject: #8230 #8917 Fix input prompt leaking to the field value in TextField and TextArea svn changeset:24011/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/ui/VTextField.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java index d1e4f7ca5b..b05b9ba830 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java @@ -433,7 +433,7 @@ public class VTextField extends TextBoxBase implements Paintable, Field, if (!prompting && newText != null && !newText.equals(valueBeforeEdit)) { sendValueChange = immediate; - client.updateVariable(id, "text", getText(), false); + client.updateVariable(id, "text", newText, false); valueBeforeEdit = newText; valueBeforeEditIsSynced = true; } @@ -500,6 +500,11 @@ public class VTextField extends TextBoxBase implements Paintable, Field, } public void onBlur(BlurEvent event) { + // this is called twice on Chrome when e.g. changing tab while prompting + // field focused - do not change settings on the second time + if (focusedTextField != this) { + return; + } removeStyleDependentName(CLASSNAME_FOCUS); focusedTextField = null; String text = getText(); -- cgit v1.2.3 From 482a7362d423a778e71b5e7fc1a7ac346d40c802 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Fri, 20 Jul 2012 14:46:33 +0000 Subject: #8291, #7666 fix Table NegativeArraySizeException when table size reduced by filter or otherwise, related test application svn changeset:24018/svn branch:6.8 --- src/com/vaadin/ui/Table.java | 3 +- .../com/vaadin/tests/tickets/Ticket8291.java | 121 +++++++++++++++++++++ 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 tests/testbench/com/vaadin/tests/tickets/Ticket8291.java (limited to 'src') diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 55f3f27507..60b6122270 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -1479,9 +1479,10 @@ public class Table extends AbstractSelect implements Action.Container, // Collects the basic facts about the table page final int pagelen = getPageLength(); - int firstIndex = getCurrentPageFirstItemIndex(); int rows, totalRows; rows = totalRows = size(); + int firstIndex = Math + .min(getCurrentPageFirstItemIndex(), totalRows - 1); if (rows > 0 && firstIndex >= 0) { rows -= firstIndex; } diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket8291.java b/tests/testbench/com/vaadin/tests/tickets/Ticket8291.java new file mode 100644 index 0000000000..86b5db953b --- /dev/null +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket8291.java @@ -0,0 +1,121 @@ +package com.vaadin.tests.tickets; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import com.vaadin.Application; +import com.vaadin.data.Container.Filter; +import com.vaadin.data.Item; +import com.vaadin.data.util.BeanItemContainer; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Table; +import com.vaadin.ui.Window; + +/** + * Test for #8291 and #7666: NegativeArraySizeException when Table scrolled to + * the end and its size reduced. + */ +public class Ticket8291 extends Application { + + @Override + public void init() { + setMainWindow(new Window("", new TestView())); + } + + private static class DecimateFilter implements Filter { + public boolean passesFilter(Object itemId, Item item) + throws UnsupportedOperationException { + return ((((TestObject) itemId).property3 % 10) == 0); + } + + public boolean appliesToProperty(Object propertyId) { + return true; + } + } + + private static class TestView extends HorizontalLayout { + + private Filter filter = null; + + private boolean reduceData; + + private TestView() { + final Table table = new Table(); + List data = createData(1000); + final BeanItemContainer container = new BeanItemContainer( + TestObject.class, data) { + + @Override + public int size() { + if (reduceData) { + return 100; + } else { + return super.size(); + } + } + }; + table.setContainerDataSource(container); + addComponent(table); + Button button = new Button("Click"); + button.addListener(new Button.ClickListener() { + public void buttonClick(ClickEvent event) { + reduceData = !reduceData; + table.refreshRowCache(); + } + }); + addComponent(button); + Button button2 = new Button("Filter"); + button2.addListener(new Button.ClickListener() { + public void buttonClick(ClickEvent event) { + if (filter != null) { + container.removeAllContainerFilters(); + filter = null; + } else { + filter = new DecimateFilter(); + container.addContainerFilter(filter); + } + table.refreshRowCache(); + } + }); + addComponent(button2); + } + } + + private static List createData(int count) { + ArrayList data = new ArrayList(count); + for (int i = 0; i < count; i++) { + data.add(new TestObject("string-" + i, new Date(), i)); + } + return data; + } + + public static class TestObject { + + private String property1; + private Date property2; + private Integer property3; + + public TestObject(String property1, Date property2, Integer property3) { + this.property1 = property1; + this.property2 = property2; + this.property3 = property3; + } + + public String getProperty1() { + return property1; + } + + public Date getProperty2() { + return property2; + } + + public Integer getProperty3() { + return property3; + } + + } + +} -- cgit v1.2.3 From b6ea64e917b69a80bd61c0541947fee8faf0e46c Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Fri, 20 Jul 2012 15:02:36 +0000 Subject: Fix a typo svn changeset:24019/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java b/src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java index 95d2fd0b5f..90912b4449 100644 --- a/src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java +++ b/src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java @@ -29,7 +29,7 @@ import com.vaadin.terminal.gwt.client.ui.VView; import com.vaadin.terminal.gwt.client.ui.VWindow; public class VUIDLBrowser extends SimpleTree { - private static final String HELP = "Shift click handle to open recursively. Click components to hightlight them on client side. Shift click components to highlight them also on the server side."; + private static final String HELP = "Shift click handle to open recursively. Click components to highlight them on client side. Shift click components to highlight them also on the server side."; private ApplicationConfiguration conf; private String highlightedPid; @@ -201,7 +201,7 @@ public class VUIDLBrowser extends SimpleTree { tmp.addItem(name + "=" + value); } if (tmp != null) { - add(tmp); + add(tmp); } } catch (final Exception e) { // Ignored, no variables -- cgit v1.2.3