diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2012-09-10 22:12:47 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-09-11 12:19:02 +0300 |
commit | 0f5284bb827b5f04c6c064c851b851604293665a (patch) | |
tree | 4c9949ba7fa08dfae4f276f95c6928cae8b7760f /uitest | |
parent | 8a904080835193e322e1f006aa65f490f2cd930a (diff) | |
download | vaadin-framework-0f5284bb827b5f04c6c064c851b851604293665a.tar.gz vaadin-framework-0f5284bb827b5f04c6c064c851b851604293665a.zip |
Constants -> enums (#9072)
Patch from Pekka with minor changes (ButtonCode -> MouseButton, FilteringMode -> ComboBox)
Diffstat (limited to 'uitest')
23 files changed, 65 insertions, 65 deletions
diff --git a/uitest/src/com/vaadin/tests/Components.java b/uitest/src/com/vaadin/tests/Components.java index 8295528fc3..97a1479df3 100644 --- a/uitest/src/com/vaadin/tests/Components.java +++ b/uitest/src/com/vaadin/tests/Components.java @@ -17,6 +17,7 @@ import com.vaadin.event.ItemClickEvent; import com.vaadin.event.ItemClickEvent.ItemClickListener; import com.vaadin.server.ExternalResource; import com.vaadin.server.Sizeable; +import com.vaadin.shared.MouseEventDetails.MouseButton; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.tests.components.AbstractComponentTest; import com.vaadin.ui.AbstractComponent; @@ -189,10 +190,10 @@ public class Components extends LegacyApplication { if (!isAbstract(cls)) { String url = baseUrl + cls.getName() + "?restartApplication"; - if (event.getButton() == ItemClickEvent.BUTTON_LEFT) { + if (event.getButton() == MouseButton.LEFT) { openEmbedded(url); naviTree.setValue(event.getItemId()); - } else if (event.getButton() == ItemClickEvent.BUTTON_RIGHT) { + } else if (event.getButton() == MouseButton.RIGHT) { openInNewTab(url); } } diff --git a/uitest/src/com/vaadin/tests/TestSizeableIncomponents.java b/uitest/src/com/vaadin/tests/TestSizeableIncomponents.java index cc7ba23405..732895cddf 100644 --- a/uitest/src/com/vaadin/tests/TestSizeableIncomponents.java +++ b/uitest/src/com/vaadin/tests/TestSizeableIncomponents.java @@ -26,6 +26,7 @@ import com.vaadin.data.Container; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.util.IndexedContainer; import com.vaadin.server.ThemeResource; +import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.ui.AbstractComponent; import com.vaadin.ui.AbstractSelect; import com.vaadin.ui.Button; @@ -63,7 +64,7 @@ public class TestSizeableIncomponents extends LegacyApplication { select = new ComboBox(); select.setImmediate(true); - select.setFilteringMode(ComboBox.FILTERINGMODE_CONTAINS); + select.setFilteringMode(FilteringMode.CONTAINS); select.setWidth("400px"); prev = new Button("<<-|"); diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java index 38bdf0c5fe..f7d12356f7 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcut.java @@ -1,9 +1,9 @@ package com.vaadin.tests.components.combobox; import com.vaadin.event.ShortcutAction.KeyCode; +import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Log; -import com.vaadin.ui.AbstractSelect.Filtering; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.ComboBox; @@ -21,7 +21,7 @@ public class ComboBoxCombinedWithEnterShortcut extends TestBase { l.addItem(cities[i]); } - l.setFilteringMode(Filtering.FILTERINGMODE_OFF); + l.setFilteringMode(FilteringMode.OFF); l.setImmediate(true); l.setNewItemsAllowed(true); diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNavigation.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNavigation.java index 245fc123df..0e355af302 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNavigation.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxNavigation.java @@ -1,5 +1,6 @@ package com.vaadin.tests.components.combobox; +import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.ComboBox; @@ -22,7 +23,7 @@ public class ComboBoxNavigation extends TestBase { cb.addItem("Item " + i); } - cb.setFilteringMode(ComboBox.FILTERINGMODE_CONTAINS); + cb.setFilteringMode(FilteringMode.CONTAINS); addComponent(cb); } diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java index 1ae16db2cb..6b9b05e4ac 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java @@ -5,7 +5,7 @@ import com.vaadin.data.Container; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.data.util.IndexedContainer; -import com.vaadin.ui.AbstractSelect; +import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.ui.ComboBox; import com.vaadin.ui.Label; import com.vaadin.ui.UI.LegacyWindow; @@ -31,7 +31,7 @@ public class ComboBoxReapperingOldValue extends LegacyApplication implements layout.addComponent(lbl); cbox1.setCaption("Com Box 1"); - cbox1.setFilteringMode(AbstractSelect.Filtering.FILTERINGMODE_CONTAINS); + cbox1.setFilteringMode(FilteringMode.CONTAINS); cbox1.setContainerDataSource(getContainer()); cbox1.setImmediate(true); cbox1.setNullSelectionAllowed(false); diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java index 9e1fab0cda..356181238e 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java @@ -1,5 +1,6 @@ package com.vaadin.tests.components.combobox; +import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.ComboBox; @@ -32,7 +33,7 @@ public class ComboBoxValueInput extends TestBase { addComponent(cb); cb = getComboBox("A combobox with filteringMode off", false); - cb.setFilteringMode(ComboBox.FILTERINGMODE_OFF); + cb.setFilteringMode(FilteringMode.OFF); } diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxes2.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxes2.java index c72fdd7132..867ef6b35c 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxes2.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxes2.java @@ -3,6 +3,7 @@ package com.vaadin.tests.components.combobox; import java.util.LinkedHashMap; import com.vaadin.server.Resource; +import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.tests.components.select.AbstractSelectTestCase; import com.vaadin.ui.ComboBox; @@ -14,10 +15,10 @@ public class ComboBoxes2<T extends ComboBox> extends AbstractSelectTestCase<T> { c.setInputPrompt(value); } }; - private Command<T, Integer> filteringModeCommand = new Command<T, Integer>() { + private Command<T, FilteringMode> filteringModeCommand = new Command<T, FilteringMode>() { @Override - public void execute(T c, Integer value, Object data) { + public void execute(T c, FilteringMode value, Object data) { c.setFilteringMode(value); } }; @@ -58,10 +59,10 @@ public class ComboBoxes2<T extends ComboBox> extends AbstractSelectTestCase<T> { } private void createFilteringModeAction(String category) { - LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>(); - options.put("Off", ComboBox.FILTERINGMODE_OFF); - options.put("Contains", ComboBox.FILTERINGMODE_CONTAINS); - options.put("Starts with", ComboBox.FILTERINGMODE_STARTSWITH); + LinkedHashMap<String, FilteringMode> options = new LinkedHashMap<String, FilteringMode>(); + options.put("Off", FilteringMode.OFF); + options.put("Contains", FilteringMode.CONTAINS); + options.put("Starts with", FilteringMode.STARTSWITH); createSelectAction("Filtering mode", category, options, "Contains", filteringModeCommand); diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java index ac3296724b..56265203a1 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java @@ -3,10 +3,10 @@ package com.vaadin.tests.components.datefield; import java.util.Date; import java.util.Locale; +import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.ui.Alignment; import com.vaadin.ui.DateField; -import com.vaadin.ui.DateField.Resolution; import com.vaadin.ui.GridLayout; import com.vaadin.ui.UI.LegacyWindow; diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java index c085088917..070631bac2 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java @@ -7,9 +7,9 @@ import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.data.util.BeanItem; import com.vaadin.data.validator.RangeValidator; +import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.CheckBox; -import com.vaadin.ui.DateField.Resolution; import com.vaadin.ui.PopupDateField; public class DateFieldRangeValidation extends TestBase { diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldTest.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldTest.java index c502b9597e..d92199a214 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldTest.java +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldTest.java @@ -7,9 +7,9 @@ import java.util.Date; import java.util.LinkedHashMap; import java.util.Locale; +import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.tests.components.abstractfield.AbstractFieldTest; import com.vaadin.ui.DateField; -import com.vaadin.ui.DateField.Resolution; public class DateFieldTest<T extends DateField> extends AbstractFieldTest<T> { @@ -97,12 +97,12 @@ public class DateFieldTest<T extends DateField> extends AbstractFieldTest<T> { private void createResolutionSelectAction(String category) { LinkedHashMap<String, Resolution> options = new LinkedHashMap<String, Resolution>(); - options.put("Year", DateField.Resolution.YEAR); - options.put("Month", DateField.Resolution.MONTH); - options.put("Day", DateField.Resolution.DAY); - options.put("Hour", DateField.Resolution.HOUR); - options.put("Min", DateField.Resolution.MINUTE); - options.put("Sec", DateField.Resolution.SECOND); + options.put("Year", Resolution.YEAR); + options.put("Month", Resolution.MONTH); + options.put("Day", Resolution.DAY); + options.put("Hour", Resolution.HOUR); + options.put("Min", Resolution.MINUTE); + options.put("Sec", Resolution.SECOND); createSelectAction("Resolution", category, options, "Year", resolutionCommand); diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldTimezone.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldTimezone.java index 6f31b4d80f..6109b7cc14 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldTimezone.java +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldTimezone.java @@ -10,11 +10,12 @@ import java.util.TimeZone; import com.vaadin.data.Property; import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.shared.ui.combobox.FilteringMode; +import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Log; import com.vaadin.ui.ComboBox; import com.vaadin.ui.DateField; -import com.vaadin.ui.DateField.Resolution; public class DateFieldTimezone extends TestBase { @@ -49,7 +50,7 @@ public class DateFieldTimezone extends TestBase { timezoneSelector.setImmediate(true); timezoneSelector.setNullSelectionAllowed(true); timezoneSelector.setNullSelectionItemId(nullValue); - timezoneSelector.setFilteringMode(ComboBox.FILTERINGMODE_CONTAINS); + timezoneSelector.setFilteringMode(FilteringMode.CONTAINS); timezoneSelector.addListener(new Property.ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { diff --git a/uitest/src/com/vaadin/tests/components/datefield/InlineDateFields.java b/uitest/src/com/vaadin/tests/components/datefield/InlineDateFields.java index ea384d5634..1f8ef358af 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/InlineDateFields.java +++ b/uitest/src/com/vaadin/tests/components/datefield/InlineDateFields.java @@ -5,10 +5,9 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; +import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.tests.components.ComponentTestCase; import com.vaadin.ui.Component; -import com.vaadin.ui.DateField; -import com.vaadin.ui.DateField.Resolution; import com.vaadin.ui.InlineDateField; @SuppressWarnings("serial") @@ -52,7 +51,7 @@ public class InlineDateFields extends ComponentTestCase<InlineDateField> { pd.setWidth(width); pd.setValue(new Date(12312312313L)); pd.setLocale(locale); - pd.setResolution(DateField.Resolution.YEAR); + pd.setResolution(Resolution.YEAR); return pd; } @@ -72,12 +71,12 @@ public class InlineDateFields extends ComponentTestCase<InlineDateField> { private Component createResolutionSelectAction() { LinkedHashMap<String, Resolution> options = new LinkedHashMap<String, Resolution>(); - options.put("Year", DateField.Resolution.YEAR); - options.put("Month", DateField.Resolution.MONTH); - options.put("Day", DateField.Resolution.DAY); - options.put("Hour", DateField.Resolution.HOUR); - options.put("Min", DateField.Resolution.MINUTE); - options.put("Sec", DateField.Resolution.SECOND); + options.put("Year", Resolution.YEAR); + options.put("Month", Resolution.MONTH); + options.put("Day", Resolution.DAY); + options.put("Hour", Resolution.HOUR); + options.put("Min", Resolution.MINUTE); + options.put("Sec", Resolution.SECOND); return createSelectAction("Resolution", options, "Year", new Command<InlineDateField, Resolution>() { diff --git a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFields.java b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFields.java index e69de5de12..9daf89d950 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/PopupDateFields.java +++ b/uitest/src/com/vaadin/tests/components/datefield/PopupDateFields.java @@ -5,10 +5,9 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; +import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.tests.components.ComponentTestCase; import com.vaadin.ui.Component; -import com.vaadin.ui.DateField; -import com.vaadin.ui.DateField.Resolution; import com.vaadin.ui.PopupDateField; @SuppressWarnings("serial") @@ -48,7 +47,7 @@ public class PopupDateFields extends ComponentTestCase<PopupDateField> { pd.setWidth(width); pd.setValue(new Date(12312312313L)); pd.setLocale(locale); - pd.setResolution(DateField.Resolution.YEAR); + pd.setResolution(Resolution.YEAR); return pd; } @@ -68,12 +67,12 @@ public class PopupDateFields extends ComponentTestCase<PopupDateField> { private Component createResolutionSelectAction() { LinkedHashMap<String, Resolution> options = new LinkedHashMap<String, Resolution>(); - options.put("Year", DateField.Resolution.YEAR); - options.put("Month", DateField.Resolution.MONTH); - options.put("Day", DateField.Resolution.DAY); - options.put("Hour", DateField.Resolution.HOUR); - options.put("Min", DateField.Resolution.MINUTE); - options.put("Sec", DateField.Resolution.SECOND); + options.put("Year", Resolution.YEAR); + options.put("Month", Resolution.MONTH); + options.put("Day", Resolution.DAY); + options.put("Hour", Resolution.HOUR); + options.put("Min", Resolution.MINUTE); + options.put("Sec", Resolution.SECOND); return createSelectAction("Resolution", options, "Year", new Command<PopupDateField, Resolution>() { diff --git a/uitest/src/com/vaadin/tests/components/link/LinkTargetSize.java b/uitest/src/com/vaadin/tests/components/link/LinkTargetSize.java index 822a8d5991..cb537c88ae 100644 --- a/uitest/src/com/vaadin/tests/components/link/LinkTargetSize.java +++ b/uitest/src/com/vaadin/tests/components/link/LinkTargetSize.java @@ -1,6 +1,7 @@ package com.vaadin.tests.components.link; import com.vaadin.server.ExternalResource; +import com.vaadin.shared.ui.BorderStyle; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Link; @@ -23,7 +24,7 @@ public class LinkTargetSize extends TestBase { l.setTargetName("_blank"); l.setTargetWidth(300); l.setTargetHeight(300); - l.setTargetBorder(Link.TARGET_BORDER_NONE); + l.setTargetBorder(BorderStyle.NONE); addComponent(l); } diff --git a/uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple.java b/uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple.java index 56fb7c1c7d..d6a79759ac 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple.java +++ b/uitest/src/com/vaadin/tests/components/table/TableMultiSelectSimple.java @@ -5,9 +5,9 @@ import java.util.TreeSet; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; +import com.vaadin.shared.ui.MultiSelectMode; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Log; -import com.vaadin.ui.AbstractSelect.MultiSelectMode; import com.vaadin.ui.Button; import com.vaadin.ui.Component; import com.vaadin.ui.Table; diff --git a/uitest/src/com/vaadin/tests/components/table/Tables.java b/uitest/src/com/vaadin/tests/components/table/Tables.java index 2f06351a81..c8d1061943 100644 --- a/uitest/src/com/vaadin/tests/components/table/Tables.java +++ b/uitest/src/com/vaadin/tests/components/table/Tables.java @@ -9,9 +9,9 @@ import com.vaadin.event.Action; import com.vaadin.event.Action.Handler; import com.vaadin.event.ItemClickEvent.ItemClickListener; import com.vaadin.server.Resource; +import com.vaadin.shared.ui.MultiSelectMode; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.tests.components.select.AbstractSelectTestCase; -import com.vaadin.ui.AbstractSelect.MultiSelectMode; import com.vaadin.ui.Button; import com.vaadin.ui.Label; import com.vaadin.ui.Table; diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeItemClickListening.java b/uitest/src/com/vaadin/tests/components/tree/TreeItemClickListening.java index 182bc97c44..724c1c6f62 100644 --- a/uitest/src/com/vaadin/tests/components/tree/TreeItemClickListening.java +++ b/uitest/src/com/vaadin/tests/components/tree/TreeItemClickListening.java @@ -32,13 +32,13 @@ public class TreeItemClickListening extends TestBase { public void itemClick(ItemClickEvent event) { clickCounter++; switch (event.getButton()) { - case ItemClickEvent.BUTTON_LEFT: + case LEFT: log.log("Left Click"); break; - case ItemClickEvent.BUTTON_RIGHT: + case RIGHT: log.log("Right Click"); break; - case ItemClickEvent.BUTTON_MIDDLE: + case MIDDLE: log.log("Middle Click"); break; } diff --git a/uitest/src/com/vaadin/tests/components/tree/Trees.java b/uitest/src/com/vaadin/tests/components/tree/Trees.java index 8796fb854c..412840a937 100644 --- a/uitest/src/com/vaadin/tests/components/tree/Trees.java +++ b/uitest/src/com/vaadin/tests/components/tree/Trees.java @@ -10,8 +10,8 @@ import com.vaadin.data.Container.Hierarchical; import com.vaadin.data.util.HierarchicalContainer; import com.vaadin.event.Action; import com.vaadin.event.Action.Handler; +import com.vaadin.shared.ui.MultiSelectMode; import com.vaadin.tests.components.select.AbstractSelectTestCase; -import com.vaadin.ui.AbstractSelect.MultiSelectMode; import com.vaadin.ui.Tree; import com.vaadin.ui.Tree.CollapseEvent; import com.vaadin.ui.Tree.CollapseListener; diff --git a/uitest/src/com/vaadin/tests/containers/sqlcontainer/ComboBoxUpdateProblem.java b/uitest/src/com/vaadin/tests/containers/sqlcontainer/ComboBoxUpdateProblem.java index edaefeb0c3..737563f975 100644 --- a/uitest/src/com/vaadin/tests/containers/sqlcontainer/ComboBoxUpdateProblem.java +++ b/uitest/src/com/vaadin/tests/containers/sqlcontainer/ComboBoxUpdateProblem.java @@ -1,7 +1,7 @@ package com.vaadin.tests.containers.sqlcontainer; import com.vaadin.LegacyApplication; -import com.vaadin.ui.AbstractSelect.Filtering; +import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.ui.ComboBox; import com.vaadin.ui.UI; @@ -18,7 +18,7 @@ public class ComboBoxUpdateProblem extends LegacyApplication { ComboBox combo = new ComboBox("Names", databaseHelper.getTestContainer()); combo.setItemCaptionPropertyId("FIELD1"); - combo.setFilteringMode(Filtering.FILTERINGMODE_CONTAINS); + combo.setFilteringMode(FilteringMode.CONTAINS); combo.setImmediate(true); getMainWindow().addComponent(combo); diff --git a/uitest/src/com/vaadin/tests/layouts/TestLayoutClickListeners.java b/uitest/src/com/vaadin/tests/layouts/TestLayoutClickListeners.java index d1a924e71c..359e77197f 100644 --- a/uitest/src/com/vaadin/tests/layouts/TestLayoutClickListeners.java +++ b/uitest/src/com/vaadin/tests/layouts/TestLayoutClickListeners.java @@ -2,7 +2,6 @@ package com.vaadin.tests.layouts; import com.vaadin.event.LayoutEvents.LayoutClickEvent; import com.vaadin.event.LayoutEvents.LayoutClickListener; -import com.vaadin.event.MouseEvents.ClickEvent; import com.vaadin.tests.components.AbstractTestCase; import com.vaadin.tests.util.Log; import com.vaadin.ui.AbsoluteLayout; @@ -147,13 +146,7 @@ public class TestLayoutClickListeners extends AbstractTestCase { target = ((Label) component).getValue().toString(); } } - String button = "left"; - if (event.getButton() == ClickEvent.BUTTON_RIGHT) { - button = "right"; - } else if (event.getButton() == ClickEvent.BUTTON_MIDDLE) { - button = "middle"; - - } + String button = event.getButtonName(); String type = "click"; if (event.isDoubleClick()) { type = "double-click"; diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1506_Panel.java b/uitest/src/com/vaadin/tests/tickets/Ticket1506_Panel.java index 9835e046dc..5f36427733 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1506_Panel.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1506_Panel.java @@ -2,6 +2,7 @@ package com.vaadin.tests.tickets; import com.vaadin.data.Container; import com.vaadin.data.util.ObjectProperty; +import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.ui.Button; import com.vaadin.ui.Component; import com.vaadin.ui.Panel; @@ -37,7 +38,7 @@ public class Ticket1506_Panel extends Panel { private Component initSelect(Container containerDataSource, String caption, ObjectProperty<?> property) { Select select = new Select(caption); - select.setFilteringMode(Select.FILTERINGMODE_CONTAINS); + select.setFilteringMode(FilteringMode.CONTAINS); select.setImmediate(true); select.setNullSelectionAllowed(false); select.setItemCaptionPropertyId(Ticket1506_TestContainer.PROPERTY_2_ID); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2009.java b/uitest/src/com/vaadin/tests/tickets/Ticket2009.java index 538ffb762b..64429ed75b 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2009.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2009.java @@ -44,7 +44,7 @@ public class Ticket2009 extends com.vaadin.LegacyApplication { public void itemClick(ItemClickEvent event) { events.addComponent(new Label(new Label("Click:" + (event.isDoubleClick() ? "double" : "single") - + " button:" + event.getButton() + " propertyId:" + + " button:" + event.getButtonName() + " propertyId:" + event.getPropertyId() + " itemID:" + event.getItemId() + " item:" + event.getItem()))); @@ -67,7 +67,7 @@ public class Ticket2009 extends com.vaadin.LegacyApplication { public void itemClick(ItemClickEvent event) { events2.addComponent(new Label("Click:" + (event.isDoubleClick() ? "double" : "single") - + " button:" + event.getButton() + " propertyId:" + + " button:" + event.getButtonName() + " propertyId:" + event.getPropertyId() + " itemID:" + event.getItemId() + " item:" + event.getItem())); if (event.isDoubleClick()) { diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2043.java b/uitest/src/com/vaadin/tests/tickets/Ticket2043.java index d3d984c8be..834301fb1c 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2043.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2043.java @@ -2,6 +2,7 @@ package com.vaadin.tests.tickets; import com.vaadin.LegacyApplication; import com.vaadin.server.ExternalResource; +import com.vaadin.shared.ui.BorderStyle; import com.vaadin.ui.GridLayout; import com.vaadin.ui.Link; import com.vaadin.ui.UI.LegacyWindow; @@ -21,7 +22,7 @@ public class Ticket2043 extends LegacyApplication { private void createUI(GridLayout layout) { Link l = new Link("Vaadin home (new 200x200 window, no decor, icon)", new ExternalResource("http://www.vaadin.com"), "_blank", 200, - 200, Link.TARGET_BORDER_NONE); + 200, BorderStyle.NONE); layout.addComponent(l); } |