]> ruin.nu Git - moosique.git/blob - MooViewCounter.java
bara!
[moosique.git] / MooViewCounter.java
1 import javax.swing.*;
2 import java.awt.*;
3
4 /**
5  * 
6  * 
7  * @author  Andersson, Andreen, Lanneskog, Pehrson
8  * @version 1
9  */
10  
11 public class MooViewCounter extends JPanel {
12
13         //public static final int LINE_LENGTH;
14         //private int linelenght;
15         //private String check; 
16         //private Line[];
17
18         /** 
19          * Creates 
20          */
21 //      private int timeSig1, timeSig2;
22          
23         /*public MooViewCounter (int ts1, int ts2) {
24                 timeSig1 = ts1;
25                 timeSig2 = ts2;
26                 
27                 switch (timeSig2) {
28                         case  1:  = 0;  break;
29                         case  2: linelenght = 0; break;
30                         case  4: linelenght = 10;  break;
31                         case  8: linelenght = 0; break;
32                         case  16: linelenght = 0;  break;
33                 }
34         }*/
35
36         public void paintComponent(Graphics g) {
37                 super.paintComponent(g);
38                 setBackground(Color.white);
39                 if (!(g instanceof Graphics2D)) return;
40                 Graphics2D g2 = (Graphics2D)g;
41                 setPreferredSize(new Dimension(50,200*10));
42                 for (int c = 0; c < 200; c++) {
43                         g2.drawLine(0,c*10,20,c*10);
44                         g2.drawLine(0,c*5,10,c*5);
45                         //for (int i = 0; i < (timeSig1-1); i++) {
46                         //      g2.drawLine(0,c*timesig1,linelenght,c*timesign1);
47                         //}
48                 }
49         }
50 }