This commit is contained in:
Looly
2023-04-12 01:18:11 +08:00
parent bc601ca0ad
commit d2e5155ac5
205 changed files with 500 additions and 492 deletions

View File

@@ -135,7 +135,7 @@ public class ClipboardMonitor implements ClipboardOwner, Runnable, Closeable {
@Override
public synchronized void run() {
if(false == isRunning) {
if(! isRunning) {
final Clipboard clipboard = this.clipboard;
clipboard.setContents(clipboard.getContents(null), this);
isRunning = true;

View File

@@ -68,7 +68,7 @@ public class ImageSelection implements Transferable, Serializable {
*/
@Override
public Object getTransferData(final DataFlavor flavor) throws UnsupportedFlavorException {
if (false == DataFlavor.imageFlavor.equals(flavor)) {
if (! DataFlavor.imageFlavor.equals(flavor)) {
throw new UnsupportedFlavorException(flavor);
}
return image;

View File

@@ -464,9 +464,9 @@ public class ImgUtil {
* @param cols 目标切片列数。默认2必须是范围 [1, 20] 之内
*/
public static void sliceByRowsAndCols(final Image srcImage, final File destDir, final String formatName, int rows, int cols) {
if (false == destDir.exists()) {
if (! destDir.exists()) {
FileUtil.mkdir(destDir);
} else if (false == destDir.isDirectory()) {
} else if (! destDir.isDirectory()) {
throw new IllegalArgumentException("Destination must be a Directory !");
}