import com.vaadin.client.ui.menubar.MenuItem;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.ui.ComponentStateUtil;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.shared.util.SharedUtil;
import com.vaadin.v7.client.ui.combobox.ComboBoxConnector;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
/**
* Client side implementation of the Select component.
import com.vaadin.shared.EventId;
import com.vaadin.shared.communication.FieldRpc.FocusAndBlurServerRpc;
import com.vaadin.shared.ui.Connect;
-import com.vaadin.shared.ui.combobox.ComboBoxServerRpc;
-import com.vaadin.shared.ui.combobox.ComboBoxState;
import com.vaadin.v7.client.ui.AbstractFieldConnector;
import com.vaadin.v7.client.ui.VFilterSelect;
import com.vaadin.v7.client.ui.VFilterSelect.DataReceivedHandler;
import com.vaadin.v7.client.ui.VFilterSelect.FilterSelectSuggestion;
+import com.vaadin.v7.shared.ui.combobox.ComboBoxServerRpc;
+import com.vaadin.v7.shared.ui.combobox.ComboBoxState;
import com.vaadin.v7.ui.ComboBox;
@Connect(ComboBox.class)
import com.vaadin.server.PaintTarget;
import com.vaadin.server.Resource;
import com.vaadin.server.VaadinSession;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.shared.ui.dd.VerticalDropLocation;
import com.vaadin.shared.ui.select.AbstractSelectState;
import com.vaadin.ui.Component;
import com.vaadin.v7.data.util.converter.Converter;
import com.vaadin.v7.data.util.converter.Converter.ConversionException;
import com.vaadin.v7.event.DataBoundTransferable;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.data.util.converter.ConverterUtil;
/**
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.server.Resource;
-import com.vaadin.shared.ui.combobox.ComboBoxServerRpc;
-import com.vaadin.shared.ui.combobox.ComboBoxState;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.ui.Component;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.data.util.filter.SimpleStringFilter;
+import com.vaadin.v7.shared.ui.combobox.ComboBoxServerRpc;
+import com.vaadin.v7.shared.ui.combobox.ComboBoxState;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
/**
* A filtering dropdown single-select. Suitable for newItemsAllowed, but it's
import org.junit.Test;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.tests.design.DeclarativeTestBase;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
public class ComboBoxDeclarativeTest extends DeclarativeTestBase<ComboBox> {
import org.junit.Assert;
import org.junit.Test;
-import com.vaadin.shared.ui.combobox.ComboBoxState;
+import com.vaadin.v7.shared.ui.combobox.ComboBoxState;
import com.vaadin.v7.ui.ComboBox;
/**
import com.vaadin.server.ServerRpcManager;
import com.vaadin.server.ServerRpcMethodInvocation;
-import com.vaadin.shared.ui.combobox.ComboBoxServerRpc;
import com.vaadin.tests.server.components.AbstractFieldValueChangeTestBase;
+import com.vaadin.v7.shared.ui.combobox.ComboBoxServerRpc;
import com.vaadin.v7.ui.AbstractField;
import com.vaadin.v7.ui.ComboBox;
--- /dev/null
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.v7.shared.ui.combobox;
+
+import java.io.Serializable;
+
+@Deprecated
+public class ComboBoxConstants implements Serializable {
+ @Deprecated
+ public static final String ATTR_INPUTPROMPT = "prompt";
+ @Deprecated
+ public static final String ATTR_NO_TEXT_INPUT = "noInput";
+
+}
--- /dev/null
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.v7.shared.ui.combobox;
+
+import com.vaadin.shared.communication.ServerRpc;
+
+/**
+ * Client to server RPC interface for ComboBox.
+ *
+ * @since
+ */
+public interface ComboBoxServerRpc extends ServerRpc {
+ /**
+ * Create a new item in the combo box. This method can only be used when the
+ * ComboBox is configured to allow the creation of new items by the user.
+ *
+ * @param itemValue
+ * user entered string value for the new item
+ */
+ public void createNewItem(String itemValue);
+
+ /**
+ * Set the current selection.
+ *
+ * @param item
+ * the id of a single item or null to deselect the current value
+ */
+ public void setSelectedItem(String item);
+
+ /**
+ * Request the server to send a page of the item list.
+ *
+ * @param filter
+ * filter string interpreted according to the current filtering
+ * mode
+ * @param page
+ * zero based page number
+ */
+ public void requestPage(String filter, int page);
+}
--- /dev/null
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.v7.shared.ui.combobox;
+
+import com.vaadin.shared.ui.select.AbstractSelectState;
+
+/**
+ * Shared state for the ComboBox component.
+ *
+ * @since 7.0
+ */
+public class ComboBoxState extends AbstractSelectState {
+ {
+ primaryStyleName = "v-filterselect";
+ }
+
+ /**
+ * If text input is not allowed, the ComboBox behaves like a pretty
+ * NativeSelect - the user can not enter any text and clicking the text
+ * field opens the drop down with options.
+ *
+ * @since
+ */
+ public boolean textInputAllowed = true;
+
+ /**
+ * A textual prompt that is displayed when the select would otherwise be
+ * empty, to prompt the user for input.
+ *
+ * @since
+ */
+ public String inputPrompt = null;
+
+ /**
+ * Number of items to show per page or 0 to disable paging.
+ */
+ public int pageLength = 10;
+
+ /**
+ * Current filtering mode (look for match of the user typed string in the
+ * beginning of the item caption or anywhere in the item caption).
+ */
+ public FilteringMode filteringMode = FilteringMode.STARTSWITH;
+
+ /**
+ * Suggestion pop-up's width as a CSS string. By using relative units (e.g.
+ * "50%") it's possible to set the popup's width relative to the ComboBox
+ * itself.
+ */
+ public String suggestionPopupWidth = null;
+
+}
--- /dev/null
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.v7.shared.ui.combobox;
+
+public enum FilteringMode {
+ OFF, STARTSWITH, CONTAINS;
+}
+++ /dev/null
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.shared.ui.combobox;
-
-import java.io.Serializable;
-
-@Deprecated
-public class ComboBoxConstants implements Serializable {
- @Deprecated
- public static final String ATTR_INPUTPROMPT = "prompt";
- @Deprecated
- public static final String ATTR_NO_TEXT_INPUT = "noInput";
-
-}
+++ /dev/null
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.shared.ui.combobox;
-
-import com.vaadin.shared.communication.ServerRpc;
-
-/**
- * Client to server RPC interface for ComboBox.
- *
- * @since
- */
-public interface ComboBoxServerRpc extends ServerRpc {
- /**
- * Create a new item in the combo box. This method can only be used when the
- * ComboBox is configured to allow the creation of new items by the user.
- *
- * @param itemValue
- * user entered string value for the new item
- */
- public void createNewItem(String itemValue);
-
- /**
- * Set the current selection.
- *
- * @param item
- * the id of a single item or null to deselect the current value
- */
- public void setSelectedItem(String item);
-
- /**
- * Request the server to send a page of the item list.
- *
- * @param filter
- * filter string interpreted according to the current filtering
- * mode
- * @param page
- * zero based page number
- */
- public void requestPage(String filter, int page);
-}
+++ /dev/null
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.shared.ui.combobox;
-
-import com.vaadin.shared.ui.select.AbstractSelectState;
-
-/**
- * Shared state for the ComboBox component.
- *
- * @since 7.0
- */
-public class ComboBoxState extends AbstractSelectState {
- {
- primaryStyleName = "v-filterselect";
- }
-
- /**
- * If text input is not allowed, the ComboBox behaves like a pretty
- * NativeSelect - the user can not enter any text and clicking the text
- * field opens the drop down with options.
- *
- * @since
- */
- public boolean textInputAllowed = true;
-
- /**
- * A textual prompt that is displayed when the select would otherwise be
- * empty, to prompt the user for input.
- *
- * @since
- */
- public String inputPrompt = null;
-
- /**
- * Number of items to show per page or 0 to disable paging.
- */
- public int pageLength = 10;
-
- /**
- * Current filtering mode (look for match of the user typed string in the
- * beginning of the item caption or anywhere in the item caption).
- */
- public FilteringMode filteringMode = FilteringMode.STARTSWITH;
-
- /**
- * Suggestion pop-up's width as a CSS string. By using relative units (e.g.
- * "50%") it's possible to set the popup's width relative to the ComboBox
- * itself.
- */
- public String suggestionPopupWidth = null;
-
-}
+++ /dev/null
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.shared.ui.combobox;
-
-public enum FilteringMode {
- OFF, STARTSWITH, CONTAINS;
-}
import com.vaadin.server.LegacyApplication;
import com.vaadin.server.ThemeResource;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.data.Property.ValueChangeEvent;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.AbstractSelect;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.Table;
import com.vaadin.data.Binder;
import com.vaadin.server.VaadinRequest;
import com.vaadin.shared.ui.MarginInfo;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.shared.ui.datefield.Resolution;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.v7.data.fieldgroup.FieldGroup;
import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException;
import com.vaadin.v7.data.util.BeanItem;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.Calendar;
import com.vaadin.v7.ui.Calendar.TimeFormat;
import com.vaadin.v7.ui.ComboBox;
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.Button;
import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
public class ComboBoxCombinedWithEnterShortcut extends TestBase {
package com.vaadin.tests.components.combobox;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.tests.components.TestBase;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
public class ComboBoxNavigation extends TestBase {
package com.vaadin.tests.components.combobox;
import com.vaadin.server.LegacyApplication;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.Property.ValueChangeEvent;
import com.vaadin.v7.data.Property.ValueChangeListener;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
@SuppressWarnings("serial")
import java.util.List;
import com.vaadin.server.VaadinRequest;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
public class ComboBoxSuggestionPageLength extends AbstractTestUI {
package com.vaadin.tests.components.combobox;
import com.vaadin.server.VaadinRequest;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.TextField;
/**
package com.vaadin.tests.components.combobox;
import com.vaadin.server.VaadinRequest;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
public class ComboBoxValueInput extends AbstractTestUI {
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.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.ComboBox.ItemStyleGenerator;
import java.util.Locale;
import java.util.TimeZone;
-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.DateField;
import com.vaadin.v7.data.Property;
import com.vaadin.v7.data.Property.ValueChangeEvent;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
public class DateFieldTimezone extends TestBase {
import java.util.Locale;
import com.vaadin.server.VaadinRequest;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.tests.components.AbstractTestUIWithLog;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.NativeSelect;
import com.vaadin.v7.ui.Tree;
package com.vaadin.tests.containers.sqlcontainer;
import com.vaadin.server.LegacyApplication;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.ui.LegacyWindow;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
/**
import java.sql.Statement;
import com.vaadin.server.VaadinRequest;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.Property;
import com.vaadin.v7.data.util.sqlcontainer.connection.JDBCConnectionPool;
import com.vaadin.v7.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool;
import com.vaadin.v7.data.util.sqlcontainer.query.TableQuery;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.ComboBox;
public class TableQueryWithNonUniqueFirstPrimaryKey extends AbstractTestUI {
import com.vaadin.data.Binder;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
-import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.shared.ui.datefield.Resolution;
import com.vaadin.tests.components.calendar.CalendarTestEvent;
import com.vaadin.ui.Alignment;
import com.vaadin.v7.data.fieldgroup.FieldGroup;
import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException;
import com.vaadin.v7.data.util.BeanItem;
+import com.vaadin.v7.shared.ui.combobox.FilteringMode;
import com.vaadin.v7.ui.Calendar;
import com.vaadin.v7.ui.Calendar.TimeFormat;
import com.vaadin.v7.ui.ComboBox;