summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl/ImageUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/view/impl/ImageUtil.java')
-rw-r--r--src/jrummikub/view/impl/ImageUtil.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/jrummikub/view/impl/ImageUtil.java b/src/jrummikub/view/impl/ImageUtil.java
index 0254343..6af816e 100644
--- a/src/jrummikub/view/impl/ImageUtil.java
+++ b/src/jrummikub/view/impl/ImageUtil.java
@@ -19,7 +19,21 @@ class ImageUtil {
g.fillRect(0, 0, size, size);
g.setColor(c);
- g.fillRect(border, border, size - 2*border, size - 2*border);
+ g.fillRect(border, border, size - 2 * border, size - 2 * border);
+
+ return new ImageIcon(image);
+ }
+
+ static ImageIcon createPauseIcon(int size) {
+ BufferedImage image = new BufferedImage(size, size,
+ BufferedImage.TYPE_INT_ARGB);
+
+ Graphics2D g = image.createGraphics();
+
+ g.setColor(Color.BLACK);
+ int barWidth = (int) (size * 0.425f);
+ g.fillRect(0, 0, barWidth, size);
+ g.fillRect(size - barWidth, 0, barWidth, size);
return new ImageIcon(image);
}