Add javadoc

MYC-Refactor
Hammy 3 years ago
parent 50f521fd1a
commit 1f7b2ca85e

@ -15,6 +15,12 @@ class MacClipboardListener extends ClipboardListener {
MacClipboardListener() { } MacClipboardListener() { }
/**
* Checks if {@link String} is within the clipboard and changed
*
* @param newClipboardContents {@link Transferable} containing new clipboard contents
* @param myClipboardContents {@link MyClipboardContent[]} of Unknown {@link Class} containing previous contents
*/
void checkText(Transferable newClipboardContents, MyClipboardContent<?>[] myClipboardContents) { void checkText(Transferable newClipboardContents, MyClipboardContent<?>[] myClipboardContents) {
if (isTextMonitored()) { if (isTextMonitored()) {
if (STRING.isAvailable(clipboard)) { if (STRING.isAvailable(clipboard)) {
@ -28,6 +34,12 @@ class MacClipboardListener extends ClipboardListener {
} }
} }
/**
* Checks if {@link java.awt.Image} is within the clipboard and changed
*
* @param newClipboardContents {@link Transferable} containing new clipboard contents
* @param myClipboardContents {@link MyClipboardContent[]} of Unknown {@link Class} containing previous contents
*/
void checkImages(Transferable newClipboardContents, MyClipboardContent<?>[] myClipboardContents) { void checkImages(Transferable newClipboardContents, MyClipboardContent<?>[] myClipboardContents) {
if (isImagesMonitored()) { if (isImagesMonitored()) {
if (IMAGE.isAvailable(clipboard)) { if (IMAGE.isAvailable(clipboard)) {
@ -41,7 +53,10 @@ class MacClipboardListener extends ClipboardListener {
} }
} }
/**
* Main entry point for {@link MacClipboardListener}
* <p>Retrieves thread from {@link Executors#newSingleThreadScheduledExecutor()} and executes code on a fixed delay</p>
*/
@Override @Override
void execute() { void execute() {
Transferable oldClipboardContents = clipboard.getContents(null); Transferable oldClipboardContents = clipboard.getContents(null);

Loading…
Cancel
Save