Author: rwhitcomb
Date: Fri Apr 30 22:07:45 2021
New Revision: 1889346
URL: http://svn.apache.org/viewvc?rev=1889346&view=rev
Log:
PIVOT-1047,PIVOT-1032: Make TextInputSelectionListener back into a
FunctionalInterface by removing default implementation; fix "checkstyle"
problems.
Modified:
pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInputSelectionListener.java
Modified:
pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInputSelectionListener.java
URL:
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInputSelectionListener.java?rev=1889346&r1=1889345&r2=1889346&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInputSelectionListener.java
(original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInputSelectionListener.java
Fri Apr 30 22:07:45 2021
@@ -22,17 +22,16 @@ import org.apache.pivot.util.ListenerLis
/**
* Text input selection listener interface.
*/
+@FunctionalInterface
public interface TextInputSelectionListener {
/**
* Text input selection listener listeners list.
*/
- public static class Listeners extends
ListenerList<TextInputSelectionListener>
+ class Listeners extends ListenerList<TextInputSelectionListener>
implements TextInputSelectionListener {
@Override
- public void selectionChanged(TextInput textInput, int
previousSelectionStart,
- int previousSelectionLength) {
- forEach(listener -> listener.selectionChanged(textInput,
previousSelectionStart,
- previousSelectionLength));
+ public void selectionChanged(final TextInput textInput, final int
previousStart, final int previousLength) {
+ forEach(listener -> listener.selectionChanged(textInput,
previousStart, previousLength));
}
}
@@ -46,7 +45,5 @@ public interface TextInputSelectionListe
* @param previousSelectionLength If the selection changed directly, the
* previous selection length. Otherwise, the current selection length.
*/
- default void selectionChanged(TextInput textInput, int
previousSelectionStart,
- int previousSelectionLength) {
- }
+ void selectionChanged(TextInput textInput, int previousSelectionStart, int
previousSelectionLength);
}