//Mod2State.java
/*
 * State routine - calculate/update numerical values for microstrip
 * authors: Umberto Ravaioli, Janice Richards
 * version 1.0 - Copyright: Amanogawa.com - All Rights Reserved
 */

import java.util.*;
import java.awt.Color;
import java.awt.Font;

public class Mod2State {

    // Conditions for RED wave
    static int REDamplitude = 5;
    static double REDfrequency = 0.5;
    static int REDlambda = 2;  // wavelength
    static int REDphi = 0;     // phase angle
     
    // Conditions for GREEN wave
    public double frequency, alpha, lambda;
    public int phi;
    public double fMin, fMax;
    public double lambdaMin, lambdaMax;
    public double alphaMin, alphaMax;

    static Color axisColor = Color.black;  //Color.white;
    static Color redWaveColor = Color.red;
    //static Color greenWaveColor = Color.green.darker().darker();
    static Color greenWaveColor = Color.blue.brighter().brighter(); //NOW BLUE
    
    public Font ttfFont, sanSerifFont, serifFont, symbolFont, italicFont;
    
    public static Font boldFont = new Font("Serif",Font.BOLD, 18);
    
    
    public boolean LicenseExpired;
    public int this_month, today_week, this_year, this_hour, this_minute, 
        today_month, today_year, this_zone, saving_time;
    GregorianCalendar Greg = new GregorianCalendar();
    
    public int NTime, ctime, dtime;

    
    public Mod2State(){
        frequency = 0.5;     // Hz
        fMin = 0.2;
        fMax = 3.0;

        lambda = 2.0;        // cm
        lambdaMin = 1.0;
        lambdaMax = 5.0;

        alpha = 0.0;         // Np/cm
        alphaMin = 0.0;
        alphaMax = 2.0;

	//Timefactor
	NTime=360;
	ctime=0;
	dtime=10;

    }

  
    public synchronized void increment(){
	ctime+=dtime;
	if(ctime>NTime){ ctime -= NTime; }
    }
    
    public synchronized void reset(){
	ctime=0;
    }

}
