/*    */ package tools;
/*    */ 
/*    */ import java.awt.Color;
/*    */ import java.awt.Graphics;
/*    */ import java.awt.Graphics2D;
/*    */ import main.ChronoPanel;
/*    */ import signals.Signals;
/*    */ 
/*    */ public class VertLines
/*    */ {
/*    */   private int Xstart;
/*    */   private int Xend;
/*    */   private int startNum;
/*    */   private int endNum;
/*    */   private Signals s;
/*    */   
/*    */   public VertLines(Signals s, int Xstart, int Xend, int startNum, int endNum)
/*    */   {
/* 19 */     this.s = s;
/* 20 */     this.Xstart = Xstart;
/* 21 */     this.Xend = Xend;
/* 22 */     this.startNum = startNum;
/* 23 */     this.endNum = endNum;
/*    */   }
/*    */   
/*    */   public void draw(Graphics g, ChronoPanel chrono) {
/* 27 */     Graphics2D g2 = (Graphics2D)g;
/* 28 */     float[] dash1 = { 5.0F };
/* 29 */     java.awt.Stroke dashed = new java.awt.BasicStroke(1.0F, 0, 0, 10.0F, dash1, 0.0F);
/* 30 */     g2.setStroke(dashed);
/* 31 */     g2.setColor(new Color(150, 150, 150));
/*    */     
/* 33 */     for (int index = 0; index <= (this.Xend - this.Xstart) / this.s.widthUnit; index++) {
/* 34 */       boolean inTimeLapse = false;
/*    */       
/*    */ 
/* 37 */       for (int i = 0; i < chrono.nbrTimeLapse; i++) {
/* 38 */         for (int j = 0; j < 3; j++) {
/* 39 */           if ((this.Xstart + index * this.s.widthUnit - Signals.leftSpace > chrono.timeLapse[i][0]) && (this.Xstart + index * this.s.widthUnit - Signals.leftSpace < chrono.timeLapse[i][3])) { inTimeLapse = true;
/*    */           }
/*    */         }
/*    */       }
/* 43 */       if (!inTimeLapse)
/*    */       {
/* 45 */         if ((this.s.wave[index] == 0) && (this.s.wave[(index + 1)] == 1)) { g.drawLine(this.Xstart + index * this.s.widthUnit, (this.startNum + 1) * (Signals.Yspace + Signals.heightUnit), this.Xstart + index * this.s.widthUnit, this.endNum * (Signals.Yspace + Signals.heightUnit) + 5);
/*    */         }
/*    */       }
/*    */     }
/* 49 */     g2.setColor(Color.black);
/* 50 */     g2.setStroke(new java.awt.BasicStroke(1.0F));
/*    */   }
/*    */ }


/* Location:              F:\JAVA\WORKSPACE\chronoEditor_v2.3.jar!\tools\VertLines.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */