Advertisement
Sago

Uhrfeld.java

Apr 8th, 2014
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | None | 0 0
  1. import sum.komponenten.*;
  2. import sum.werkzeuge.*;
  3. import sum.ereignis.*;
  4. /**
  5.  * @author
  6.  * @version
  7.  */
  8. public class Uhrfeld
  9. {
  10.     private Buntstift stift;
  11.     private int x;
  12.     private int y;
  13.     private int radius;
  14.     private int aktwinkel;
  15.     private int farbe;
  16.     public Uhrfeld(int x,int y,int r,int startwinkel)
  17.     {
  18.         this.x = x;
  19.         this.y = y;
  20.         aktwinkel = startwinkel;
  21.         radius = r;
  22.         aktwinkel = startwinkel;
  23.         stift = new Buntstift();
  24.     }
  25.  
  26.     public void setzeWinkel(int w) {
  27.         aktwinkel = w;
  28.         zeichne();
  29.     }
  30.    
  31.     public void zeichne() {
  32.         stift.setzeFarbe(farbe);
  33.         stift.hoch();
  34.         stift.bewegeBis(x,y);
  35.         stift.dreheBis(aktwinkel);
  36.         stift.runter();
  37.         stift.bewegeUm(radius);
  38.     }
  39.     public void setzeFarbe(int f) {
  40.         farbe = f;
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement