Rename bufferedImage variable to image

pull/2/head
Hammy 3 years ago
parent 9b29ea29fd
commit 8ed79b2126

@ -61,7 +61,7 @@ class WindowsOrUnixClipboardListener extends ClipboardListener implements Runnab
if (isImageMonitored()) { if (isImageMonitored()) {
if (IMAGE.isAvailable(oldClipboard)) { if (IMAGE.isAvailable(oldClipboard)) {
MyBufferedImage bufferedImage = clipboardUtils.getImageContent(newClipboardContents); MyBufferedImage bufferedImage = clipboardUtils.getImageContent(newClipboardContents);
MyBufferedImage oldBufferedImage = new MyBufferedImage(clipboardContent.getBufferedImage()); MyBufferedImage oldBufferedImage = new MyBufferedImage(clipboardContent.getImage());
if (!bufferedImage.equals(oldBufferedImage)) { if (!bufferedImage.equals(oldBufferedImage)) {
eventManager.notifyImageEvent(clipboardContent, bufferedImage.getBufferedImage()); eventManager.notifyImageEvent(clipboardContent, bufferedImage.getBufferedImage());
} }

@ -6,23 +6,23 @@ import java.util.List;
public class ClipboardContent { public class ClipboardContent {
private String text; private String text;
private BufferedImage bufferedImage; private BufferedImage image;
private List<File> files; private List<File> files;
public ClipboardContent(String text) { public ClipboardContent(String text) {
this.text = text; this.text = text;
} }
public ClipboardContent(BufferedImage bufferedImage) { public ClipboardContent(BufferedImage image) {
this.bufferedImage = bufferedImage; this.image = image;
} }
public ClipboardContent(List<File> files) { public ClipboardContent(List<File> files) {
this.files = files; this.files = files;
} }
public BufferedImage getBufferedImage() { public BufferedImage getImage() {
return bufferedImage; return image;
} }
public String getText() { public String getText() {

@ -151,7 +151,7 @@ class ClipboardUtilsTest {
assertThat(actualClipboardContent.getText(), is(expectedString)); assertThat(actualClipboardContent.getText(), is(expectedString));
assertThat(actualClipboardContent.getFiles(), is(expectedFiles)); assertThat(actualClipboardContent.getFiles(), is(expectedFiles));
assertThat(actualClipboardContent.getBufferedImage(), is(new BufferedImageMatcher(expectedImage))); assertThat(actualClipboardContent.getImage(), is(new BufferedImageMatcher(expectedImage)));
verifyNoInteractions(logger); verifyNoInteractions(logger);
} }
@ -161,7 +161,7 @@ class ClipboardUtilsTest {
ClipboardContent actualClipboardContent = sut.getOldClipboardContent(expectedOldContent); ClipboardContent actualClipboardContent = sut.getOldClipboardContent(expectedOldContent);
assertThat(actualClipboardContent.getText(), is(expectedString)); assertThat(actualClipboardContent.getText(), is(expectedString));
assertThat(actualClipboardContent.getBufferedImage(), is(expectedImage)); assertThat(actualClipboardContent.getImage(), is(expectedImage));
assertThat(actualClipboardContent.getFiles(), is(expectedFiles)); assertThat(actualClipboardContent.getFiles(), is(expectedFiles));
verifyNoInteractions(logger); verifyNoInteractions(logger);
} }

Loading…
Cancel
Save