From cef5b51d3ff0792ab0a8a8423549dbff79e3027b Mon Sep 17 00:00:00 2001 From: Denis Anisimov Date: Thu, 22 Sep 2016 15:28:36 +0300 Subject: Mark all server compatibility classes deprecated (#144). Change-Id: Iba0a35d5ea9a97b0020f506f610630471c59748b --- .../main/java/com/vaadin/v7/ui/AbstractField.java | 4 +- .../main/java/com/vaadin/v7/ui/AbstractSelect.java | 47 +++++---- .../java/com/vaadin/v7/ui/AbstractTextField.java | 2 + .../src/main/java/com/vaadin/v7/ui/Calendar.java | 23 ++--- .../src/main/java/com/vaadin/v7/ui/CheckBox.java | 1 + .../src/main/java/com/vaadin/v7/ui/ComboBox.java | 8 +- .../main/java/com/vaadin/v7/ui/CustomField.java | 1 + .../src/main/java/com/vaadin/v7/ui/DateField.java | 2 + .../java/com/vaadin/v7/ui/DefaultFieldFactory.java | 1 + .../src/main/java/com/vaadin/v7/ui/Grid.java | 46 +++++++++ .../java/com/vaadin/v7/ui/InlineDateField.java | 1 + .../src/main/java/com/vaadin/v7/ui/Label.java | 2 + .../src/main/java/com/vaadin/v7/ui/ListSelect.java | 1 + .../main/java/com/vaadin/v7/ui/NativeSelect.java | 1 + .../main/java/com/vaadin/v7/ui/OptionGroup.java | 3 +- .../main/java/com/vaadin/v7/ui/PopupDateField.java | 1 + .../main/java/com/vaadin/v7/ui/ProgressBar.java | 1 + .../main/java/com/vaadin/v7/ui/RichTextArea.java | 1 + .../src/main/java/com/vaadin/v7/ui/Slider.java | 1 + .../src/main/java/com/vaadin/v7/ui/Table.java | 108 +++++++++++++-------- .../java/com/vaadin/v7/ui/TableFieldFactory.java | 1 + .../src/main/java/com/vaadin/v7/ui/TextArea.java | 1 + .../src/main/java/com/vaadin/v7/ui/Tree.java | 49 ++++++---- .../src/main/java/com/vaadin/v7/ui/TreeTable.java | 11 ++- .../main/java/com/vaadin/v7/ui/TwinColSelect.java | 1 + .../calendar/CalendarComponentEvent.java | 1 + .../calendar/CalendarComponentEvents.java | 22 +++++ .../ui/components/calendar/CalendarDateRange.java | 1 + .../components/calendar/CalendarTargetDetails.java | 1 + .../calendar/ContainerEventProvider.java | 7 +- .../ui/components/calendar/event/BasicEvent.java | 3 +- .../calendar/event/BasicEventProvider.java | 7 +- .../event/CalendarEditableEventProvider.java | 1 + .../components/calendar/event/CalendarEvent.java | 4 + .../calendar/event/CalendarEventProvider.java | 4 + .../calendar/event/EditableCalendarEvent.java | 1 + .../calendar/handler/BasicBackwardHandler.java | 1 + .../calendar/handler/BasicDateClickHandler.java | 1 + .../calendar/handler/BasicEventMoveHandler.java | 1 + .../calendar/handler/BasicEventResizeHandler.java | 1 + .../calendar/handler/BasicForwardHandler.java | 1 + .../calendar/handler/BasicWeekClickHandler.java | 1 + .../ui/renderers/AbstractJavaScriptRenderer.java | 1 + .../com/vaadin/v7/ui/renderers/ButtonRenderer.java | 1 + .../vaadin/v7/ui/renderers/ClickableRenderer.java | 3 + .../com/vaadin/v7/ui/renderers/DateRenderer.java | 1 + .../com/vaadin/v7/ui/renderers/HtmlRenderer.java | 1 + .../com/vaadin/v7/ui/renderers/ImageRenderer.java | 1 + .../com/vaadin/v7/ui/renderers/NumberRenderer.java | 1 + .../v7/ui/renderers/ProgressBarRenderer.java | 1 + .../java/com/vaadin/v7/ui/renderers/Renderer.java | 1 + .../com/vaadin/v7/ui/renderers/TextRenderer.java | 1 + 52 files changed, 281 insertions(+), 107 deletions(-) (limited to 'compatibility-server/src/main/java/com/vaadin/v7/ui') diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java index 73ce2f3a99..180c1f15b8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java @@ -48,8 +48,8 @@ import com.vaadin.v7.data.Validator; import com.vaadin.v7.data.Validator.InvalidValueException; import com.vaadin.v7.data.util.converter.Converter; import com.vaadin.v7.data.util.converter.Converter.ConversionException; -import com.vaadin.v7.shared.AbstractFieldState; import com.vaadin.v7.data.util.converter.ConverterUtil; +import com.vaadin.v7.shared.AbstractFieldState; /** *

@@ -1185,6 +1185,7 @@ public abstract class AbstractField extends AbstractComponent * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public static class ReadOnlyStatusChangeEvent extends Component.Event implements Property.ReadOnlyStatusChangeEvent, Serializable { @@ -1588,6 +1589,7 @@ public abstract class AbstractField extends AbstractComponent * invoked. * */ + @Deprecated public static class FocusShortcut extends ShortcutListener { protected Focusable focusable; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java index c7e90afb4c..55962df2cf 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java @@ -79,12 +79,14 @@ import com.vaadin.v7.shared.ui.select.AbstractSelectState; * @since 5.0 */ @SuppressWarnings("serial") +@Deprecated // TODO currently cannot specify type more precisely in case of multi-select public abstract class AbstractSelect extends AbstractField implements Container, Container.Viewer, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier, Container.ItemSetChangeListener, LegacyComponent { + @Deprecated public enum ItemCaptionMode { /** * Item caption mode: Item's ID converted to a String using @@ -182,6 +184,7 @@ public abstract class AbstractSelect extends AbstractField implements * caption. FilteringMode.CONTAINS (1) matches anywhere in the * caption. */ + @Deprecated public interface Filtering extends Serializable { /** @@ -230,17 +233,17 @@ public abstract class AbstractSelect extends AbstractField implements /** * Keymapper used to map key values. */ - protected KeyMapper itemIdMapper = new KeyMapper(); + protected KeyMapper itemIdMapper = new KeyMapper<>(); /** * Item icons. */ - private final HashMap itemIcons = new HashMap(); + private final HashMap itemIcons = new HashMap<>(); /** * Item captions. */ - private final HashMap itemCaptions = new HashMap(); + private final HashMap itemCaptions = new HashMap<>(); /** * Item caption mode. @@ -469,7 +472,7 @@ public abstract class AbstractSelect extends AbstractField implements // TODO Optimize by adding repaintNotNeeded when applicable // Converts the key-array to id-set - final LinkedList acceptedSelections = new LinkedList(); + final LinkedList acceptedSelections = new LinkedList<>(); for (int i = 0; i < clientSideSelectedKeys.length; i++) { final Object id = itemIdMapper .get(clientSideSelectedKeys[i]); @@ -501,9 +504,9 @@ public abstract class AbstractSelect extends AbstractField implements @SuppressWarnings("unchecked") Set newsel = (Set) getValue(); if (newsel == null) { - newsel = new LinkedHashSet(); + newsel = new LinkedHashSet<>(); } else { - newsel = new LinkedHashSet(newsel); + newsel = new LinkedHashSet<>(newsel); } newsel.removeAll(visibleNotSelected); newsel.addAll(acceptedSelections); @@ -570,6 +573,7 @@ public abstract class AbstractSelect extends AbstractField implements return newItemHandler; } + @Deprecated public interface NewItemHandler extends Serializable { void addNewItem(String newItemCaption); } @@ -584,6 +588,7 @@ public abstract class AbstractSelect extends AbstractField implements * like database inserts. * */ + @Deprecated public class DefaultNewItemHandler implements NewItemHandler { @Override public void addNewItem(String newItemCaption) { @@ -653,14 +658,14 @@ public abstract class AbstractSelect extends AbstractField implements // If the return value is not a set if (retValue == null) { - return new HashSet(); + return new HashSet<>(); } if (retValue instanceof Set) { return Collections.unmodifiableSet((Set) retValue); } else if (retValue instanceof Collection) { return new HashSet((Collection) retValue); } else { - final Set s = new HashSet(); + final Set s = new HashSet<>(); if (items.containsId(retValue)) { s.add(retValue); } @@ -720,7 +725,7 @@ public abstract class AbstractSelect extends AbstractField implements ConversionException, InvalidValueException { if (isMultiSelect()) { if (newFieldValue == null) { - super.setValue(new LinkedHashSet(), repaintIsNotNeeded, + super.setValue(new LinkedHashSet<>(), repaintIsNotNeeded, ignoreReadOnly); } else if (Collection.class .isAssignableFrom(newFieldValue.getClass())) { @@ -978,7 +983,7 @@ public abstract class AbstractSelect extends AbstractField implements if (isMultiSelect()) { Collection valueAsCollection = (Collection) value; - List newSelection = new ArrayList( + List newSelection = new ArrayList<>( valueAsCollection.size()); for (Object subValue : valueAsCollection) { if (containsId(subValue)) { @@ -1129,7 +1134,7 @@ public abstract class AbstractSelect extends AbstractField implements // Convert the value type if (multiSelect) { - final Set s = new HashSet(); + final Set s = new HashSet<>(); if (oldValue != null) { s.add(oldValue); } @@ -1534,7 +1539,7 @@ public abstract class AbstractSelect extends AbstractField implements setValue(itemId); } else if (!isSelected(itemId) && itemId != null && items.containsId(itemId)) { - final Set s = new HashSet((Set) getValue()); + final Set s = new HashSet<>((Set) getValue()); s.add(itemId); setValue(s); } @@ -1552,7 +1557,7 @@ public abstract class AbstractSelect extends AbstractField implements public void unselect(Object itemId) { if (isSelected(itemId)) { if (isMultiSelect()) { - final Set s = new HashSet((Set) getValue()); + final Set s = new HashSet<>((Set) getValue()); s.remove(itemId); setValue(s); } else { @@ -1581,7 +1586,7 @@ public abstract class AbstractSelect extends AbstractField implements public void addPropertySetChangeListener( Container.PropertySetChangeListener listener) { if (propertySetEventListeners == null) { - propertySetEventListeners = new LinkedHashSet(); + propertySetEventListeners = new LinkedHashSet<>(); } propertySetEventListeners.add(listener); } @@ -1631,7 +1636,7 @@ public abstract class AbstractSelect extends AbstractField implements public void addItemSetChangeListener( Container.ItemSetChangeListener listener) { if (itemSetEventListeners == null) { - itemSetEventListeners = new LinkedHashSet(); + itemSetEventListeners = new LinkedHashSet<>(); } itemSetEventListeners.add(listener); } @@ -1912,12 +1917,13 @@ public abstract class AbstractSelect extends AbstractField implements * NOTE: singleton, use getCaptionChangeListener(). * */ + @Deprecated protected class CaptionChangeListener implements Item.PropertySetChangeListener, Property.ValueChangeListener { // TODO clean this up - type is either Item.PropertySetChangeNotifier or // Property.ValueChangeNotifier - HashSet captionChangeNotifiers = new HashSet(); + HashSet captionChangeNotifiers = new HashSet<>(); public void addNotifierForItem(Object itemId) { switch (getItemCaptionMode()) { @@ -2008,6 +2014,7 @@ public abstract class AbstractSelect extends AbstractField implements * * @since 6.3 */ + @Deprecated public static class TargetItemIs extends AbstractItemSetCriterion { /** @@ -2042,7 +2049,7 @@ public abstract class AbstractSelect extends AbstractField implements */ private static abstract class AbstractItemSetCriterion extends ClientSideCriterion { - protected final Collection itemIds = new HashSet(); + protected final Collection itemIds = new HashSet<>(); protected AbstractSelect select; public AbstractItemSetCriterion(AbstractSelect select, @@ -2076,6 +2083,7 @@ public abstract class AbstractSelect extends AbstractField implements * * @since 6.3 */ + @Deprecated public static class AcceptItem extends AbstractItemSetCriterion { /** @@ -2115,6 +2123,7 @@ public abstract class AbstractSelect extends AbstractField implements * * @since 6.3 */ + @Deprecated public class AbstractSelectTargetDetails extends TargetDetailsImpl { /** @@ -2166,6 +2175,7 @@ public abstract class AbstractSelect extends AbstractField implements * This accept criterion is currently usable in Tree and Table * implementations. */ + @Deprecated public static class VerticalLocationIs extends TargetDetailIs { public static VerticalLocationIs TOP = new VerticalLocationIs( VerticalDropLocation.TOP); @@ -2184,6 +2194,7 @@ public abstract class AbstractSelect extends AbstractField implements * or Table.setItemDescriptionGenerator to generate mouse over descriptions * ("tooltips") for the rows and cells in Table or for the items in Tree. */ + @Deprecated public interface ItemDescriptionGenerator extends Serializable { /** @@ -2213,7 +2224,7 @@ public abstract class AbstractSelect extends AbstractField implements } protected void readItems(Element design, DesignContext context) { - Set selected = new HashSet(); + Set selected = new HashSet<>(); for (Element child : design.children()) { readItem(child, selected, context); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java index d4d17cd7b4..d2b4665bda 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java @@ -503,6 +503,7 @@ public abstract class AbstractTextField extends AbstractField implements /** * Different modes how the TextField can trigger {@link TextChangeEvent}s. */ + @Deprecated public enum TextChangeEventMode { /** @@ -593,6 +594,7 @@ public abstract class AbstractTextField extends AbstractField implements return textChangeEventTimeout; } + @Deprecated public static class TextChangeEventImpl extends TextChangeEvent { private String curText; private int cursorPosition; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java index cb0ce7d220..d8ffd0b1e8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java @@ -118,6 +118,7 @@ import com.vaadin.v7.ui.components.calendar.handler.BasicWeekClickHandler; * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class Calendar extends AbstractComponent implements CalendarComponentEvents.NavigationNotifier, CalendarComponentEvents.EventMoveNotifier, @@ -129,6 +130,7 @@ public class Calendar extends AbstractComponent /** * Calendar can use either 12 hours clock or 24 hours clock. */ + @Deprecated public enum TimeFormat { Format12H(), Format24H(); @@ -289,7 +291,7 @@ public class Calendar extends AbstractComponent public Calendar(String caption, CalendarEventProvider eventProvider) { registerRpc(rpc); setCaption(caption); - handlers = new HashMap(); + handlers = new HashMap<>(); setDefaultHandlers(); currentCalendar.setTime(new Date()); setEventProvider(eventProvider); @@ -452,7 +454,7 @@ public class Calendar extends AbstractComponent currentCalendar.setTime(firstDateToShow); events = getEventProvider().getEvents(firstDateToShow, lastDateToShow); - List calendarStateEvents = new ArrayList(); + List calendarStateEvents = new ArrayList<>(); if (events != null) { for (int i = 0; i < events.size(); i++) { CalendarEvent e = events.get(i); @@ -532,9 +534,9 @@ public class Calendar extends AbstractComponent DateFormat weeklyCaptionFormatter = getWeeklyCaptionFormatter(); weeklyCaptionFormatter.setTimeZone(currentCalendar.getTimeZone()); - Map> actionMap = new HashMap>(); + Map> actionMap = new HashMap<>(); - List days = new ArrayList(); + List days = new ArrayList<>(); // Send all dates to client from server. This // approach was taken because gwt doesn't @@ -621,7 +623,7 @@ public class Calendar extends AbstractComponent getTimeZone()); Action[] actions = actionHandler.getActions(range, this); if (actions != null) { - Set actionSet = new LinkedHashSet( + Set actionSet = new LinkedHashSet<>( Arrays.asList(actions)); actionMap.put(range, actionSet); } @@ -634,8 +636,7 @@ public class Calendar extends AbstractComponent getTimeZone()); Action[] actions = actionHandler.getActions(range, this); if (actions != null) { - Set actionSet = new LinkedHashSet( - Arrays.asList(actions)); + Set actionSet = new LinkedHashSet<>(Arrays.asList(actions)); actionMap.put(range, actionSet); } } @@ -646,7 +647,7 @@ public class Calendar extends AbstractComponent return null; } - List calendarActions = new ArrayList(); + List calendarActions = new ArrayList<>(); SimpleDateFormat formatter = new SimpleDateFormat( DateConstants.ACTION_DATE_FORMAT_PATTERN); @@ -1486,7 +1487,7 @@ public class Calendar extends AbstractComponent @Override public TargetDetails translateDropTargetDetails( Map clientVariables) { - Map serverVariables = new HashMap(); + Map serverVariables = new HashMap<>(); if (clientVariables.containsKey("dropSlotIndex")) { int slotIndex = (Integer) clientVariables.get("dropSlotIndex"); @@ -1689,8 +1690,8 @@ public class Calendar extends AbstractComponent public void addActionHandler(Handler actionHandler) { if (actionHandler != null) { if (actionHandlers == null) { - actionHandlers = new LinkedList(); - actionMapper = new KeyMapper(); + actionHandlers = new LinkedList<>(); + actionMapper = new KeyMapper<>(); } if (!actionHandlers.contains(actionHandler)) { actionHandlers.add(actionHandler); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java index 5de6fa3d4b..779acb10ea 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java @@ -33,6 +33,7 @@ import com.vaadin.v7.data.Property; import com.vaadin.v7.shared.ui.checkbox.CheckBoxServerRpc; import com.vaadin.v7.shared.ui.checkbox.CheckBoxState; +@Deprecated public class CheckBox extends AbstractField { private CheckBoxServerRpc rpc = new CheckBoxServerRpc() { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java index 5b96672be7..a0af67359e 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java @@ -49,6 +49,7 @@ import com.vaadin.v7.shared.ui.combobox.FilteringMode; * */ @SuppressWarnings("serial") +@Deprecated public class ComboBox extends AbstractSelect implements AbstractSelect.Filtering, FieldEvents.BlurNotifier, FieldEvents.FocusNotifier { @@ -61,6 +62,7 @@ public class ComboBox extends AbstractSelect * @since 7.5.6 * @see ComboBox#setItemStyleGenerator(ItemStyleGenerator) */ + @Deprecated public interface ItemStyleGenerator extends Serializable { /** @@ -300,7 +302,7 @@ public class ComboBox extends AbstractSelect final boolean paintNullSelection = needNullSelectOption && currentPage == 0 && !nullFilteredOut; - List items = new ArrayList(); + List items = new ArrayList<>(); if (paintNullSelection) { ComboBoxItem item = new ComboBoxItem(); @@ -700,7 +702,7 @@ public class ComboBox extends AbstractSelect protected List getFilteredOptions() { if (!isFilteringNeeded()) { prevfilterstring = null; - filteredOptions = new LinkedList(getItemIds()); + filteredOptions = new LinkedList<>(getItemIds()); return filteredOptions; } @@ -717,7 +719,7 @@ public class ComboBox extends AbstractSelect } prevfilterstring = filterstring; - filteredOptions = new LinkedList(); + filteredOptions = new LinkedList<>(); for (final Iterator it = items.iterator(); it.hasNext();) { final Object itemId = it.next(); String caption = getItemCaption(itemId); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/CustomField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/CustomField.java index f55b3307a3..989bef22ec 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/CustomField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/CustomField.java @@ -45,6 +45,7 @@ import com.vaadin.v7.data.Property; * * @since 7.0 */ +@Deprecated public abstract class CustomField extends AbstractField implements HasComponents { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java index 14318cea8d..4ee2ee4648 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java @@ -67,6 +67,7 @@ import com.vaadin.v7.shared.ui.datefield.TextualDateFieldState; * @since 3.0 */ @SuppressWarnings("serial") +@Deprecated public class DateField extends AbstractField implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier, LegacyComponent { @@ -1005,6 +1006,7 @@ public class DateField extends AbstractField implements return timeZone; } + @Deprecated public static class UnparsableDateString extends Validator.InvalidValueException { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/DefaultFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/DefaultFieldFactory.java index da6441f48f..93ea91a9bb 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/DefaultFieldFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/DefaultFieldFactory.java @@ -33,6 +33,7 @@ import com.vaadin.v7.data.Property; * factories. * */ +@Deprecated public class DefaultFieldFactory implements FormFieldFactory, TableFieldFactory { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java index 90fa058ec2..f89cf5544b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java @@ -184,6 +184,7 @@ import elemental.json.JsonValue; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class Grid extends AbstractFocusable implements SelectionNotifier, SortNotifier, SelectiveRenderer, ItemClickNotifier { @@ -192,6 +193,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5.0 */ + @Deprecated public interface ColumnVisibilityChangeListener extends Serializable { /** * Called when a column has become hidden or unhidden. @@ -206,6 +208,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5.0 */ + @Deprecated public static class ColumnVisibilityChangeEvent extends Component.Event { private final Column column; @@ -272,6 +275,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @author Vaadin Ltd * @see DetailsGenerator#NULL */ + @Deprecated public interface DetailsGenerator extends Serializable { /** A details generator that provides no details */ @@ -309,6 +313,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6.1 */ + @Deprecated public final static class DetailComponentManager extends AbstractGridExtension implements DataGenerator { @@ -560,6 +565,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Aims to fields of suitable type and with suitable size for use in the * editor row. */ + @Deprecated public static class EditorFieldFactory extends DefaultFieldGroupFieldFactory { private static final EditorFieldFactory INSTANCE = new EditorFieldFactory(); @@ -611,6 +617,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Error handler for the editor */ + @Deprecated public interface EditorErrorHandler extends Serializable { /** @@ -627,6 +634,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public static class GridContextClickEvent extends ContextClickEvent { private final Object itemId; @@ -692,6 +700,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * An event which is fired when saving the editor fails */ + @Deprecated public static class CommitErrorEvent extends Component.Event { private CommitException cause; @@ -775,6 +784,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5.0 */ + @Deprecated public interface ColumnReorderListener extends Serializable { /** @@ -791,6 +801,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5.0 */ + @Deprecated public static class ColumnReorderEvent extends Component.Event { private final boolean userOriginated; @@ -825,6 +836,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public interface ColumnResizeListener extends Serializable { /** @@ -842,6 +854,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public static class ColumnResizeEvent extends Component.Event { private final Column column; @@ -886,6 +899,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Interface for an editor event listener */ + @Deprecated public interface EditorListener extends Serializable { public static final Method EDITOR_OPEN_METHOD = ReflectTools.findMethod( @@ -925,6 +939,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Base class for editor related events */ + @Deprecated public static abstract class EditorEvent extends Component.Event { private Object itemID; @@ -946,6 +961,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * This event gets fired when an editor is opened */ + @Deprecated public static class EditorOpenEvent extends EditorEvent { public EditorOpenEvent(Grid source, Object itemID) { @@ -957,6 +973,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * This event gets fired when an editor is opened while another row is being * edited (i.e. editor focus moves elsewhere) */ + @Deprecated public static class EditorMoveEvent extends EditorEvent { public EditorMoveEvent(Grid source, Object itemID) { @@ -968,6 +985,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * This event gets fired when an editor is dismissed or closed by other * means. */ + @Deprecated public static class EditorCloseEvent extends EditorEvent { public EditorCloseEvent(Grid source, Object itemID) { @@ -979,6 +997,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Default error handler for the editor * */ + @Deprecated public class DefaultEditorErrorHandler implements EditorErrorHandler { @Override @@ -1045,6 +1064,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @see Grid#setSelectionMode(SelectionMode) * @see Grid#setSelectionModel(SelectionModel) */ + @Deprecated public enum SelectionMode { /** A SelectionMode that maps to {@link SingleSelectionModel} */ SINGLE { @@ -1078,6 +1098,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * The server-side interface that controls Grid's selection state. * SelectionModel should extend {@link AbstractGridExtension}. */ + @Deprecated public interface SelectionModel extends Serializable, Extension { /** * Checks whether an item is selected or not. @@ -1127,6 +1148,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * something is forbidden to do in e.g. the user interface, it must also * be forbidden to do in the server-side and client-side APIs. */ + @Deprecated public interface Multi extends SelectionModel { /** @@ -1257,6 +1279,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * something is forbidden to do in e.g. the user interface, it must also * be forbidden to do in the server-side and client-side APIs. */ + @Deprecated public interface Single extends SelectionModel { /** @@ -1316,6 +1339,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * developer is unable to select something programmatically, it is not * allowed for the end-user to select anything, either. */ + @Deprecated public interface None extends SelectionModel { /** @@ -1340,6 +1364,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * A base class for SelectionModels that contains some of the logic that is * reusable. */ + @Deprecated public static abstract class AbstractSelectionModel extends AbstractGridExtension implements SelectionModel, DataGenerator { protected final LinkedHashSet selection = new LinkedHashSet<>(); @@ -1437,6 +1462,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A default implementation of a {@link SelectionModel.Single} */ + @Deprecated public static class SingleSelectionModel extends AbstractSelectionModel implements SelectionModel.Single { @@ -1542,6 +1568,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A default implementation for a {@link SelectionModel.None} */ + @Deprecated public static class NoSelectionModel extends AbstractSelectionModel implements SelectionModel.None { @@ -1569,6 +1596,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A default implementation of a {@link SelectionModel.Multi} */ + @Deprecated public static class MultiSelectionModel extends AbstractSelectionModel implements SelectionModel.Multi { @@ -1901,6 +1929,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * should not be stored anywhere outside of the method providing these * instances. */ + @Deprecated public static class RowReference implements Serializable { private final Grid grid; @@ -1963,6 +1992,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * should not be stored anywhere outside of the method providing these * instances. */ + @Deprecated public static class CellReference implements Serializable { private final RowReference rowReference; @@ -2038,6 +2068,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @see Grid#setRowStyleGenerator(RowStyleGenerator) */ + @Deprecated public interface RowStyleGenerator extends Serializable { /** @@ -2056,6 +2087,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @see Grid#setCellStyleGenerator(CellStyleGenerator) */ + @Deprecated public interface CellStyleGenerator extends Serializable { /** @@ -2079,6 +2111,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public interface RowDescriptionGenerator extends Serializable { /** @@ -2103,6 +2136,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public interface CellDescriptionGenerator extends Serializable { /** @@ -2217,6 +2251,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @param * the type of the rows in the section */ + @Deprecated public abstract static class StaticSection> implements Serializable { @@ -2226,6 +2261,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @param * the type of the cells in the row */ + @Deprecated public abstract static class StaticRow implements Serializable { @@ -2481,6 +2517,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A header or footer cell. Has a simple textual caption. */ + @Deprecated abstract static class StaticCell implements Serializable { private CellState cellState = new CellState(); @@ -2966,6 +3003,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Represents the header section of a Grid. */ + @Deprecated protected static class Header extends StaticSection { private HeaderRow defaultRow = null; @@ -3073,6 +3111,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Represents a header row in Grid. */ + @Deprecated public static class HeaderRow extends StaticSection.StaticRow { protected HeaderRow(StaticSection section) { @@ -3125,6 +3164,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Represents a header cell in Grid. Can be a merged cell for multiple * columns. */ + @Deprecated public static class HeaderCell extends StaticSection.StaticCell { protected HeaderCell(HeaderRow row) { @@ -3136,6 +3176,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Represents the footer section of a Grid. By default Footer is not * visible. */ + @Deprecated protected static class Footer extends StaticSection { private final GridStaticSectionState footerState = new GridStaticSectionState(); @@ -3164,6 +3205,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Represents a footer row in Grid. */ + @Deprecated public static class FooterRow extends StaticSection.StaticRow { protected FooterRow(StaticSection section) { @@ -3185,6 +3227,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Represents a footer cell in Grid. */ + @Deprecated public static class FooterCell extends StaticSection.StaticCell { protected FooterCell(FooterRow row) { @@ -3196,6 +3239,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * A column in the grid. Can be obtained by calling * {@link Grid#getColumn(Object propertyId)}. */ + @Deprecated public static class Column implements Serializable { /** @@ -4126,6 +4170,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @param * the type this renderer knows how to present */ + @Deprecated public static abstract class AbstractRenderer extends AbstractGridExtension implements Renderer { @@ -4284,6 +4329,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5 */ + @Deprecated public static abstract class AbstractGridExtension extends AbstractExtension { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/InlineDateField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/InlineDateField.java index 1bec2bc61e..7c4e7e1721 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/InlineDateField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/InlineDateField.java @@ -31,6 +31,7 @@ import com.vaadin.v7.data.Property; * @author Vaadin Ltd. * @since 5.0 */ +@Deprecated public class InlineDateField extends DateField { public InlineDateField() { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java index dc89fffabf..9836f33d20 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java @@ -56,6 +56,7 @@ import com.vaadin.v7.shared.ui.label.LabelState; * @since 3.0 */ @SuppressWarnings("serial") +@Deprecated public class Label extends AbstractComponent implements Property, Property.Viewer, Property.ValueChangeListener, Property.ValueChangeNotifier, Comparable