diff --git a/community-resources/src/community_progress_tail.png b/community-resources/src/community_progress_tail.png
new file mode 100644
index 000000000000..b6f7661c913c
Binary files /dev/null and b/community-resources/src/community_progress_tail.png differ
diff --git a/community-resources/src/idea/IdeaApplicationInfo.xml b/community-resources/src/idea/IdeaApplicationInfo.xml
index dd0d2e733871..aabd0fb081d2 100644
--- a/community-resources/src/idea/IdeaApplicationInfo.xml
+++ b/community-resources/src/idea/IdeaApplicationInfo.xml
@@ -3,7 +3,7 @@
textColor is HEX representation of text color for user name
*
progressColor is progress bar color
*
progressY is Y coordinate of the progress bar
+ *
progressTailIcon is a path to flame effect icon
*
* @author Konstantin Bulenkov
*/
@@ -49,6 +50,8 @@ public class Splash extends JDialog implements StartupProgress {
private boolean mySplashIsVisible;
private int myProgressLastPosition = 0;
private final JLabel myLabel;
+ private Icon myProgressTail;
+
public Splash(String imageName, final Color textColor) {
@@ -84,6 +87,7 @@ public class Splash extends JDialog implements StartupProgress {
myProgressHeight = 2;
myProgressColor = appInfo.getProgressColor();
myProgressY = appInfo.getProgressY();
+ myProgressTail = appInfo.getProgressTailIcon();
}
}
@@ -115,14 +119,13 @@ public class Splash extends JDialog implements StartupProgress {
}
final int progressWidth = (int)((myImage.getIconWidth() - 2) * myProgress);
- //if (progressWidth > myProgressLastPosition + 1) {
- //g.setColor(ColorUtil.withAlpha(color, 0.6));
final int width = progressWidth - myProgressLastPosition;
- //g.fillOval(width - 10, getProgressY() - 2, 12, getProgressHeight() + 4);
g.setColor(color);
- g.fillRect(myProgressLastPosition + 1, getProgressY(), width, getProgressHeight());
+ g.fillRect(1, getProgressY(), width, getProgressHeight());
+ if (myProgressTail != null) {
+ myProgressTail.paintIcon(this, g, width - (myProgressTail.getIconWidth()/2), getProgressY() - (myProgressTail.getIconHeight() - getProgressHeight())/2);
+ }
myProgressLastPosition = progressWidth;
- //}
}
private int getProgressHeight() {
@@ -184,4 +187,24 @@ public class Splash extends JDialog implements StartupProgress {
return myIcon.getIconHeight();
}
}
+
+ //public static void main(String[] args) {
+ // final ImageIcon icon = new ImageIcon("c:\\IDEA\\ultimate\\ultimate-resources\\src\\progress_tail.png");
+ //
+ // final int w = icon.getIconWidth();
+ // final int h = icon.getIconHeight();
+ // final BufferedImage image = GraphicsEnvironment.getLocalGraphicsEnvironment()
+ // .getDefaultScreenDevice().getDefaultConfiguration().createCompatibleImage(w, h, Color.TRANSLUCENT);
+ // final Graphics2D g = image.createGraphics();
+ // icon.paintIcon(null, g, 0, 0);
+ // g.dispose();
+ //
+ // for (int y = 0; y < image.getHeight(); y++) {
+ // for (int x = 0; x < image.getWidth(); x++) {
+ // final Color c = new Color(image.getRGB(x, y), true);
+ // System.out.print(String.format("[%3d,%3d,%3d,%3d] ", c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()));
+ // }
+ // System.out.println("");
+ // }
+ //}
}