Browse Source

Merge pull request #1047 in DESIGN/design from ~BRYANT/design:feature/10.0 to feature/10.0

* commit '07c249e6611740fee333c64b5760daf612e2201a':
  无jira任务 sonar问题修复
research/11.0
Bryant 5 years ago
parent
commit
ff6261213a
  1. 2
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RTextAreaEditorKit.java
  2. 10
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/VolatileImageBackgroundPainterStrategy.java
  3. 6
      designer-base/src/main/java/com/fr/design/icon/LockIcon.java
  4. 1
      designer-base/src/main/java/com/fr/design/icon/WarningIcon.java

2
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RTextAreaEditorKit.java

@ -902,6 +902,8 @@ public class RTextAreaEditorKit extends DefaultEditorKit {
}
} catch (BadLocationException bl) {
}
}else if (textArea == null) {
throw new IllegalArgumentException("RTextArea can not be null!");
}
if (beep)

10
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/VolatileImageBackgroundPainterStrategy.java

@ -9,6 +9,8 @@
*/
package com.fr.design.gui.syntax.ui.rtextarea;
import com.fr.log.FineLoggerFactory;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.VolatileImage;
@ -95,9 +97,9 @@ public class VolatileImageBackgroundPainterStrategy
try {
tracker.waitForID(1);
} catch (InterruptedException e) {
e.printStackTrace();
FineLoggerFactory.getLogger().error(e.getMessage(),e);
bgImage = null;
return;
Thread.currentThread().interrupt();
} finally {
tracker.removeImage(i, 1);
}
@ -106,9 +108,9 @@ public class VolatileImageBackgroundPainterStrategy
try {
tracker.waitForID(0);
} catch (InterruptedException e) {
e.printStackTrace();
FineLoggerFactory.getLogger().error(e.getMessage(),e);
bgImage = null;
return;
Thread.currentThread().interrupt();
} finally {
tracker.removeImage(bgImage, 0);
}

6
designer-base/src/main/java/com/fr/design/icon/LockIcon.java

@ -34,6 +34,7 @@ public class LockIcon extends ImageIcon {
}
}
@Override
public void paintIcon(Component c, Graphics g, int x, int y) {
if (mainImage != null) {
g.drawImage(mainImage, x, y, c);
@ -48,6 +49,7 @@ public class LockIcon extends ImageIcon {
*
* @param image the image
*/
@Override
protected void loadImage(Image image) {
synchronized (tracker) {
tracker.addImage(image, 0);
@ -55,6 +57,7 @@ public class LockIcon extends ImageIcon {
tracker.waitForID(0, 0);
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
}
loadStatus = tracker.statusID(0, false);
@ -70,6 +73,7 @@ public class LockIcon extends ImageIcon {
*
* @return the <code>Image</code> object for this <code>ImageIcon</code>
*/
@Override
public Image getImage() {
return mainImage;
}
@ -85,6 +89,7 @@ public class LockIcon extends ImageIcon {
*
* @return the width in pixels of this icon
*/
@Override
public int getIconWidth() {
return width;
}
@ -94,6 +99,7 @@ public class LockIcon extends ImageIcon {
*
* @return the height in pixels of this icon
*/
@Override
public int getIconHeight() {
return height;
}

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

@ -59,6 +59,7 @@ public class WarningIcon extends ImageIcon {
tracker.waitForID(0, 0);
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
}
tracker.statusID(0, false);

Loading…
Cancel
Save