This commit is contained in:
Looly
2023-04-22 02:36:32 +08:00
parent 7387150f1a
commit 16e05bf9f5
108 changed files with 1244 additions and 857 deletions

View File

@@ -12,7 +12,7 @@
package org.dromara.hutool.swing;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import org.dromara.hutool.swing.clipboard.ClipboardUtil;
import org.dromara.hutool.swing.img.ImgUtil;
@@ -39,7 +39,7 @@ public class RobotUtil {
try {
ROBOT = new Robot();
} catch (final AWTException e) {
throw new UtilException(e);
throw new HutoolException(e);
}
}

View File

@@ -12,7 +12,7 @@
package org.dromara.hutool.swing.clipboard;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import java.awt.Image;
import java.awt.Toolkit;
@@ -82,7 +82,7 @@ public class ClipboardUtil {
try {
return content.getTransferData(flavor);
} catch (final UnsupportedFlavorException | IOException e) {
throw new UtilException(e);
throw new HutoolException(e);
}
}
return null;

View File

@@ -12,7 +12,7 @@
package org.dromara.hutool.swing.img;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import org.dromara.hutool.core.io.IORuntimeException;
import java.awt.Dimension;
@@ -76,7 +76,7 @@ public class FontUtil {
try {
return Font.createFont(Font.TYPE1_FONT, fontFile);
} catch (final Exception e1) {
throw new UtilException(e);
throw new HutoolException(e);
}
} catch (final IOException e) {
throw new IORuntimeException(e);
@@ -98,7 +98,7 @@ public class FontUtil {
try {
return Font.createFont(Font.TYPE1_FONT, fontStream);
} catch (final Exception e1) {
throw new UtilException(e1);
throw new HutoolException(e1);
}
} catch (final IOException e) {
throw new IORuntimeException(e);

View File

@@ -12,7 +12,7 @@
package org.dromara.hutool.swing.img;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import org.dromara.hutool.core.io.IORuntimeException;
import com.drew.imaging.ImageMetadataReader;
import com.drew.imaging.ImageProcessingException;
@@ -45,7 +45,7 @@ public class ImgMetaUtil {
try {
metadata = ImageMetadataReader.readMetadata(file);
} catch (final ImageProcessingException e) {
throw new UtilException(e);
throw new HutoolException(e);
} catch (final IOException e) {
throw new RuntimeException(e);
}
@@ -64,7 +64,7 @@ public class ImgMetaUtil {
try {
metadata = ImageMetadataReader.readMetadata(in);
} catch (final ImageProcessingException e) {
throw new UtilException(e);
throw new HutoolException(e);
} catch (final IOException e) {
throw new RuntimeException(e);
}