From 6edcffc58648c6f08a51608cb0a05f8aa17afc4f Mon Sep 17 00:00:00 2001 From: ericnerdo Date: Sat, 7 May 2016 16:47:57 +0200 Subject: [PATCH] ScaleDrawer.java added. --- cicaprojekt/ScaleDrawer.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 cicaprojekt/ScaleDrawer.java diff --git a/cicaprojekt/ScaleDrawer.java b/cicaprojekt/ScaleDrawer.java new file mode 100644 index 0000000..02e3942 --- /dev/null +++ b/cicaprojekt/ScaleDrawer.java @@ -0,0 +1,30 @@ +package cicaprojekt; + +import java.io.IOException; + +public class ScaleDrawer extends ImagePanel implements Drawer { + + Scale scale; + + public ScaleDrawer(Scale s) throws IOException { + super("Scale.png"); + scale = s; + setVisible(false); + } + + @Override + public void draw() throws IOException { + setVisible(true); + } + + @Override + public int getX() { + return scale.getX(); + } + + @Override + public int getY() { + return scale.getY(); + } + +}