diff options
Diffstat (limited to 'src/jrummikub/view/impl/CustomBorder.java')
-rw-r--r-- | src/jrummikub/view/impl/CustomBorder.java | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/jrummikub/view/impl/CustomBorder.java b/src/jrummikub/view/impl/CustomBorder.java deleted file mode 100644 index eae0589..0000000 --- a/src/jrummikub/view/impl/CustomBorder.java +++ /dev/null @@ -1,43 +0,0 @@ -package jrummikub.view.impl; - -import java.awt.Color; -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Insets; - -import javax.swing.border.Border; - -class CustomBorder implements Border { - private Color color; - private int top, left, bottom, right; - - public CustomBorder(Color color, int top, int left, int bottom, int right) { - this.color = color; - this.top = top; - this.left = left; - this.bottom = bottom; - this.right = right; - } - - @Override - public Insets getBorderInsets(Component c) { - return new Insets(top, left, bottom, right); - } - - @Override - public boolean isBorderOpaque() { - return true; - } - - @Override - public void paintBorder(Component c, Graphics g, int x, int y, int width, - int height) { - g.setColor(color); - - g.fillRect(x, y, width, top); - g.fillRect(x, y + height - bottom, width, bottom); - g.fillRect(x, y, left, height); - g.fillRect(x + width - right, y, right, height); - } - -} |