Step away from subscribe() & unsubscribe()

MYC-Refactor
Hammy 3 years ago
parent 5112d090cd
commit 42416a694f

@ -18,7 +18,7 @@ class EventManager {
*
* @param clipboardEvent The {@link ClipboardEvent} to be added
*/
void subscribe(ClipboardEvent clipboardEvent) {
void addEventListener(ClipboardEvent clipboardEvent) {
eventListeners.add(clipboardEvent);
}
@ -27,7 +27,7 @@ class EventManager {
*
* @param clipboardEvent The {@link ClipboardEvent} to be removed
*/
void unsubscribe(ClipboardEvent clipboardEvent) {
void removeEventListener(ClipboardEvent clipboardEvent) {
eventListeners.remove(clipboardEvent);
}

@ -50,8 +50,8 @@ public class MyClipboard {
* @param clipboardEvent The {@link ClipboardEvent} to be added
* @see EventManager
*/
public void subscribe(ClipboardEvent clipboardEvent) {
clipboardListener.getEventManager().subscribe(clipboardEvent);
public void addEventListener(ClipboardEvent clipboardEvent) {
clipboardListener.getEventManager().addEventListener(clipboardEvent);
}
/**
@ -60,8 +60,8 @@ public class MyClipboard {
* @param clipboardEvent The {@link ClipboardEvent} to be removed
* @see EventManager
*/
public void unsubscribe(ClipboardEvent clipboardEvent) {
clipboardListener.getEventManager().unsubscribe(clipboardEvent);
public void removeEventListener(ClipboardEvent clipboardEvent) {
clipboardListener.getEventManager().removeEventListener(clipboardEvent);
}

Loading…
Cancel
Save