Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interfaces @FunctionalInterface #75

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/controlP5/CDrawable.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package controlP5;

/**
* controlP5 is a processing gui library.
*
Expand All @@ -25,12 +23,14 @@
*
*/

package controlP5;

import processing.core.PGraphics;

/**
* The CDrawable interface is used to draw controllers, primarily for internal use.
*/
public interface CDrawable {
@FunctionalInterface public interface CDrawable {

public void draw( PGraphics theGraphics );

Expand Down
2 changes: 1 addition & 1 deletion src/controlP5/CallbackListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @example use/ControlP5callback
* @see controlP5.ControlP5#addCallback(CallbackListener)
*/
public interface CallbackListener {
@FunctionalInterface public interface CallbackListener {

public void controlEvent( CallbackEvent theEvent );

Expand Down
3 changes: 2 additions & 1 deletion src/controlP5/ControlKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
*
*/

public interface ControlKey {
@FunctionalInterface public interface ControlKey {

public void keyEvent();

}
2 changes: 1 addition & 1 deletion src/controlP5/ControlListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* @example use/ControlP5listenerForSingleController
*/
public interface ControlListener {
@FunctionalInterface public interface ControlListener {

/**
* controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
Expand Down
6 changes: 3 additions & 3 deletions src/controlP5/ControllerInterface.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package controlP5;

/**
* controlP5 is a processing gui library.
*
Expand All @@ -25,6 +23,8 @@
*
*/

package controlP5;

import processing.core.PApplet;
import processing.core.PFont;
import processing.core.PGraphics;
Expand All @@ -35,7 +35,7 @@
* The ControllerInterface is inherited by all ControllerGroup and Controller classes.
*
*/
public interface ControllerInterface< T > {
public interface ControllerInterface< T extends ControllerInterface< T > > {

@ControlP5.Invisible public void init( );

Expand Down
6 changes: 3 additions & 3 deletions src/controlP5/ControllerView.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package controlP5;

/**
* controlP5 is a processing gui library.
*
Expand All @@ -25,6 +23,8 @@
*
*/

package controlP5;

import processing.core.PGraphics;

/**
Expand All @@ -35,7 +35,7 @@
*
* @example use/ControlP5customDisplay
*/
public interface ControllerView< T > {
@FunctionalInterface public interface ControllerView< T extends ControllerView< T > > {

/**
* draws your custom controllers. display() will be called by a controller's draw() function and
Expand Down