Browse Source

常量命名规范修复

release/11.0
obo 2 years ago
parent
commit
1a040cf5cd
  1. 22
      designer-base/src/main/java/com/fr/design/icon/WarningIcon.java

22
designer-base/src/main/java/com/fr/design/icon/WarningIcon.java

@ -16,10 +16,10 @@ import java.awt.image.ImageObserver;
* @since 2012-3-28下午10:20:29
*/
public class WarningIcon extends ImageIcon {
protected final static Component component = new Component() {
protected final static Component COMPONENT = new Component() {
};
protected final static MediaTracker tracker = new MediaTracker(component);
private final static Image warnighImage = SVGLoader.load("/com/fr/design/standard/warning.svg");
protected final static MediaTracker TRACKER = new MediaTracker(COMPONENT);
private final static Image WARNING_IMAGE = SVGLoader.load("/com/fr/design/standard/warning.svg");
private Image mainImage = null;
private ImageObserver imageObserver;
@ -40,8 +40,8 @@ public class WarningIcon extends ImageIcon {
if (mainImage != null) {
g.drawImage(mainImage, x, y, c);
}
if (warnighImage != null) {
g.drawImage(warnighImage, x, y, c);
if (WARNING_IMAGE != null) {
g.drawImage(WARNING_IMAGE, x, y, c);
}
SvgPaintUtils.afterPaint((Graphics2D) g);
}
@ -53,17 +53,17 @@ public class WarningIcon extends ImageIcon {
* the image
*/
protected void loadImage(Image image) {
synchronized (tracker) {
tracker.addImage(image, 0);
synchronized (TRACKER) {
TRACKER.addImage(image, 0);
try {
tracker.waitForID(0, 0);
TRACKER.waitForID(0, 0);
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
}
tracker.statusID(0, false);
tracker.removeImage(image, 0);
TRACKER.statusID(0, false);
TRACKER.removeImage(image, 0);
width = image.getWidth(imageObserver);
height = image.getHeight(imageObserver);
@ -104,6 +104,6 @@ public class WarningIcon extends ImageIcon {
}
{
loadImage(warnighImage);
loadImage(WARNING_IMAGE);
}
}
Loading…
Cancel
Save