ScaleDrawer.java added.
This commit is contained in:
parent
96c3adba83
commit
6edcffc586
30
cicaprojekt/ScaleDrawer.java
Normal file
30
cicaprojekt/ScaleDrawer.java
Normal file
@ -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();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user