Don't access eventManager through getter

MYC-Refactor
Hammy 3 years ago
parent f235be2f39
commit f570eca8fa

@ -41,7 +41,7 @@ class MacClipboardListener extends ClipboardListener implements Runnable {
Object oldContent = myClipboardContents[0].getOldContent();
if (!newStringContent.equals(oldContent)) {
OldClipboardContent oldClipboardContent = clipboardUtils.getOldClipboardContent(oldContent);
getEventManager().notifyTextEvent(oldClipboardContent, newStringContent);
eventManager.notifyTextEvent(oldClipboardContent, newStringContent);
}
}
@ -65,7 +65,7 @@ class MacClipboardListener extends ClipboardListener implements Runnable {
if (isImageMonitored()) {
if (!newImageContent.equals(myClipboardContents[0].getOldContent())) {
OldClipboardContent oldClipboardContent = clipboardUtils.getOldClipboardContent(myClipboardContents[0].getOldContent());
getEventManager().notifyImageEvent(oldClipboardContent, bufferedImageContent);
eventManager.notifyImageEvent(oldClipboardContent, bufferedImageContent);
}
}
@ -88,7 +88,7 @@ class MacClipboardListener extends ClipboardListener implements Runnable {
if (isFileMonitored()) {
if (!fileListContent.equals(myClipboardContents[0].getOldContent())) {
OldClipboardContent oldClipboardContent = clipboardUtils.getOldClipboardContent(myClipboardContents[0].getOldContent());
getEventManager().notifyFilesEvent(oldClipboardContent, fileListContent);
eventManager.notifyFilesEvent(oldClipboardContent, fileListContent);
}
}

@ -52,7 +52,7 @@ class WindowsOrUnixClipboardListener extends ClipboardListener implements Runnab
if (TEXT.isAvailable(oldClipboard) && !FILELIST.isAvailable(oldClipboard)) {
String stringContent = clipboardUtils.getStringContent(newClipboardContents);
if (!stringContent.equals(oldClipboardContent.getOldText())) {
getEventManager().notifyTextEvent(oldClipboardContent, stringContent);
eventManager.notifyTextEvent(oldClipboardContent, stringContent);
}
}
}
@ -66,10 +66,10 @@ class WindowsOrUnixClipboardListener extends ClipboardListener implements Runnab
Dimension imageDimension = new Dimension(bufferedImage.getWidth(), bufferedImage.getHeight());
Dimension oldImageDimension = new Dimension(oldBufferedImage.getWidth(), oldBufferedImage.getHeight());
if (!imageDimension.equals(oldImageDimension)) {
getEventManager().notifyImageEvent(oldClipboardContent, bufferedImage);
eventManager.notifyImageEvent(oldClipboardContent, bufferedImage);
}
} else {
getEventManager().notifyImageEvent(oldClipboardContent, bufferedImage);
eventManager.notifyImageEvent(oldClipboardContent, bufferedImage);
}
}
}
@ -79,7 +79,7 @@ class WindowsOrUnixClipboardListener extends ClipboardListener implements Runnab
if (FILELIST.isAvailable(oldClipboard)) {
List<File> fileList = clipboardUtils.getFileContent(newClipboardContents);
if (!fileList.equals(oldClipboardContent.getOldFiles())) {
getEventManager().notifyFilesEvent(oldClipboardContent, fileList);
eventManager.notifyFilesEvent(oldClipboardContent, fileList);
}
}
}

Loading…
Cancel
Save