<Swing Dev> Swing and imageio-related types that are candidates to be FunctionalInterfaces in JDK 8

Joe Darcy joe.darcy at oracle.com
Tue Feb 5 14:41:34 PST 2013


Hello,

As part of Project Lambda, a FunctionalInterface annotation type was 
added to the platform to mark interfaces that are intended to be used in 
lambda expressions.  I've sent out a code review request to add this 
annotation to types in the core-libs area [1].

To assist the swing team in adding analogous annotations to your types, 
the list of candidate types in for swing and imageio-related classes in 
java.* and javax.* is given below.  I recommend sub-tasks of JDK-8005297 
"Add FunctionalInterface support to the platform" be used to track the 
work of adding @FunctionalInterface annotations to swing types.

Thanks,

-Joe

[1] 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-February/014292.html

jdk/src/share/classes/javax/print/FlavorException.java:39: Note: 
Candidate functional interface
public interface FlavorException {
        ^
jdk/src/share/classes/javax/print/event/PrintServiceAttributeListener.java:37: 
Note: Candidate functional interface
public interface PrintServiceAttributeListener {
        ^
jdk/src/share/classes/javax/print/event/PrintJobAttributeListener.java:34: 
Note: Candidate functional interface
public interface PrintJobAttributeListener {
        ^
jdk/src/share/classes/javax/swing/TransferHandler.java:128: Note: 
Candidate functional interface
     interface HasGetTransferHandler {
     ^
jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java:42: Note: 
Candidate functional interface
public interface TreeCellRenderer {
        ^
jdk/src/share/classes/javax/swing/tree/RowMapper.java:36: Note: 
Candidate functional interface
public interface RowMapper
        ^
jdk/src/share/classes/javax/swing/table/TableCellRenderer.java:38: Note: 
Candidate functional interface
public interface TableCellRenderer {
        ^
jdk/src/share/classes/javax/swing/event/ChangeListener.java:36: Note: 
Candidate functional interface
public interface ChangeListener extends EventListener {
        ^
jdk/src/share/classes/javax/swing/event/HyperlinkListener.java:35: Note: 
Candidate functional interface
public interface HyperlinkListener extends EventListener {
        ^
jdk/src/share/classes/javax/swing/event/RowSorterListener.java:34: Note: 
Candidate functional interface
public interface RowSorterListener extends java.util.EventListener {
        ^
jdk/src/share/classes/javax/swing/event/CaretListener.java:36: Note: 
Candidate functional interface
public interface CaretListener extends EventListener {
        ^
jdk/src/share/classes/javax/swing/event/ListSelectionListener.java:41: 
Note: Candidate functional interface
public interface ListSelectionListener extends EventListener
        ^
jdk/src/share/classes/javax/swing/event/UndoableEditListener.java:37: 
Note: Candidate functional interface
public interface UndoableEditListener extends java.util.EventListener {
        ^
jdk/src/share/classes/javax/swing/event/TableModelListener.java:38: 
Note: Candidate functional interface
public interface TableModelListener extends java.util.EventListener
        ^
jdk/src/share/classes/javax/swing/event/TreeSelectionListener.java:43: 
Note: Candidate functional interface
public interface TreeSelectionListener extends EventListener
        ^
jdk/src/share/classes/javax/swing/ListCellRenderer.java:89: Note: 
Candidate functional interface
public interface ListCellRenderer<E>
        ^
jdk/src/share/classes/javax/swing/text/html/CSSBorder.java:257: Note: 
Candidate functional interface
     interface BorderPainter {
     ^
jdk/src/share/classes/javax/swing/text/html/Map.java:234: Note: 
Candidate functional interface
     interface RegionContainment {
     ^
jdk/src/share/classes/javax/swing/text/TabExpander.java:34: Note: 
Candidate functional interface
public interface TabExpander {
        ^
jdk/src/share/classes/javax/swing/text/ViewFactory.java:36: Note: 
Candidate functional interface
public interface ViewFactory {
        ^
jdk/src/share/classes/javax/swing/text/Position.java:49: Note: Candidate 
functional interface
public interface Position {
        ^
jdk/src/share/classes/javax/swing/text/Highlighter.java:112: Note: 
Candidate functional interface
     public interface HighlightPainter {
            ^
jdk/src/share/classes/javax/swing/Painter.java:63: Note: Candidate 
functional interface
public interface Painter<T> {
        ^
jdk/src/share/classes/javax/swing/plaf/basic/DragRecognitionSupport.java:52: 
Note: Candidate functional interface
     public static interface BeforeDrag {
                   ^
jdk/src/share/classes/javax/swing/UIDefaults.java:951: Note: Candidate 
functional interface
     public interface LazyValue {
            ^
jdk/src/share/classes/javax/swing/UIDefaults.java:984: Note: Candidate 
functional interface
     public interface ActiveValue {
            ^
jdk/src/share/classes/javax/swing/JComboBox.java:1484: Note: Candidate 
functional interface
     public interface KeySelectionManager {
            ^
jdk/src/share/classes/javax/imageio/IIOParamController.java:99: Note: 
Candidate functional interface
public interface IIOParamController {
        ^
jdk/src/share/classes/javax/imageio/event/IIOWriteWarningListener.java:46: 
Note: Candidate functional interface
public interface IIOWriteWarningListener extends EventListener {
        ^
jdk/src/share/classes/javax/imageio/event/IIOReadWarningListener.java:46: Note: 
Candidate functional interface
public interface IIOReadWarningListener extends EventListener {
        ^
jdk/src/share/classes/javax/imageio/metadata/IIOMetadataController.java:67: 
Note: Candidate functional interface
public interface IIOMetadataController {
        ^
jdk/src/share/classes/javax/imageio/spi/ServiceRegistry.java:464: Note: 
Candidate functional interface
     public interface Filter {


More information about the swing-dev mailing list