Rename fileListMonitored to filesMonitored

MYC-Refactor
Hammy 3 years ago
parent 79763cd19a
commit 791377538b

@ -11,7 +11,7 @@ abstract class ClipboardListener {
private EventManager eventManager = new EventManager();
private boolean imageMonitored = true;
private boolean textMonitored = true;
private boolean fileListMonitored = true;
private boolean fileMonitored = true;
/**
* Main entry point of execution for both {@link MacClipboardListener} and {@link WindowsOrUnixClipboardListener}
@ -45,6 +45,10 @@ abstract class ClipboardListener {
this.imageMonitored = !imageMonitored;
}
void toggleFileMonitored() {
this.fileMonitored = !fileMonitored;
}
boolean isImageMonitored() {
return imageMonitored;
}
@ -57,16 +61,16 @@ abstract class ClipboardListener {
return textMonitored;
}
public boolean isFileListMonitored() {
return fileListMonitored;
void setTextMonitored(boolean textMonitored) {
this.textMonitored = textMonitored;
}
public void setFileListMonitored(boolean fileListMonitored) {
this.fileListMonitored = fileListMonitored;
boolean isFileMonitored() {
return fileMonitored;
}
void setTextMonitored(boolean textMonitored) {
this.textMonitored = textMonitored;
void setFileMonitored(boolean fileMonitored) {
this.fileMonitored = fileMonitored;
}
EventManager getEventManager() {

@ -76,7 +76,7 @@ class MacClipboardListener extends ClipboardListener {
* @param myClipboardContents {@link MyClipboardContent[]} of Unknown {@link Class} containing previous contents
*/
void checkFiles(Transferable newClipboardContents, MyClipboardContent<?>[] myClipboardContents) {
if (isFileListMonitored()) {
if (isFileMonitored()) {
if (FILELIST.isAvailable(clipboard)) {
List<File> fileListContent = getFileContent(newClipboardContents);
if (fileListContent == null) return;

@ -106,6 +106,10 @@ public class MyClipboard {
clipboardListener.toggleImagesMonitored();
}
public void toggleFilesMonitored() {
clipboardListener.toggleFileMonitored();
}
public boolean isImageMonitored() {
return clipboardListener.isImageMonitored();
}
@ -122,6 +126,14 @@ public class MyClipboard {
clipboardListener.setTextMonitored(textMonitored);
}
public boolean isFileMonitored() {
return clipboardListener.isFileMonitored();
}
public void setFileMonitored(boolean fileMonitored) {
clipboardListener.setFileMonitored(fileMonitored);
}
private static boolean isMac() {
return SystemUtils.IS_OS_MAC;
}

@ -64,7 +64,7 @@ class WindowsOrUnixClipboardListener extends ClipboardListener implements Runnab
}
}
if (isFileListMonitored()) {
if (isFileMonitored()) {
if (FILELIST.isAvailable(oldClipboard)) {
List<File> fileList = getFileContent(newClipboardContents);
getEventManager().notifyFilesEvent(oldClipboardContent, fileList);

Loading…
Cancel
Save