Closes vaadin/framework8-issues#548tags/8.0.0.alpha10
@@ -44,6 +44,7 @@ import com.vaadin.ui.AbstractComponent; | |||
* | |||
* @since 8.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface BinderValidationStatusHandler<BEAN> | |||
extends Consumer<BinderValidationStatus<BEAN>>, Serializable { | |||
@@ -38,6 +38,7 @@ import com.vaadin.ui.AbstractComponent; | |||
* @since 8.0 | |||
* | |||
*/ | |||
@FunctionalInterface | |||
public interface ValidationStatusHandler | |||
extends Consumer<ValidationStatus<?>>, Serializable { | |||
@@ -90,6 +90,7 @@ public class Action implements Serializable { | |||
* Action.Handler interface.<br/> | |||
* | |||
*/ | |||
@FunctionalInterface | |||
public interface Listener extends Serializable { | |||
public void handleAction(Object sender, Object target); | |||
} |
@@ -46,6 +46,7 @@ public class ContextClickEvent extends ClickEvent { | |||
/** | |||
* Listener for {@link ContextClickEvent ContextClickEvents}. | |||
*/ | |||
@FunctionalInterface | |||
public interface ContextClickListener extends Serializable { | |||
/** |
@@ -109,6 +109,7 @@ public interface FieldEvents { | |||
* @see FocusEvent | |||
* @since 6.2 | |||
*/ | |||
@FunctionalInterface | |||
public interface FocusListener extends ConnectorEventListener { | |||
public static final Method focusMethod = ReflectTools | |||
@@ -149,6 +150,7 @@ public interface FieldEvents { | |||
* @see BlurEvent | |||
* @since 6.2 | |||
*/ | |||
@FunctionalInterface | |||
public interface BlurListener extends ConnectorEventListener { | |||
public static final Method blurMethod = ReflectTools |
@@ -28,6 +28,7 @@ import com.vaadin.util.ReflectTools; | |||
public interface LayoutEvents { | |||
@FunctionalInterface | |||
public interface LayoutClickListener extends ConnectorEventListener { | |||
public static final Method clickMethod = ReflectTools.findMethod( |
@@ -192,6 +192,7 @@ public interface MouseEvents { | |||
* @author Vaadin Ltd. | |||
* @since 6.2 | |||
*/ | |||
@FunctionalInterface | |||
public interface ClickListener extends ConnectorEventListener { | |||
public static final Method clickMethod = ReflectTools | |||
@@ -230,6 +231,7 @@ public interface MouseEvents { | |||
* @author Vaadin Ltd. | |||
* @since 6.2 | |||
*/ | |||
@FunctionalInterface | |||
public interface DoubleClickListener extends ConnectorEventListener { | |||
public static final Method doubleClickMethod = ReflectTools.findMethod( |
@@ -75,6 +75,7 @@ public class SortEvent extends Component.Event { | |||
/** | |||
* Listener for sort order change events. | |||
*/ | |||
@FunctionalInterface | |||
public interface SortListener extends Serializable { | |||
/** | |||
* Called when the sort order has changed. |
@@ -39,6 +39,7 @@ public interface UIEvents { | |||
* @since 7.2 | |||
* @author Vaadin Ltd | |||
*/ | |||
@FunctionalInterface | |||
public interface PollListener extends Serializable { | |||
public static final Method POLL_METHOD = ReflectTools | |||
.findMethod(PollListener.class, "poll", PollEvent.class); |
@@ -28,6 +28,7 @@ import java.util.function.Consumer; | |||
* @param <T> | |||
* the data type of the selection model | |||
*/ | |||
@FunctionalInterface | |||
public interface MultiSelectionListener<T> | |||
extends Consumer<MultiSelectionEvent<T>>, Serializable { | |||
@Override |
@@ -27,6 +27,7 @@ import java.io.Serializable; | |||
* @author Vaadin Ltd | |||
* @since 7.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface ViewDisplay extends Serializable { | |||
/** | |||
* Remove previously shown view and show the newly selected view in its |
@@ -55,6 +55,7 @@ public interface ClientConnector extends Connector { | |||
* Interface for listening {@link AttachEvent connector attach events}. | |||
* | |||
*/ | |||
@FunctionalInterface | |||
public static interface AttachListener extends ConnectorEventListener { | |||
public static final Method attachMethod = ReflectTools | |||
.findMethod(AttachListener.class, "attach", AttachEvent.class); | |||
@@ -83,6 +84,7 @@ public interface ClientConnector extends Connector { | |||
* Interface for listening {@link DetachEvent connector detach events}. | |||
* | |||
*/ | |||
@FunctionalInterface | |||
public static interface DetachListener extends ConnectorEventListener { | |||
public static final Method detachMethod = ReflectTools | |||
.findMethod(DetachListener.class, "detach", DetachEvent.class); |
@@ -20,6 +20,7 @@ import java.io.Serializable; | |||
/** | |||
* Interface for listening to errors in the application. | |||
*/ | |||
@FunctionalInterface | |||
public interface ErrorHandler extends Serializable { | |||
/** |
@@ -49,6 +49,7 @@ public class Page implements Serializable { | |||
* | |||
* @see UI#addListener(BrowserWindowResizeListener) | |||
*/ | |||
@FunctionalInterface | |||
public interface BrowserWindowResizeListener extends Serializable { | |||
/** | |||
* Invoked when the browser window containing a UI has been resized. | |||
@@ -251,6 +252,7 @@ public class Page implements Serializable { | |||
* | |||
* @see Page#addUriFragmentChangedListener(UriFragmentChangedListener) | |||
*/ | |||
@FunctionalInterface | |||
public interface UriFragmentChangedListener extends Serializable { | |||
/** | |||
* Event handler method invoked when the URI fragment of the page | |||
@@ -326,6 +328,7 @@ public class Page implements Serializable { | |||
} | |||
} | |||
@FunctionalInterface | |||
private static interface InjectedStyle extends Serializable { | |||
public void paint(int id, PaintTarget target) throws PaintException; | |||
} |
@@ -26,6 +26,7 @@ import com.vaadin.ui.UI; | |||
* added on a {@link VaadinService service} level, common for all users, or on a | |||
* {@link VaadinSession session} level for only a single user. | |||
*/ | |||
@FunctionalInterface | |||
public interface RequestHandler extends Serializable { | |||
/** |
@@ -28,6 +28,7 @@ import java.io.Serializable; | |||
* @since 7.2 | |||
* @author Vaadin Ltd | |||
*/ | |||
@FunctionalInterface | |||
public interface ServiceDestroyListener extends Serializable { | |||
/** | |||
* Invoked when a service is destroyed |
@@ -27,6 +27,7 @@ import java.io.Serializable; | |||
* @author Vaadin Ltd | |||
* @since 7.0.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface SessionDestroyListener extends Serializable { | |||
/** | |||
* Called when a Vaadin service session is no longer used. |
@@ -32,6 +32,7 @@ import java.io.Serializable; | |||
* @author Vaadin Ltd | |||
* @since 7.0.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface SessionInitListener extends Serializable { | |||
/** | |||
* Invoked when a new Vaadin service session is initialized for that |
@@ -153,6 +153,7 @@ public class StreamResource implements ConnectorResource { | |||
* @author Vaadin Ltd. | |||
* @since 3.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface StreamSource extends Serializable { | |||
/** |
@@ -27,6 +27,7 @@ import com.vaadin.ui.UI; | |||
* @author Vaadin Ltd | |||
* @since 7.0.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface SystemMessagesProvider extends Serializable { | |||
/** | |||
* Gets the system messages to use in the given context. The |
@@ -36,6 +36,7 @@ import java.util.ServiceLoader; | |||
* @since | |||
* @author Vaadin Ltd | |||
*/ | |||
@FunctionalInterface | |||
public interface VaadinServiceInitListener extends EventListener, Serializable { | |||
/** | |||
* Run when a {@link VaadinService} instance is initialized. |
@@ -26,6 +26,7 @@ import java.io.Serializable; | |||
* | |||
* @author Vaadin Ltd | |||
*/ | |||
@FunctionalInterface | |||
public interface ViewportGenerator extends Serializable { | |||
/** | |||
* Generates a viewport tag based on a request. |
@@ -24,6 +24,7 @@ import java.io.Serializable; | |||
* @author Vaadin Ltd | |||
* @since 8.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface DataProviderListener extends Serializable { | |||
/** |
@@ -503,6 +503,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
* @see SplitterClickEvent | |||
* @since 6.2 | |||
*/ | |||
@FunctionalInterface | |||
public interface SplitterClickListener extends ConnectorEventListener { | |||
public static final Method clickMethod = ReflectTools.findMethod( | |||
@@ -533,6 +534,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
* | |||
* @since 7.5.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface SplitPositionChangeListener | |||
extends ConnectorEventListener { | |||
@@ -288,6 +288,7 @@ public class Button extends AbstractFocusable | |||
* @author Vaadin Ltd. | |||
* @since 3.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface ClickListener extends Serializable { | |||
public static final Method BUTTON_CLICK_METHOD = ReflectTools | |||
@@ -302,7 +303,6 @@ public class Button extends AbstractFocusable | |||
* An event containing information about the click. | |||
*/ | |||
public void buttonClick(ClickEvent event); | |||
} | |||
/** |
@@ -92,6 +92,7 @@ public interface HasComponents extends Component, Iterable<Component> { | |||
/** | |||
* Component attach listener interface. | |||
*/ | |||
@FunctionalInterface | |||
public interface ComponentAttachListener extends Serializable { | |||
public static final Method attachMethod = ReflectTools.findMethod( | |||
@@ -110,6 +111,7 @@ public interface HasComponents extends Component, Iterable<Component> { | |||
/** | |||
* Component detach listener interface. | |||
*/ | |||
@FunctionalInterface | |||
public interface ComponentDetachListener extends Serializable { | |||
public static final Method detachMethod = ReflectTools.findMethod( |
@@ -34,6 +34,7 @@ import elemental.json.JsonArray; | |||
* @author Vaadin Ltd | |||
* @since 7.0.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface JavaScriptFunction extends Serializable { | |||
/** | |||
* Invoked whenever the corresponding JavaScript function is called in the |
@@ -99,6 +99,7 @@ public class LoginForm extends AbstractSingleComponentContainer { | |||
/** | |||
* Listener triggered when a login occurs in a {@link LoginForm}. | |||
*/ | |||
@FunctionalInterface | |||
public interface LoginListener extends Serializable { | |||
/** | |||
* Event method invoked when the login button is pressed in a login |
@@ -434,6 +434,7 @@ public class MenuBar extends AbstractComponent | |||
* clicks on the containing {@link com.vaadin.ui.MenuBar.MenuItem}. The | |||
* selected item is given as an argument. | |||
*/ | |||
@FunctionalInterface | |||
public interface Command extends Serializable { | |||
public void menuSelected(MenuBar.MenuItem selectedItem); | |||
} |
@@ -399,6 +399,7 @@ public class PopupView extends AbstractComponent implements HasComponents { | |||
* visibility of the popup changes. | |||
* | |||
*/ | |||
@FunctionalInterface | |||
public interface PopupVisibilityListener extends Serializable { | |||
/** | |||
* Pass to {@link PopupView#PopupVisibilityEvent} to start listening for |
@@ -809,6 +809,7 @@ public class TabSheet extends AbstractComponentContainer | |||
* | |||
* @since 3.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface SelectedTabChangeListener extends Serializable { | |||
/** | |||
@@ -1288,6 +1289,7 @@ public class TabSheet extends AbstractComponentContainer | |||
* @since 6.2.0 | |||
* | |||
*/ | |||
@FunctionalInterface | |||
public interface CloseHandler extends Serializable { | |||
/** |
@@ -1847,6 +1847,7 @@ public abstract class UI extends AbstractSingleComponentContainer | |||
* | |||
* @see Window.WindowOrderChangeEvent | |||
*/ | |||
@FunctionalInterface | |||
public interface WindowOrderUpdateListener extends ConnectorEventListener { | |||
public static final Method windowOrderUpdateMethod = ReflectTools |
@@ -201,6 +201,7 @@ public class Upload extends AbstractComponent | |||
* @author Vaadin Ltd. | |||
* @since 3.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface Receiver extends Serializable { | |||
/** | |||
@@ -214,7 +215,6 @@ public class Upload extends AbstractComponent | |||
* @return Stream to which the uploaded file should be written. | |||
*/ | |||
public OutputStream receiveUpload(String filename, String mimeType); | |||
} | |||
/* Upload events */ | |||
@@ -544,6 +544,7 @@ public class Upload extends AbstractComponent | |||
* @author Vaadin Ltd. | |||
* @since 5.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface StartedListener extends Serializable { | |||
/** | |||
@@ -561,6 +562,7 @@ public class Upload extends AbstractComponent | |||
* @author Vaadin Ltd. | |||
* @since 3.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface FinishedListener extends Serializable { | |||
/** | |||
@@ -578,6 +580,7 @@ public class Upload extends AbstractComponent | |||
* @author Vaadin Ltd. | |||
* @since 3.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface FailedListener extends Serializable { | |||
/** | |||
@@ -595,6 +598,7 @@ public class Upload extends AbstractComponent | |||
* @author Vaadin Ltd. | |||
* @since 3.0 | |||
*/ | |||
@FunctionalInterface | |||
public interface SucceededListener extends Serializable { | |||
/** | |||
@@ -611,6 +615,7 @@ public class Upload extends AbstractComponent | |||
* | |||
* @since 7.2 | |||
*/ | |||
@FunctionalInterface | |||
public interface ChangeListener extends Serializable { | |||
Method FILENAME_CHANGED = ReflectTools.findMethod(ChangeListener.class, | |||
@@ -954,6 +959,7 @@ public class Upload extends AbstractComponent | |||
/** | |||
* ProgressListener receives events to track progress of upload. | |||
*/ | |||
@FunctionalInterface | |||
public interface ProgressListener extends Serializable { | |||
/** | |||
* Updates progress to listener |
@@ -435,6 +435,7 @@ public class Window extends Panel | |||
* | |||
* @see UI.WindowOrderUpdateListener | |||
*/ | |||
@FunctionalInterface | |||
public interface WindowOrderChangeListener extends ConnectorEventListener { | |||
public static final Method windowOrderChangeMethod = ReflectTools | |||
@@ -495,6 +496,7 @@ public class Window extends Panel | |||
* fires the CloseListener. | |||
* </p> | |||
*/ | |||
@FunctionalInterface | |||
public interface CloseListener extends Serializable { | |||
/** | |||
* Called when the user closes a window. Use | |||
@@ -596,6 +598,7 @@ public class Window extends Panel | |||
* will be called whenever the window is maximized ( | |||
* {@link WindowMode#MAXIMIZED}) or restored ({@link WindowMode#NORMAL} ). | |||
*/ | |||
@FunctionalInterface | |||
public interface WindowModeChangeListener extends Serializable { | |||
public static final Method windowModeChangeMethod = ReflectTools | |||
@@ -694,6 +697,7 @@ public class Window extends Panel | |||
* | |||
* @see com.vaadin.ui.Window.ResizeEvent | |||
*/ | |||
@FunctionalInterface | |||
public interface ResizeListener extends Serializable { | |||
public void windowResized(ResizeEvent e); | |||
} |
@@ -674,6 +674,7 @@ public class DesignContext implements Serializable { | |||
* | |||
* @author Vaadin Ltd | |||
*/ | |||
@FunctionalInterface | |||
public interface ComponentCreationListener extends Serializable { | |||
/** |
@@ -28,6 +28,7 @@ import com.vaadin.ui.Component; | |||
* @since 7.5.0 | |||
* @author Vaadin Ltd | |||
*/ | |||
@FunctionalInterface | |||
public interface ShouldWriteDataDelegate extends Serializable { | |||
/** |
@@ -48,6 +48,7 @@ public abstract class ClickableRenderer<T, V> extends AbstractRenderer<T, V> { | |||
* | |||
* @see ButtonRenderer#addClickListener(RendererClickListener) | |||
*/ | |||
@FunctionalInterface | |||
public interface RendererClickListener<T> extends ConnectorEventListener { | |||
static final Method CLICK_METHOD = ReflectTools.findMethod( |