summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/AbstractSelect.java
diff options
context:
space:
mode:
authorPekka Hyvönen <pekka@vaadin.com>2012-09-10 22:12:47 +0300
committerArtur Signell <artur@vaadin.com>2012-09-11 12:19:02 +0300
commit0f5284bb827b5f04c6c064c851b851604293665a (patch)
tree4c9949ba7fa08dfae4f276f95c6928cae8b7760f /server/src/com/vaadin/ui/AbstractSelect.java
parent8a904080835193e322e1f006aa65f490f2cd930a (diff)
downloadvaadin-framework-0f5284bb827b5f04c6c064c851b851604293665a.tar.gz
vaadin-framework-0f5284bb827b5f04c6c064c851b851604293665a.zip
Constants -> enums (#9072)
Patch from Pekka with minor changes (ButtonCode -> MouseButton, FilteringMode -> ComboBox)
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractSelect.java')
-rw-r--r--server/src/com/vaadin/ui/AbstractSelect.java45
1 files changed, 22 insertions, 23 deletions
diff --git a/server/src/com/vaadin/ui/AbstractSelect.java b/server/src/com/vaadin/ui/AbstractSelect.java
index 4de3f90d15..45df42a9be 100644
--- a/server/src/com/vaadin/ui/AbstractSelect.java
+++ b/server/src/com/vaadin/ui/AbstractSelect.java
@@ -45,6 +45,7 @@ import com.vaadin.server.LegacyComponent;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.server.Resource;
+import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.shared.ui.dd.VerticalDropLocation;
/**
@@ -154,15 +155,28 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Interface for option filtering, used to filter options based on user
* entered value. The value is matched to the item caption.
- * <code>FILTERINGMODE_OFF</code> (0) turns the filtering off.
- * <code>FILTERINGMODE_STARTSWITH</code> (1) matches from the start of the
- * caption. <code>FILTERINGMODE_CONTAINS</code> (1) matches anywhere in the
+ * <code>FilteringMode.OFF</code> (0) turns the filtering off.
+ * <code>FilteringMode.STARTSWITH</code> (1) matches from the start of the
+ * caption. <code>FilteringMode.CONTAINS</code> (1) matches anywhere in the
* caption.
*/
public interface Filtering extends Serializable {
- public static final int FILTERINGMODE_OFF = 0;
- public static final int FILTERINGMODE_STARTSWITH = 1;
- public static final int FILTERINGMODE_CONTAINS = 2;
+
+ /**
+ * @deprecated from 7.0, use {@link FilteringMode#OFF} instead
+ */
+ @Deprecated
+ public static final FilteringMode FILTERINGMODE_OFF = FilteringMode.OFF;
+ /**
+ * @deprecated from 7.0, use {@link FilteringMode#STARTSWITH} instead
+ */
+ @Deprecated
+ public static final FilteringMode FILTERINGMODE_STARTSWITH = FilteringMode.STARTSWITH;
+ /**
+ * @deprecated from 7.0, use {@link FilteringMode#CONTAINS} instead
+ */
+ @Deprecated
+ public static final FilteringMode FILTERINGMODE_CONTAINS = FilteringMode.CONTAINS;
/**
* Sets the option filtering mode.
@@ -170,30 +184,15 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* @param filteringMode
* the filtering mode to use
*/
- public void setFilteringMode(int filteringMode);
+ public void setFilteringMode(FilteringMode filteringMode);
/**
* Gets the current filtering mode.
*
* @return the filtering mode in use
*/
- public int getFilteringMode();
-
- }
-
- /**
- * Multi select modes that controls how multi select behaves.
- */
- public enum MultiSelectMode {
- /**
- * The default behavior of the multi select mode
- */
- DEFAULT,
+ public FilteringMode getFilteringMode();
- /**
- * The previous more simple behavior of the multselect
- */
- SIMPLE
}
/**