Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.mrcrayfish.device.api.app.interfaces;

/**
* Common listener interface.
* All other listeners should
* extend this interface.
*
* @author Jochem Broekhoff
*/
public interface IListener {
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.mrcrayfish.device.api.app.listener;

import com.mrcrayfish.device.api.app.interfaces.IListener;

/**
* The change listener interface. Used for handling value
* changing in components
*
* @author MrCrayfish
*/
public interface ChangeListener<T>
public interface ChangeListener<T> extends IListener
{
/**
* Called when the value is changed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.mrcrayfish.device.api.app.listener;

import com.mrcrayfish.device.api.app.interfaces.IListener;

/**
* The click listener interface. Used for handling clicks
* on components.
*
* @author MrCrayfish
*/
public interface ClickListener
public interface ClickListener extends IListener
{
/**
* Called when component is clicked
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.mrcrayfish.device.api.app.listener;

import com.mrcrayfish.device.api.app.interfaces.IListener;

/**
* The initialization listener interface. Used for running
* code when a layout is initialized.
*
* @author MrCrayfish
*/
public interface InitListener
public interface InitListener extends IListener
{
/**
* Called when a layout is set as the current layout.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.mrcrayfish.device.api.app.listener;

import com.mrcrayfish.device.api.app.interfaces.IListener;

/**
* The click listener interface. Used for handling clicks
* on components.
*
* @author MrCrayfish
*/
public interface ItemClickListener<E>
public interface ItemClickListener<E> extends IListener
{
/**
* Called when component is clicked
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.mrcrayfish.device.api.app.listener;

import com.mrcrayfish.device.api.app.interfaces.IListener;

/**
* Author: MrCrayfish
*/
public interface KeyListener
public interface KeyListener extends IListener
{
boolean onKeyTyped(char c);
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package com.mrcrayfish.device.api.app.listener;

import com.mrcrayfish.device.api.app.Component;
import com.mrcrayfish.device.api.app.interfaces.IListener;

/**
* The release listener interface. Used for handling releasing
* clicks on components.
*
* @author MrCrayfish
*/
public interface ReleaseListener
public interface ReleaseListener extends IListener
{
/**
* Called when a click on a component is released
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.mrcrayfish.device.api.app.listener;

import com.mrcrayfish.device.api.app.component.Slider;
import com.mrcrayfish.device.api.app.interfaces.IListener;

/**
* The slider listener interface. Used for getting
Expand All @@ -9,7 +10,7 @@
*
* @author MrCrayfish
*/
public interface SlideListener
public interface SlideListener extends IListener
{
/**
* Called when a sliders position has moved
Expand Down