package smith_abagi;

/*      */ import java.awt.Checkbox;
/*      */ import java.awt.Color;
/*      */ import java.awt.Font;
/*      */ import java.awt.Graphics;
/*      */ import java.awt.Panel;
/*      */ import java.awt.Scrollbar;
/*      */ import java.awt.TextField;
/*      */ import java.awt.event.AdjustmentEvent;
/*      */ import java.awt.event.ItemEvent;
/*      */ import java.awt.event.MouseEvent;
/*      */ 
/*      */ public class Chart extends java.applet.Applet implements java.awt.event.AdjustmentListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
/*      */ {
/*      */   Auxiliary auxiliary;
/*      */   Auxiliary2 auxiliary2;
/*      */   Auxiliary3 auxiliary3;
/*      */   Auxiliary4 auxiliary4;
/*      */   Auxiliary5 auxiliary5;
/*      */   SmithPanel2 sp2;
/*      */   TransSlidePanel slidepanel;
/*      */   Trans_State state;
/*      */   TransInputPanel linepanel;
/*      */   TransLoadPanel loadpanel;
/*      */   Arc_red arcred;
/*      */   Arc_green arcgreen;
/*      */   line line;
/*      */   Trans_MultiGraphPanelA mgpa;
/*      */   Trans_MultiGraphPanelB mgpb;
/*      */   Panel psmith2;
/*      */   public Panel pplota;
/*      */   public Panel pplotb;
/*      */   public Panel paux5;
/*      */   
/*      */   public void init()
/*      */   {
/*   36 */     setLayout(null);
/*      */     
/*      */ 
/*   39 */     state = new Trans_State();
/*      */     
/*   41 */     auxiliary = new Auxiliary(state);
/*   42 */     auxiliary.setBounds(620, 123, 150, 12);
/*   43 */     auxiliary.setVisible(true);
/*      */     
/*   45 */     auxiliary2 = new Auxiliary2(state);
/*   46 */     auxiliary2.setBounds(620, 158, 150, 12);
/*   47 */     auxiliary2.setVisible(true);
/*      */     
/*   49 */     auxiliary3 = new Auxiliary3(state);
/*   50 */     auxiliary3.setBounds(620, 193, 150, 12);
/*   51 */     auxiliary3.setVisible(true);
/*      */     
/*   53 */     sp2 = new SmithPanel2(state);
/*   54 */     sp2.setBounds(8, 8, 850, 590);
/*   55 */     sp2.setxpos(state.xpos);
/*   56 */     sp2.setZin(state.Zin, state.Z0);
/*      */     
/*   58 */     sp2.setZL(state.ZL, state.Z0);
/*      */     
/*   60 */     //sp2.sm.setGL(state.GammaL);
/*   61 */     sp2.setVisible(true);
/*      */     
/*   63 */     slidepanel = new TransSlidePanel();
/*   64 */     slidepanel.setBounds(8, 8, 564, 34);
/*   65 */     slidepanel.setLineLength(state.lineLength, state.lineLength_part1, state.lineLength_part2, state.linecounter1, state.linecounter2);
/*      */     
/*      */ 
/*   68 */     String[] str3 = { "Z" };
/*   69 */     String[] str4 = { "[ ? ]" };
/*   70 */     linepanel = new TransInputPanel(" ", str3, str4, state);
/*   71 */     linepanel.setValue(state.Z0, 0);
/*   72 */     linepanel.setBounds(577, 422, 274, 50);
/*      */     
/*      */ 
/*      */ 
/*   76 */     String[] str1 = { "Z", "Y" };
/*   77 */     String[] str2 = { "[ ? ]", "1" };
/*   78 */     loadpanel = new TransLoadPanel("Set Load", str1, str2, state);
/*   79 */     loadpanel.setValue(state.ZL, 0);
/*   80 */     loadpanel.setBounds(577, 479, 274, 114);
/*      */     
/*      */ 
/*      */ 
/*   84 */     loadpanel.setVisible(true);
/*   85 */     linepanel.setVisible(true);
/*      */     
/*      */ 
/*   88 */     arcred = new Arc_red();
/*   89 */     arcred.setBounds(592, 338, 18, 10);
/*      */     
/*   91 */     arcgreen = new Arc_green();
/*   92 */     arcgreen.setBounds(592, 368, 18, 10);
/*      */     
/*   94 */     mgpa = new Trans_MultiGraphPanelA("");
/*      */     
/*   96 */     mgpa.setBounds(575, 276, 278, 283);
/*   97 */     mgpb = new Trans_MultiGraphPanelB("");
/*      */     
/*   99 */     mgpb.setBounds(575, 12, 278, 268);
/*      */     
/*  101 */     auxiliary4 = new Auxiliary4(state);
/*  102 */     auxiliary4.setBounds(575, 534, 278, 25);
/*  103 */     auxiliary4.setVisible(true);
/*      */     
/*  105 */     auxiliary5 = new Auxiliary5(state);
/*  106 */     auxiliary5.setBounds(575, 560, 278, 33);
/*  107 */     auxiliary5.setVisible(true);
/*      */     
/*  109 */     paux5 = new Panel();
/*  110 */     paux5.setBackground(Color.black);
/*  111 */     paux5.setBounds(574, 559, 280, 35);
/*      */     
/*  113 */     pplota = new Panel();
/*  114 */     pplota.setBackground(Color.black);
/*  115 */     pplota.setBounds(574, 11, 280, 269);
/*      */     
/*  117 */     pplotb = new Panel();
/*  118 */     pplotb.setBackground(Color.black);
/*  119 */     pplotb.setBounds(574, 276, 280, 284);
/*      */     
/*  121 */     Panel pgraph = new Panel();
/*  122 */     pgraph.setBackground(Color.black);
/*  123 */     pgraph.setBounds(10, 235, 900, 288);
/*      */     
/*  125 */     psmith2 = new Panel();
/*  126 */     psmith2.setBackground(Color.black);
/*  127 */     psmith2.setBounds(7, 7, 852, 592);
/*  128 */     psmith2.setVisible(true);
/*      */     
/*  130 */     Panel pload = new Panel();
/*  131 */     pload.setBackground(Color.black);
/*  132 */     pload.setBounds(576, 478, 276, 116);
/*      */     
/*  134 */     Panel pline = new Panel();
/*  135 */     pline.setBackground(Color.black);
/*  136 */     pline.setBounds(576, 421, 276, 52);
/*      */     
/*  138 */     Panel p0 = new Panel();
/*  139 */     p0.setBackground(Color.cyan);
/*  140 */     p0.setBounds(3, 3, 860, 600);
/*      */     
/*  142 */     Panel p00 = new Panel();
/*  143 */     p00.setBackground(Color.black);
/*  144 */     p00.setBounds(0, 0, 866, 606);
/*      */     
/*  146 */     auxiliary4.setVisible(false);
/*  147 */     auxiliary5.setVisible(false);
/*  148 */     mgpb.setVisible(false);
/*  149 */     mgpa.setVisible(false);
/*      */     
/*  151 */     pplota.setVisible(false);
/*  152 */     pplotb.setVisible(false);
/*  153 */     paux5.setVisible(false);
/*      */     
/*  155 */     if ((state.this_year > line.magicyear) || ((state.this_year == line.magicyear) && (state.this_month > line.magicmonth))) {
/*  156 */       state.LicenseExpired = true;
/*      */     }
/*      */     else
/*      */     {
/*  160 */       add(auxiliary4);
/*  161 */       add(auxiliary5);
/*  162 */       add(mgpb);
/*  163 */       add(mgpa);
/*      */       
/*  165 */       add(pplota);
/*  166 */       add(pplotb);
/*  167 */       add(paux5);
/*      */       
/*  169 */       add(auxiliary);
/*  170 */       add(auxiliary2);
/*  171 */       add(auxiliary3);
/*      */       
/*  173 */       add(slidepanel);
/*      */       
/*  175 */       add(loadpanel);
/*  176 */       add(pload);
/*  177 */       add(linepanel);
/*      */       
/*  179 */       add(pline);
/*  180 */       add(arcred);
/*  181 */       add(arcgreen);
/*  182 */       add(sp2);
/*      */       
/*  184 */       add(psmith2);
/*  185 */       add(p0);
/*  186 */       add(p00);
/*      */       
/*  188 */       state.LicenseExpired = false;
/*      */     }
/*      */     
/*      */ 
/*  192 */     slidepanel.slider.addAdjustmentListener(this);
/*  193 */     slidepanel.slider2.addAdjustmentListener(this);
/*  194 */     linepanel.b1.addActionListener(this);
/*  195 */     loadpanel.b1.addActionListener(this);
/*  196 */     loadpanel.c1.addItemListener(this);
/*  197 */     loadpanel.c2.addItemListener(this);
/*  198 */     loadpanel.c3.addItemListener(this);
/*  199 */     sp2.large.addItemListener(this);
/*  200 */     sp2.scon.imp.addItemListener(this);
/*  201 */     sp2.scon.adm.addItemListener(this);
/*  202 */     sp2.scon.swr.addItemListener(this);
/*  203 */     sp2.scon.swrline.addItemListener(this);
/*  204 */     sp2.sc.addMouseListener(this);
/*  205 */     sp2.sc.addMouseMotionListener(this);
/*  206 */     loadpanel.slider1.addAdjustmentListener(this);
/*  207 */     loadpanel.slider2.addAdjustmentListener(this);
/*  208 */     loadpanel.slider3.addAdjustmentListener(this);
/*  209 */     loadpanel.slider4.addAdjustmentListener(this);
/*  210 */     sp2.colore.addActionListener(this);
/*      */     
/*      */ 
/*      */ 
/*  214 */     doupdate();
/*  215 */     state.ignition();
/*      */     
/*  217 */     mgpa.plotVoltageCurrent(state);
/*  218 */     mgpa.tgc3.repaint();
/*  219 */     mgpa.tgc4.repaint();
/*      */     
/*  221 */     mgpa.tgc3.setVisible(true);
/*  222 */     mgpa.tgc4.setVisible(true);
/*  223 */     mgpa.repaint();
/*      */     
/*  225 */     if (state.use_Zchart) {
/*  226 */       mgpb.plotImpedance(state);
/*      */     }
/*      */     else {
/*  229 */       mgpb.plotAdmittance(state);
/*      */     }
/*  231 */     mgpb.tgc1.repaint();
/*  232 */     mgpb.tgc2.repaint();
/*      */     
/*  234 */     mgpb.tgc1.setVisible(true);
/*  235 */     mgpb.tgc2.setVisible(true);
/*  236 */     mgpb.repaint();
/*      */   }
/*      */   
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */   public void paint(Graphics g)
/*      */   {
/*  271 */     Font licensefont = new Font("SanSerif", 1, 18);
/*  272 */     Font fonto = new Font("SanSerif", 0, 12);
/*  273 */     Font fontc = new Font("SanSerif", 1, 16);
/*      */     
/*  275 */     java.awt.Graphics2D g2d = (java.awt.Graphics2D)g;
/*  276 */     g.setColor(Color.white);
/*  277 */     g.fillRect(0, 0, 886, 630);
/*      */     
/*  279 */     if (state.LicenseExpired) {
/*  280 */       g.setFont(licensefont);
/*      */       
/*  282 */       g.setColor(Color.red);
/*  283 */       g.drawString("The software license has expired.", 50, 200);
/*  284 */       g.setColor(Color.black);
/*  285 */       g.drawString("Obtain updated files from www.amanogawa.com", 50, 230);
/*      */     }
/*      */     
/*  288 */     g2d.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
/*  289 */     int annonuovo = 2006;
/*  290 */     int anno = 2006;
/*      */     
/*  292 */     if (anno > state.this_year) {
/*  293 */       annonuovo = anno;
/*      */     }
/*      */     else {
/*  296 */       annonuovo = state.this_year;
/*      */     }
/*  298 */     g.setColor(Color.red.darker());
/*  299 */     g.setFont(fontc);
/*  300 */     g.drawString("©", 10, 622);
/*  301 */     g.setFont(fonto);
/*  302 */     g.drawString("Amanogawa, " + annonuovo + " - All Rights Reserved", 30, 620);
/*      */   }
/*      */   
/*      */ 
/*      */   public void start() {}
/*      */   
/*      */ 
/*      */   public void stop() {}
/*      */   
/*      */   public void destroy() {}
/*      */   
/*      */   public void adjustmentValueChanged(AdjustmentEvent evt)
/*      */   {
/*  315 */     Font symbolfont = new Font("Symbol", 0, 12);
/*  316 */     Font labfont = new Font("SanSerif", 0, 12);
/*      */     
/*      */ 
/*  319 */     setFont(symbolfont);
/*  320 */     String alpha = "?";
/*  321 */     String lambda = "?";
/*  322 */     String Ohm = "?";
/*  323 */     String infinity = "?";
/*  324 */     String Gamma = "?";
/*  325 */     setFont(labfont);
/*      */     
/*  327 */     if ((evt.getSource() == loadpanel.slider1) || (evt.getSource() == loadpanel.slider2))
/*      */     {
/*  329 */       if (loadpanel.c1.getState())
/*      */       {
/*      */ 
/*      */ 
/*      */ 
/*  334 */         Complex tempc = new Complex(Double.valueOf(loadpanel.text1[0].getText()).doubleValue(), Double.valueOf(loadpanel.text2[0].getText()).doubleValue());
/*      */         
/*  336 */         double temp1 = Complex.Real(tempc);
/*  337 */         double temp2 = Complex.Imaginary(tempc);
/*      */         
/*      */ 
/*  340 */         if ((temp1 < 0.0D) && ((temp2 != 0.0D) || (temp2 < -1.0E130D))) {
/*  341 */           state.ZL = new Complex(0.0D, temp2);
/*  342 */           state.YL = new Complex(0.0D, -1.0D / temp2);
/*  343 */           loadpanel.setValue(state.ZL, 0);
/*  344 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */         }
/*  346 */         else if ((temp1 <= 0.0D) && (temp2 == 0.0D)) {
/*  347 */           state.ZL = new Complex(0.0D, 0.0D);
/*  348 */           state.YL = new Complex(0.0D, -1.0E135D);
/*  349 */           loadpanel.setValue(state.ZL, 0);
/*  350 */           state.IsLoadShort = true;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */         }
/*  352 */         else if ((temp1 == 0.0D) && (temp2 < -1.0E130D)) {
/*  353 */           state.YL = new Complex(0.0D, -1.0E135D);
/*  354 */           state.ZL = new Complex(0.0D, 0.0D);
/*  355 */           loadpanel.setValue(state.ZL, 0);
/*  356 */           state.IsLoadShort = false;state.IsLoadOpen = true;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */         }
/*  358 */         else if ((temp1 == 0.0D) && (temp2 != 0.0D)) {
/*  359 */           state.ZL = new Complex(0.0D, temp2);
/*  360 */           state.YL = new Complex(0.0D, -1.0D / temp2);
/*  361 */           loadpanel.setValue(state.ZL, 0);
/*  362 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */         }
/*      */         else {
/*  365 */           state.ZL = new Complex(temp1, temp2);
/*  366 */           state.YL = EMF.Inv(state.ZL);
/*  367 */           loadpanel.setValue(state.ZL, 0);
/*  368 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = true;
/*      */         }
/*  370 */         state.is_Load_Ztype = true;
/*  371 */         sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */       }
/*  373 */       else if (loadpanel.c2.getState())
/*      */       {
/*      */ 
/*      */ 
/*  377 */         Complex tempc = new Complex(Double.valueOf(loadpanel.text1[0].getText()).doubleValue(), Double.valueOf(loadpanel.text2[0].getText()).doubleValue());
/*      */         
/*  379 */         double temp1 = Complex.Real(tempc);
/*  380 */         double temp2 = Complex.Imaginary(tempc);
/*      */         
/*      */ 
/*  383 */         if ((temp1 < 0.0D) && (temp2 != 0.0D)) {
/*  384 */           state.YL = new Complex(0.0D, temp2);
/*  385 */           state.ZL = new Complex(0.0D, -1.0D / temp2);
/*  386 */           loadpanel.setValue(state.YL, 0);
/*  387 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */         }
/*  389 */         else if ((temp1 <= 0.0D) && (temp2 == 0.0D)) {
/*  390 */           state.YL = new Complex(0.0D, 0.0D);
/*  391 */           state.ZL = new Complex(0.0D, -1.0E135D);
/*  392 */           loadpanel.setValue(state.YL, 0);
/*  393 */           state.IsLoadShort = false;state.IsLoadOpen = true;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */         }
/*  395 */         else if ((temp1 == 0.0D) && (temp2 < -1.0E130D)) {
/*  396 */           state.YL = new Complex(0.0D, -1.0E135D);
/*  397 */           state.ZL = new Complex(0.0D, 0.0D);
/*  398 */           loadpanel.setValue(state.YL, 0);
/*  399 */           state.IsLoadShort = true;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */         }
/*  401 */         else if ((temp1 == 0.0D) && (temp2 != 0.0D)) {
/*  402 */           state.YL = new Complex(0.0D, temp2);
/*  403 */           state.ZL = new Complex(0.0D, -1.0D / temp2);
/*  404 */           loadpanel.setValue(state.YL, 0);
/*  405 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */         }
/*      */         else {
/*  408 */           state.YL = new Complex(temp1, temp2);
/*  409 */           state.ZL = EMF.Inv(state.YL);
/*  410 */           loadpanel.setValue(state.YL, 0);
/*  411 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = true;
/*      */         }
/*  413 */         state.is_Load_Ztype = false;
/*  414 */         sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */       }
/*      */       
/*  417 */       state.ignition();
/*      */       
/*      */ 
/*  420 */       auxiliary5.repaint();
/*      */       
/*  422 */       mgpa.plotVoltageCurrent(state);
/*  423 */       mgpa.tgc3.setXpos(state.xpos);
/*  424 */       mgpa.tgc4.setXpos(state.xpos);
/*      */       
/*  426 */       mgpa.tgc3.repaint();
/*  427 */       mgpa.tgc4.repaint();
/*      */       
/*  429 */       mgpa.tgc3.setVisible(true);
/*  430 */       mgpa.tgc4.setVisible(true);
/*  431 */       mgpa.repaint();
/*      */       
/*  433 */       if (state.use_Zchart) {
/*  434 */         mgpb.plotImpedance(state);
/*      */       }
/*      */       else {
/*  437 */         mgpb.plotAdmittance(state);
/*      */       }
/*  439 */       mgpb.tgc1.setXpos(state.xpos);
/*  440 */       mgpb.tgc2.setXpos(state.xpos);
/*      */       
/*  442 */       mgpb.tgc1.repaint();
/*  443 */       mgpb.tgc2.repaint();
/*      */       
/*  445 */       mgpb.tgc1.setVisible(true);
/*  446 */       mgpb.tgc2.setVisible(true);
/*  447 */       mgpb.repaint();
/*      */       
/*  449 */       sp2.setGammaFlag(state.IsLargerThanOne);
/*      */       
/*  451 */       sp2.setxpos(state.xpos);
/*  452 */       if (loadpanel.c1.getState()) {
/*  453 */         sp2.setZin(state.Zin, state.Z0);
/*  454 */         sp2.setZL(state.ZL, state.Z0);
/*  455 */         sp2.sm.setGL(state.GammaL);
/*  456 */         sp2.setYin(state.Yin, state.Z0);
/*  457 */         state.is_Load_Ztype = true;
/*      */       }
/*  459 */       else if (loadpanel.c2.getState()) {
/*  460 */         sp2.setYin(state.Yin, state.Z0);
/*  461 */         sp2.setYL(state.YL, state.Z0);
/*  462 */         state.is_Load_Ztype = false;
/*      */       }
/*  464 */       else if (loadpanel.c3.getState()) {
/*  465 */         sp2.setZin(state.Zin, state.Z0);
/*  466 */         sp2.setZL(state.ZL, state.Z0);
/*  467 */         sp2.sm.setGL(state.GammaL);
/*  468 */         sp2.setYin(state.Yin, state.Z0);
/*  469 */         state.is_Load_Ztype = true;
/*      */       }
/*  471 */       auxiliary.repaint();
/*  472 */       auxiliary2.repaint();
/*  473 */       auxiliary3.repaint();
/*      */     }
/*  475 */     else if ((evt.getSource() == loadpanel.slider3) || (evt.getSource() == loadpanel.slider4))
/*      */     {
/*  477 */       if (loadpanel.c3.getState())
/*      */       {
/*  479 */         double temp1 = Double.valueOf(loadpanel.text1[1].getText()).doubleValue();
/*  480 */         double temp2 = Double.valueOf(loadpanel.text2[1].getText()).doubleValue();
/*      */         
/*      */ 
/*  483 */         if (temp1 < 0.0D) {
/*  484 */           state.GammaL = new Complex(0.0D, 0.0D);
/*  485 */           state.ZL = new Complex(state.Z0.Real(), 0.0D);
/*  486 */           state.YL = new Complex(1.0D / state.Z0.Real(), 0.0D);
/*  487 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = true;
/*      */         }
/*  489 */         else if ((temp1 == 1.0D) && (temp2 == 0.0D)) {
/*  490 */           state.YL = new Complex(0.0D, 0.0D);
/*  491 */           state.ZL = new Complex(0.0D, -1.0E135D);
/*      */           
/*  493 */           state.IsLoadShort = false;state.IsLoadOpen = true;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */         }
/*  495 */         else if ((temp1 == 1.0D) && ((temp2 > 179.9999D) || (temp2 < -179.9999D))) {
/*  496 */           state.YL = new Complex(0.0D, -1.0E135D);
/*  497 */           state.ZL = new Complex(0.0D, 0.0D);
/*      */           
/*  499 */           state.IsLoadShort = true;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */         }
/*  501 */         else if ((temp1 == 1.0D) && ((temp2 != 0.0D) || ((temp2 > -179.9999D) && (temp2 < 179.9999D))))
/*      */         {
/*  503 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */ 
/*      */         }
/*      */         else
/*      */         {
/*      */ 
/*  509 */           state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = true;
/*      */         }
/*  511 */         state.is_Load_Ztype = true;
/*  512 */         sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */       }
/*      */       
/*      */ 
/*  516 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*  517 */       state.ignition();
/*  518 */       sp2.setGammaFlag(state.IsLargerThanOne);
/*      */       
/*  520 */       sp2.setxpos(state.xpos);
/*  521 */       sp2.setZin(state.Zin, state.Z0);
/*  522 */       sp2.setZL(state.ZL, state.Z0);
/*      */       
/*  524 */       sp2.sm.setGL(state.GammaL);
/*  525 */       sp2.setYin(state.Yin, state.Z0);
/*      */       
/*  527 */       state.ignition();
/*      */       
/*  529 */       auxiliary5.repaint();
/*      */       
/*      */ 
/*  532 */       mgpa.plotVoltageCurrent(state);
/*  533 */       mgpa.tgc3.setXpos(state.xpos);
/*  534 */       mgpa.tgc4.setXpos(state.xpos);
/*      */       
/*  536 */       mgpa.tgc3.repaint();
/*  537 */       mgpa.tgc4.repaint();
/*      */       
/*  539 */       mgpa.tgc3.setVisible(true);
/*  540 */       mgpa.tgc4.setVisible(true);
/*  541 */       mgpa.repaint();
/*      */       
/*  543 */       if (state.use_Zchart) {
/*  544 */         mgpb.plotImpedance(state);
/*      */       }
/*      */       else {
/*  547 */         mgpb.plotAdmittance(state);
/*      */       }
/*  549 */       mgpb.tgc1.setXpos(state.xpos);
/*  550 */       mgpb.tgc2.setXpos(state.xpos);
/*      */       
/*  552 */       mgpb.tgc1.repaint();
/*  553 */       mgpb.tgc2.repaint();
/*      */       
/*  555 */       mgpb.tgc1.setVisible(true);
/*  556 */       mgpb.tgc2.setVisible(true);
/*  557 */       mgpb.repaint();
/*      */       
/*  559 */       auxiliary.repaint();
/*  560 */       auxiliary2.repaint();
/*  561 */       auxiliary3.repaint();
/*      */     }
/*      */     
/*  564 */     if (evt.getSource() == slidepanel.slider) {
/*  565 */       slidepanel.slider2.setValue(slidepanel.slider2.getMaximum());
/*  566 */       state.xpos = slidepanel.getValue();
/*  567 */       if (state.xpos == state.lineLength) {
/*  568 */         slidepanel.slider2.setEnabled(false);
/*      */       }
/*      */       else {
/*  571 */         slidepanel.slider2.setEnabled(true);
/*      */       }
/*  573 */       send_shock_wave();
/*  574 */       sp2.setZin(state.Zin, state.Z0);
/*  575 */       sp2.setYin(state.Yin, state.Z0);
/*      */       
/*  577 */       state.ignition();
/*  578 */       auxiliary5.repaint();
/*      */       
/*      */ 
/*  581 */       mgpa.plotVoltageCurrent(state);
/*  582 */       mgpa.tgc3.setXpos(state.xpos);
/*  583 */       mgpa.tgc4.setXpos(state.xpos);
/*      */       
/*  585 */       mgpa.tgc3.repaint();
/*  586 */       mgpa.tgc4.repaint();
/*      */       
/*  588 */       mgpa.tgc3.setVisible(true);
/*  589 */       mgpa.tgc4.setVisible(true);
/*  590 */       mgpa.repaint();
/*      */       
/*  592 */       if (state.use_Zchart) {
/*  593 */         mgpb.plotImpedance(state);
/*      */       }
/*      */       else {
/*  596 */         mgpb.plotAdmittance(state);
/*      */       }
/*  598 */       mgpb.tgc1.setXpos(state.xpos);
/*  599 */       mgpb.tgc2.setXpos(state.xpos);
/*      */       
/*  601 */       mgpb.tgc1.repaint();
/*  602 */       mgpb.tgc2.repaint();
/*      */       
/*  604 */       mgpb.tgc1.setVisible(true);
/*  605 */       mgpb.tgc2.setVisible(true);
/*  606 */       mgpb.repaint();
/*      */     }
/*      */     
/*      */ 
/*      */ 
/*  611 */     if (evt.getSource() == slidepanel.slider2)
/*      */     {
/*  613 */       if ((slidepanel.slider.getValue() == 0) && 
/*  614 */         (slidepanel.slider2.getValue() < slidepanel.SCROLLMAX2 - state.linecounter2)) {
/*  615 */         slidepanel.slider2.setValue(slidepanel.SCROLLMAX2 - state.linecounter2 - 1);
/*      */       }
/*      */       
/*  618 */       state.xpos = (slidepanel.getValue() + slidepanel.getValue2());
/*  619 */       send_shock_wave();
/*      */       
/*  621 */       sp2.setZin(state.Zin, state.Z0);
/*  622 */       sp2.setYin(state.Yin, state.Z0);
/*      */       
/*  624 */       state.ignition();
/*  625 */       auxiliary5.repaint();
/*      */       
/*      */ 
/*  628 */       mgpa.plotVoltageCurrent(state);
/*  629 */       mgpa.tgc3.setXpos(state.xpos);
/*  630 */       mgpa.tgc4.setXpos(state.xpos);
/*      */       
/*  632 */       mgpa.tgc3.repaint();
/*  633 */       mgpa.tgc4.repaint();
/*      */       
/*  635 */       mgpa.tgc3.setVisible(true);
/*  636 */       mgpa.tgc4.setVisible(true);
/*  637 */       mgpa.repaint();
/*      */       
/*  639 */       if (state.use_Zchart) {
/*  640 */         mgpb.plotImpedance(state);
/*      */       }
/*      */       else {
/*  643 */         mgpb.plotAdmittance(state);
/*      */       }
/*  645 */       mgpb.tgc1.setXpos(state.xpos);
/*  646 */       mgpb.tgc2.setXpos(state.xpos);
/*      */       
/*  648 */       mgpb.tgc1.repaint();
/*  649 */       mgpb.tgc2.repaint();
/*      */       
/*  651 */       mgpb.tgc1.setVisible(true);
/*  652 */       mgpb.tgc2.setVisible(true);
/*  653 */       mgpb.repaint();
/*      */     }
/*      */   }
/*      */   
/*      */ 
/*      */ 
/*      */   public void actionPerformed(java.awt.event.ActionEvent evt)
/*      */   {
/*  661 */     if (evt.getSource() == linepanel.b1) {
/*  662 */       state.IsLowLoss = true;
/*      */       
/*  664 */       double tempo1 = Complex.Real(linepanel.getValue(0));
/*  665 */       double tempo2 = Complex.Imaginary(linepanel.getValue(0));
/*      */       
/*      */ 
/*  668 */       if (tempo1 < 0.0D) {
/*  669 */         state.Z0 = new Complex(50.0D, 0.0D);
/*  670 */         linepanel.setValue(state.Z0, 0);
/*      */       }
/*      */       else {
/*  673 */         state.Z0 = linepanel.getValue(0);
/*      */       }
/*      */       
/*  676 */       state.xpos = 0.0D;
/*  677 */       state.ignition();
/*      */       
/*      */ 
/*  680 */       slidepanel.reset();
/*      */       
/*  682 */       sp2.setxpos(state.xpos);
/*  683 */       sp2.setalpha(state.alpha);
/*  684 */       if (state.is_Load_Ztype) {
/*  685 */         sp2.setZL(state.ZL, state.Z0);
/*      */         
/*  687 */         sp2.sm.setGL(state.GammaL);
/*      */       }
/*      */       else {
/*  690 */         sp2.setYL(state.YL, state.Z0);
/*      */       }
/*      */       
/*  693 */       sp2.setZin(state.Zin, state.Z0);
/*      */       
/*  695 */       sp2.setYin(state.Yin, state.Z0);
/*      */       
/*  697 */       auxiliary.repaint();
/*  698 */       auxiliary2.repaint();
/*  699 */       auxiliary3.repaint();
/*      */       
/*  701 */       doupdate();
/*      */       
/*  703 */       state.ignition();
/*  704 */       auxiliary5.repaint();
/*      */       
/*      */ 
/*  707 */       mgpa.plotVoltageCurrent(state);
/*  708 */       mgpa.tgc3.setXpos(state.xpos);
/*  709 */       mgpa.tgc4.setXpos(state.xpos);
/*      */       
/*  711 */       mgpa.tgc3.repaint();
/*  712 */       mgpa.tgc4.repaint();
/*      */       
/*  714 */       mgpa.tgc3.setVisible(true);
/*  715 */       mgpa.tgc4.setVisible(true);
/*  716 */       mgpa.repaint();
/*      */       
/*  718 */       if (state.use_Zchart) {
/*  719 */         mgpb.plotImpedance(state);
/*      */       }
/*      */       else {
/*  722 */         mgpb.plotAdmittance(state);
/*      */       }
/*  724 */       mgpb.tgc1.setXpos(state.xpos);
/*  725 */       mgpb.tgc2.setXpos(state.xpos);
/*      */       
/*  727 */       mgpb.tgc1.repaint();
/*  728 */       mgpb.tgc2.repaint();
/*      */       
/*  730 */       mgpb.tgc1.setVisible(true);
/*  731 */       mgpb.tgc2.setVisible(true);
/*  732 */       mgpb.repaint();
/*      */ 
/*      */ 
/*      */     }
/*  736 */     else if (evt.getSource() == loadpanel.b1)
/*      */     {
/*  738 */       doupdate();
/*  739 */       state.ignition();
/*  740 */       auxiliary5.repaint();
/*      */       
/*      */ 
/*  743 */       mgpa.plotVoltageCurrent(state);
/*  744 */       mgpa.tgc3.setXpos(state.xpos);
/*  745 */       mgpa.tgc4.setXpos(state.xpos);
/*      */       
/*  747 */       mgpa.tgc3.repaint();
/*  748 */       mgpa.tgc4.repaint();
/*      */       
/*  750 */       mgpa.tgc3.setVisible(true);
/*  751 */       mgpa.tgc4.setVisible(true);
/*  752 */       mgpa.repaint();
/*      */       
/*  754 */       if (state.use_Zchart) {
/*  755 */         mgpb.plotImpedance(state);
/*      */       }
/*      */       else {
/*  758 */         mgpb.plotAdmittance(state);
/*      */       }
/*  760 */       mgpb.tgc1.setXpos(state.xpos);
/*  761 */       mgpb.tgc2.setXpos(state.xpos);
/*      */       
/*  763 */       mgpb.tgc1.repaint();
/*  764 */       mgpb.tgc2.repaint();
/*      */       
/*  766 */       mgpb.tgc1.setVisible(true);
/*  767 */       mgpb.tgc2.setVisible(true);
/*  768 */       mgpb.repaint();
/*      */     }
/*      */     
/*  771 */     if (evt.getSource() == sp2.colore) {
/*  772 */       if (sp2.colore_dark) {
/*  773 */         sp2.colore_dark = false;
/*  774 */         sp2.sc.setColoreDark(false);
/*      */       }
/*      */       else {
/*  777 */         sp2.colore_dark = true;
/*  778 */         sp2.sc.setColoreDark(true);
/*      */       }
/*      */     }
/*      */   }
/*      */   
/*      */   public void itemStateChanged(ItemEvent evt) {
/*  784 */     java.awt.ItemSelectable ie = evt.getItemSelectable();
/*      */     
/*  786 */     if (evt.getSource() == sp2.large) {
/*  787 */       if (state.IsPlots) {
/*  788 */         state.IsPlots = false;
/*  789 */         auxiliary4.setVisible(false);
/*  790 */         auxiliary5.setVisible(false);
/*  791 */         mgpb.setVisible(false);
/*  792 */         mgpa.setVisible(false);
/*      */         
/*  794 */         pplota.setVisible(false);
/*  795 */         pplotb.setVisible(false);
/*  796 */         paux5.setVisible(false);
/*      */       }
/*      */       else {
/*  799 */         state.IsPlots = true;
/*  800 */         auxiliary4.setVisible(true);
/*  801 */         auxiliary5.setVisible(true);
/*  802 */         mgpb.setVisible(true);
/*  803 */         mgpa.setVisible(true);
/*      */         
/*  805 */         pplota.setVisible(true);
/*  806 */         pplotb.setVisible(true);
/*  807 */         paux5.setVisible(true);
/*      */       }
/*      */     }
/*      */     
/*  811 */     if (evt.getSource() == loadpanel.c1) {
/*  812 */       loadpanel.repaint();
/*      */     }
/*      */     
/*  815 */     if (evt.getSource() == loadpanel.c2) {
/*  816 */       loadpanel.repaint();
/*      */     }
/*      */     
/*  819 */     if (evt.getSource() == loadpanel.c3) {
/*  820 */       loadpanel.repaint();
/*      */     }
/*      */     
/*  823 */     if (evt.getSource() == sp2.scon.imp) {
/*  824 */       state.use_Zchart = true;
/*  825 */       state.ignition();
/*  826 */       auxiliary5.repaint();
/*      */       
/*      */ 
/*  829 */       mgpa.plotVoltageCurrent(state);
/*  830 */       mgpa.tgc3.setXpos(state.xpos);
/*  831 */       mgpa.tgc4.setXpos(state.xpos);
/*      */       
/*  833 */       mgpa.tgc3.repaint();
/*  834 */       mgpa.tgc4.repaint();
/*      */       
/*  836 */       mgpa.tgc3.setVisible(true);
/*  837 */       mgpa.tgc4.setVisible(true);
/*  838 */       mgpa.repaint();
/*      */       
/*  840 */       if (state.use_Zchart) {
/*  841 */         mgpb.plotImpedance(state);
/*      */       }
/*      */       else {
/*  844 */         mgpb.plotAdmittance(state);
/*      */       }
/*  846 */       mgpb.tgc1.setXpos(state.xpos);
/*  847 */       mgpb.tgc2.setXpos(state.xpos);
/*      */       
/*  849 */       mgpb.tgc1.repaint();
/*  850 */       mgpb.tgc2.repaint();
/*      */       
/*  852 */       mgpb.tgc1.setVisible(true);
/*  853 */       mgpb.tgc2.setVisible(true);
/*  854 */       mgpb.repaint();
/*      */     }
/*      */     
/*  857 */     if (evt.getSource() == sp2.scon.adm) {
/*  858 */       state.use_Zchart = false;
/*  859 */       state.ignition();
/*  860 */       auxiliary5.repaint();
/*      */       
/*      */ 
/*  863 */       mgpa.plotVoltageCurrent(state);
/*  864 */       mgpa.tgc3.setXpos(state.xpos);
/*  865 */       mgpa.tgc4.setXpos(state.xpos);
/*      */       
/*  867 */       mgpa.tgc3.repaint();
/*  868 */       mgpa.tgc4.repaint();
/*      */       
/*  870 */       mgpa.tgc3.setVisible(true);
/*  871 */       mgpa.tgc4.setVisible(true);
/*  872 */       mgpa.repaint();
/*      */       
/*  874 */       if (state.use_Zchart) {
/*  875 */         mgpb.plotImpedance(state);
/*      */       }
/*      */       else {
/*  878 */         mgpb.plotAdmittance(state);
/*      */       }
/*  880 */       mgpb.tgc1.setXpos(state.xpos);
/*  881 */       mgpb.tgc2.setXpos(state.xpos);
/*      */       
/*  883 */       mgpb.tgc1.repaint();
/*  884 */       mgpb.tgc2.repaint();
/*      */       
/*  886 */       mgpb.tgc1.setVisible(true);
/*  887 */       mgpb.tgc2.setVisible(true);
/*  888 */       mgpb.repaint();
/*      */     }
/*      */   }
/*      */   
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*  899 */   public void mouseDragged(MouseEvent evt) { move_1(); }
/*      */   public void mouseMoved(MouseEvent evt) {}
/*      */   public void mouseClicked(MouseEvent evt) {}
/*      */   public void mouseEntered(MouseEvent evt) {}
/*      */   public void mouseExited(MouseEvent evt) {}
/*  904 */   public void mousePressed(MouseEvent evt) { move_1(); }
/*      */   
/*      */   public void mouseReleased(MouseEvent evt) {}
/*      */   
/*      */   private void move_1()
/*      */   {
/*  910 */     Complex YOpen = new Complex(0.0D, 0.0D);
/*      */     
/*  912 */     sp2.sc.draw_ZL = true;
/*  913 */     sp2.sc.draw_Zin = true;
/*  914 */     sp2.sc.draw_Yin = true;
/*  915 */     Complex ZLnorm = new Complex(0.0D, 0.0D);
/*      */     
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*  921 */     state.GammaL = sp2.sc.getGammaProbe();
/*      */     
/*  923 */     if ((sp2.sc.xProbe == 518) && (sp2.sc.yProbe == 280)) {
/*  924 */       state.ZL = new Complex(0.0D, -1.0E135D);
/*  925 */       state.YL = new Complex(0.0D, 0.0D);
/*  926 */       state.GammaL = new Complex(1.0D, 0.0D);
/*  927 */       state.IsLoadOpen = true;
/*  928 */       state.IsLoadShort = false;
/*  929 */       state.IsLoadImaginary = false;
/*  930 */       state.IsLoadRegular = false;
/*  931 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */     }
/*  933 */     else if ((sp2.sc.xProbe == 42) && (sp2.sc.yProbe == 280)) {
/*  934 */       state.YL = new Complex(0.0D, -1.0E135D);
/*  935 */       state.ZL = new Complex(0.0D, 0.0D);
/*  936 */       state.GammaL = new Complex(-1.0D, 0.0D);
/*  937 */       state.IsLoadOpen = false;
/*  938 */       state.IsLoadShort = true;
/*  939 */       state.IsLoadImaginary = false;
/*  940 */       state.IsLoadRegular = false;
/*  941 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*  942 */       state.Gammain = EMF.computeGammaAt(state.GammaL, state.xpos);
/*      */     }
/*  944 */     else if ((sp2.sc.xProbe == 280) && (sp2.sc.yProbe == 42)) {
/*  945 */       state.ZL = new Complex(0.0D, state.Z0.Real());
/*  946 */       state.YL = new Complex(0.0D, -1.0D / state.Z0.Real());
/*  947 */       state.GammaL = new Complex(0.0D, 1.0D);
/*  948 */       state.IsLoadOpen = false;
/*  949 */       state.IsLoadShort = false;
/*  950 */       state.IsLoadImaginary = true;
/*  951 */       state.IsLoadRegular = false;
/*  952 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */     }
/*  954 */     else if ((sp2.sc.xProbe == 280) && (sp2.sc.yProbe == 518)) {
/*  955 */       state.ZL = new Complex(0.0D, -state.Z0.Real());
/*  956 */       state.YL = new Complex(0.0D, 1.0D / state.Z0.Real());
/*  957 */       state.GammaL = new Complex(0.0D, -1.0D);
/*  958 */       state.IsLoadOpen = false;
/*  959 */       state.IsLoadShort = false;
/*  960 */       state.IsLoadImaginary = true;
/*  961 */       state.IsLoadRegular = false;
/*  962 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */ 
/*      */     }
/*  965 */     else if (sp2.sc.IsInside) {
/*  966 */       if ((loadpanel.c1.getState()) || (loadpanel.c3.getState())) {
/*  967 */         ZLnorm = new Complex(sp2.sc.getZProbe().Real(), sp2.sc.getZProbe().Imaginary());
/*  968 */         state.ZL = Complex.Multiply(ZLnorm, state.Z0);
/*  969 */         state.YL = Complex.Divide(state.one, state.ZL);
/*  970 */         state.is_Load_Ztype = true;
/*      */       }
/*      */       else {
/*  973 */         Complex YLnorm = new Complex(sp2.sc.getYProbe().Real(), sp2.sc.getYProbe().Imaginary());
/*  974 */         state.YL = Complex.Divide(YLnorm, state.Z0);
/*  975 */         state.ZL = Complex.Divide(state.one, state.YL);
/*  976 */         state.is_Load_Ztype = false;
/*      */       }
/*  978 */       state.IsLoadOpen = false;
/*  979 */       state.IsLoadShort = false;
/*  980 */       state.IsLoadImaginary = false;
/*  981 */       state.IsLoadRegular = true;
/*  982 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */     }
/*      */     
/*      */ 
/*  986 */     state.ignition();
/*  987 */     auxiliary5.repaint();
/*      */     
/*      */ 
/*  990 */     mgpa.plotVoltageCurrent(state);
/*  991 */     mgpa.tgc3.setXpos(state.xpos);
/*  992 */     mgpa.tgc4.setXpos(state.xpos);
/*      */     
/*  994 */     mgpa.tgc3.repaint();
/*  995 */     mgpa.tgc4.repaint();
/*      */     
/*  997 */     mgpa.tgc3.setVisible(true);
/*  998 */     mgpa.tgc4.setVisible(true);
/*  999 */     mgpa.repaint();
/*      */     
/* 1001 */     if (state.use_Zchart) {
/* 1002 */       mgpb.plotImpedance(state);
/*      */     }
/*      */     else {
/* 1005 */       mgpb.plotAdmittance(state);
/*      */     }
/* 1007 */     mgpb.tgc1.setXpos(state.xpos);
/* 1008 */     mgpb.tgc2.setXpos(state.xpos);
/*      */     
/* 1010 */     mgpb.tgc1.repaint();
/* 1011 */     mgpb.tgc2.repaint();
/*      */     
/* 1013 */     mgpb.tgc1.setVisible(true);
/* 1014 */     mgpb.tgc2.setVisible(true);
/* 1015 */     mgpb.repaint();
/*      */     
/*      */ 
/*      */ 
/*      */ 
/* 1020 */     if (loadpanel.c1.getState())
/*      */     {
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/* 1033 */       if (state.IsLoadOpen) {
/* 1034 */         loadpanel.b1.setEnabled(false);
/* 1035 */         loadpanel.slider1.setEnabled(false);
/* 1036 */         loadpanel.locked_open = true;
/* 1037 */         loadpanel.locked_short = false;
/*      */       }
/*      */       else
/*      */       {
/* 1041 */         loadpanel.b1.setEnabled(true);
/* 1042 */         loadpanel.slider1.setEnabled(true);
/* 1043 */         loadpanel.locked_open = false;
/* 1044 */         loadpanel.locked_short = false;
/*      */       }
/*      */       
/* 1047 */       loadpanel.setValue(state.ZL, 0);
/* 1048 */       state.is_Load_Ztype = true;
/*      */       
/*      */ 
/*      */ 
/* 1052 */       loadpanel.lab1[0].setText("Z");
/* 1053 */       loadpanel.lab3[0].setText("[ ? ]");
/*      */ 
/*      */     }
/* 1056 */     else if (loadpanel.c2.getState())
/*      */     {
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/* 1069 */       if (state.IsLoadShort) {
/* 1070 */         loadpanel.b1.setEnabled(false);
/* 1071 */         loadpanel.slider1.setEnabled(false);
/* 1072 */         loadpanel.locked_open = false;
/* 1073 */         loadpanel.locked_short = true;
/*      */       }
/*      */       else {
/* 1076 */         loadpanel.b1.setEnabled(true);
/* 1077 */         loadpanel.slider1.setEnabled(true);
/* 1078 */         loadpanel.locked_open = false;
/* 1079 */         loadpanel.locked_short = false;
/*      */       }
/*      */       
/* 1082 */       loadpanel.setValue(state.YL, 0);
/* 1083 */       state.is_Load_Ztype = false;
/*      */       
/*      */ 
/*      */ 
/* 1087 */       loadpanel.lab1[0].setText("Y");
/* 1088 */       loadpanel.lab3[0].setText("[ S ]");
/*      */ 
/*      */     }
/* 1091 */     else if (loadpanel.c3.getState()) {
/* 1092 */       loadpanel.setValue(state.GammaL, 1);
/* 1093 */       state.is_Load_Ztype = true;
/*      */     }
/*      */     
/*      */ 
/* 1097 */     if ((loadpanel.c1.getState()) || (loadpanel.c3.getState())) {
/* 1098 */       Complex znorm = Complex.Divide(state.ZL, state.Z0);
/* 1099 */       if ((state.IsLoadRegular) || (state.IsLoadImaginary))
/*      */       {
/* 1101 */         if ((znorm.Real() >= 0.0D) && (znorm.Real() <= 1.0D)) {
/* 1102 */           loadpanel.slider1.setValue((int)(znorm.Real() * 500.0D));
/*      */         }
/* 1104 */         else if ((znorm.Real() > 1.0D) && (znorm.Real() <= 20.0D)) {
/* 1105 */           loadpanel.slider1.setValue(500 + (int)((znorm.Real() - 1.0D) * 500.0D));
/*      */         }
/* 1107 */         else if ((znorm.Real() > 20.0D) && (znorm.Real() <= 500.0D)) {
/* 1108 */           loadpanel.slider1.setValue((int)(znorm.Real() - 20.0D) + 10000);
/*      */         }
/*      */         
/*      */ 
/* 1112 */         if ((znorm.Imaginary() > 0.0D) && (znorm.Imaginary() <= 20.0D)) {
/* 1113 */           loadpanel.slider2.setValue((int)(znorm.Imaginary() * 250.0D) + 5481);
/*      */         }
/* 1115 */         else if ((znorm.Imaginary() > 20.0D) && (znorm.Imaginary() <= 500.0D)) {
/* 1116 */           loadpanel.slider2.setValue((int)(znorm.Imaginary() - 20.0D) + 10481);
/*      */         }
/* 1118 */         else if ((znorm.Imaginary() < 0.0D) && (znorm.Imaginary() >= -20.0D)) {
/* 1119 */           loadpanel.slider2.setValue(5481 + (int)(znorm.Imaginary() * 250.0D));
/*      */         }
/* 1121 */         else if ((znorm.Imaginary() < -20.0D) && (znorm.Imaginary() >= -500.0D)) {
/* 1122 */           loadpanel.slider2.setValue(481 + (int)(znorm.Imaginary() + 20.0D));
/*      */         }
/* 1124 */         else if (znorm.Imaginary() == 0.0D) {
/* 1125 */           loadpanel.slider2.setValue(5481);
/*      */         }
/* 1127 */         else if (znorm.Imaginary() == 500.0D) {
/* 1128 */           loadpanel.slider2.setValue(10963);
/*      */         }
/* 1130 */         else if (znorm.Imaginary() == -500.0D) {
/* 1131 */           loadpanel.slider2.setValue(0);
/*      */         }
/*      */         
/*      */ 
/* 1135 */         if (state.IsLoadRegular) {
/* 1136 */           loadpanel.slider3.setValue((int)(Complex.Magnitude(state.GammaL) * 1000.0D));
/* 1137 */           loadpanel.slider4.setValue((int)(MaestroA.rounder(Complex.Arg2(state.GammaL, 1), 6) * 10.0D) + 1800);
/*      */         }
/* 1139 */         else if (state.IsLoadImaginary) {
/* 1140 */           loadpanel.slider3.setValue(loadpanel.SCROLLMAXG1 - 1);
/* 1141 */           loadpanel.slider4.setValue((int)(MaestroA.rounder(Complex.Arg2(state.GammaL, 1), 6) * 10.0D) + 1800);
/*      */         }
/*      */         
/*      */       }
/* 1145 */       else if (state.IsLoadShort) {
/* 1146 */         loadpanel.slider1.setValue(0);
/* 1147 */         loadpanel.slider2.setValue(5481);
/* 1148 */         loadpanel.slider3.setValue(loadpanel.SCROLLMAXG1 - 1);
/* 1149 */         loadpanel.slider4.setValue(loadpanel.SCROLLMAXG2 - 1);
/*      */       }
/* 1151 */       else if (state.IsLoadOpen) {
/* 1152 */         loadpanel.slider1.setValue(0);
/* 1153 */         loadpanel.slider2.setValue(0);
/* 1154 */         loadpanel.slider3.setValue(loadpanel.SCROLLMAXG1 - 1);
/* 1155 */         loadpanel.slider4.setValue((loadpanel.SCROLLMAXG2 - 1) / 2);
/*      */       }
/*      */       
/*      */     }
/* 1159 */     else if (loadpanel.c2.getState()) {
/* 1160 */       Complex znorm = Complex.Multiply(state.YL, state.Z0);
/* 1161 */       if ((state.IsLoadRegular) || (state.IsLoadImaginary))
/*      */       {
/* 1163 */         if ((znorm.Real() >= 0.0D) && (znorm.Real() <= 1.0D)) {
/* 1164 */           loadpanel.slider1.setValue((int)(znorm.Real() * 500.0D));
/*      */         }
/* 1166 */         else if ((znorm.Real() > 1.0D) && (znorm.Real() <= 20.0D)) {
/* 1167 */           loadpanel.slider1.setValue(500 + (int)((znorm.Real() - 1.0D) * 500.0D));
/*      */         }
/* 1169 */         else if ((znorm.Real() > 20.0D) && (znorm.Real() <= 500.0D)) {
/* 1170 */           loadpanel.slider1.setValue((int)(znorm.Real() - 20.0D) + 10000);
/*      */         }
/*      */         
/*      */ 
/* 1174 */         if ((znorm.Imaginary() > 0.0D) && (znorm.Imaginary() <= 20.0D)) {
/* 1175 */           loadpanel.slider2.setValue((int)(znorm.Imaginary() * 250.0D) + 5481);
/*      */         }
/* 1177 */         else if ((znorm.Imaginary() > 20.0D) && (znorm.Imaginary() <= 500.0D)) {
/* 1178 */           loadpanel.slider2.setValue((int)(znorm.Imaginary() - 20.0D) + 10481);
/*      */         }
/* 1180 */         else if ((znorm.Imaginary() < 0.0D) && (znorm.Imaginary() >= -20.0D)) {
/* 1181 */           loadpanel.slider2.setValue(5481 + (int)(znorm.Imaginary() * 250.0D));
/*      */         }
/* 1183 */         else if ((znorm.Imaginary() < -20.0D) && (znorm.Imaginary() >= -500.0D)) {
/* 1184 */           loadpanel.slider2.setValue(481 + (int)(znorm.Imaginary() + 20.0D));
/*      */         }
/* 1186 */         else if (znorm.Imaginary() == 0.0D) {
/* 1187 */           loadpanel.slider2.setValue(5481);
/*      */         }
/* 1189 */         else if (znorm.Imaginary() == 500.0D) {
/* 1190 */           loadpanel.slider2.setValue(10963);
/*      */         }
/* 1192 */         else if (znorm.Imaginary() == -500.0D) {
/* 1193 */           loadpanel.slider2.setValue(0);
/*      */         }
/*      */         
/*      */       }
/* 1197 */       else if (state.IsLoadOpen) {
/* 1198 */         loadpanel.slider1.setValue(0);
/* 1199 */         loadpanel.slider2.setValue(5481);
/*      */       }
/* 1201 */       else if (state.IsLoadShort) {
/* 1202 */         loadpanel.slider1.setValue(0);
/* 1203 */         loadpanel.slider2.setValue(0);
/*      */       }
/* 1205 */       state.is_Load_Ztype = false;
/*      */     }
/* 1207 */     loadpanel.repaint();
/*      */     
/* 1209 */     state.ignition();
/* 1210 */     auxiliary5.repaint();
/*      */     
/*      */ 
/* 1213 */     mgpa.plotVoltageCurrent(state);
/* 1214 */     mgpa.tgc3.setXpos(state.xpos);
/* 1215 */     mgpa.tgc4.setXpos(state.xpos);
/*      */     
/* 1217 */     mgpa.tgc3.repaint();
/* 1218 */     mgpa.tgc4.repaint();
/*      */     
/* 1220 */     mgpa.tgc3.setVisible(true);
/* 1221 */     mgpa.tgc4.setVisible(true);
/* 1222 */     mgpa.repaint();
/*      */     
/* 1224 */     if (state.use_Zchart) {
/* 1225 */       mgpb.plotImpedance(state);
/*      */     }
/*      */     else {
/* 1228 */       mgpb.plotAdmittance(state);
/*      */     }
/* 1230 */     mgpb.tgc1.setXpos(state.xpos);
/* 1231 */     mgpb.tgc2.setXpos(state.xpos);
/*      */     
/* 1233 */     mgpb.tgc1.repaint();
/* 1234 */     mgpb.tgc2.repaint();
/*      */     
/* 1236 */     mgpb.tgc1.setVisible(true);
/* 1237 */     mgpb.tgc2.setVisible(true);
/* 1238 */     mgpb.repaint();
/*      */     
/*      */ 
/*      */ 
/*      */ 
/* 1243 */     sp2.setxpos(state.xpos);
/*      */     
/* 1245 */     if (loadpanel.c1.getState()) {
/* 1246 */       sp2.setZin(state.Zin, state.Z0);
/* 1247 */       sp2.setZL(state.ZL, state.Z0);
/* 1248 */       sp2.sm.setGL(state.GammaL);
/* 1249 */       sp2.setYin(state.Yin, state.Z0);
/*      */     }
/* 1251 */     else if (loadpanel.c2.getState()) {
/* 1252 */       sp2.setYin(state.Yin, state.Z0);
/* 1253 */       sp2.setYL(state.YL, state.Z0);
/* 1254 */       sp2.setZin(state.Zin, state.Z0);
/* 1255 */       sp2.sm.setGL(state.GammaL);
/*      */     }
/* 1257 */     else if (loadpanel.c3.getState()) {
/* 1258 */       sp2.setZin(state.Zin, state.Z0);
/* 1259 */       sp2.setZL(state.ZL, state.Z0);
/* 1260 */       sp2.setYin(state.Yin, state.Z0);
/* 1261 */       sp2.sm.setGL(state.GammaL);
/*      */     }
/*      */     
/* 1264 */     auxiliary.repaint();
/* 1265 */     auxiliary2.repaint();
/* 1266 */     auxiliary3.repaint();
/*      */   }
/*      */   
/*      */ 
/*      */   private void doupdate()
/*      */   {
/* 1272 */     if (loadpanel.c1.getState())
/*      */     {
/*      */ 
/*      */ 
/*      */ 
/* 1277 */       Complex tempc = new Complex(Double.valueOf(loadpanel.text1[0].getText()).doubleValue(), Double.valueOf(loadpanel.text2[0].getText()).doubleValue());
/*      */       
/* 1279 */       double temp1 = Complex.Real(tempc);
/* 1280 */       double temp2 = Complex.Imaginary(tempc);
/*      */       
/*      */ 
/* 1283 */       if ((temp1 < 0.0D) && (temp2 != 0.0D) && (temp2 > -1.0E135D)) {
/* 1284 */         state.ZL = new Complex(0.0D, temp2);
/* 1285 */         state.YL = new Complex(0.0D, -1.0D / temp2);
/* 1286 */         loadpanel.setValue(state.ZL, 0);
/* 1287 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */       }
/* 1289 */       else if ((temp1 <= 0.0D) && (temp2 == 0.0D)) {
/* 1290 */         state.ZL = new Complex(0.0D, 0.0D);
/* 1291 */         state.YL = new Complex(0.0D, -1.0E135D);
/* 1292 */         loadpanel.setValue(state.ZL, 0);
/* 1293 */         state.IsLoadShort = true;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */       }
/* 1295 */       else if ((temp1 == 0.0D) && (temp2 <= -1.0E135D)) {
/* 1296 */         state.ZL = new Complex(0.0D, -1.0E135D);
/* 1297 */         state.YL = new Complex(0.0D, 0.0D);
/* 1298 */         loadpanel.setValue(state.ZL, 0);
/* 1299 */         state.IsLoadShort = false;state.IsLoadOpen = true;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */       }
/* 1301 */       else if ((temp1 == 0.0D) && (temp2 != 0.0D) && (temp2 > -1.0E135D)) {
/* 1302 */         state.ZL = new Complex(0.0D, temp2);
/* 1303 */         state.YL = new Complex(0.0D, -1.0D / temp2);
/* 1304 */         loadpanel.setValue(state.ZL, 0);
/* 1305 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */       }
/*      */       else {
/* 1308 */         state.ZL = new Complex(temp1, temp2);
/* 1309 */         state.YL = EMF.Inv(state.ZL);
/* 1310 */         loadpanel.setValue(state.ZL, 0);
/* 1311 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = true;
/*      */       }
/* 1313 */       state.is_Load_Ztype = true;
/* 1314 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */       
/* 1316 */       Complex znorm = Complex.Divide(state.ZL, state.Z0);
/*      */       
/* 1318 */       if ((state.IsLoadRegular) || (state.IsLoadImaginary))
/*      */       {
/* 1320 */         if ((znorm.Real() > 0.0D) && (znorm.Real() <= 1.0D)) {
/* 1321 */           loadpanel.slider1.setValue((int)(znorm.Real() * 500.0D));
/*      */         }
/* 1323 */         else if ((znorm.Real() > 1.0D) && (znorm.Real() <= 20.0D)) {
/* 1324 */           loadpanel.slider1.setValue(500 + (int)((znorm.Real() - 1.0D) * 500.0D));
/*      */         }
/* 1326 */         else if ((znorm.Real() > 20.0D) && (znorm.Real() <= 500.0D)) {
/* 1327 */           loadpanel.slider1.setValue((int)(znorm.Real() - 20.0D) + 10000);
/*      */         }
/* 1329 */         else if (znorm.Real() == 0.0D) {
/* 1330 */           if (znorm.Imaginary() > -1.0E135D) {
/* 1331 */             loadpanel.slider1.setValue(0);
/*      */           }
/*      */           else {
/* 1334 */             loadpanel.slider1.setValue(0);
/* 1335 */             loadpanel.slider2.setValue(0);
/*      */           }
/*      */         }
/*      */         
/*      */ 
/* 1340 */         if ((znorm.Imaginary() > 0.0D) && (znorm.Imaginary() <= 20.0D)) {
/* 1341 */           loadpanel.slider2.setValue((int)(znorm.Imaginary() * 250.0D) + 5481);
/*      */         }
/* 1343 */         else if ((znorm.Imaginary() > 20.0D) && (znorm.Imaginary() <= 500.0D)) {
/* 1344 */           loadpanel.slider2.setValue((int)(znorm.Imaginary() - 20.0D) + 10481);
/*      */         }
/* 1346 */         else if ((znorm.Imaginary() < 0.0D) && (znorm.Imaginary() >= -20.0D)) {
/* 1347 */           loadpanel.slider2.setValue(5481 + (int)(znorm.Imaginary() * 250.0D));
/*      */         }
/* 1349 */         else if ((znorm.Imaginary() < -20.0D) && (znorm.Imaginary() >= -500.0D)) {
/* 1350 */           loadpanel.slider2.setValue(481 + (int)(znorm.Imaginary() + 20.0D));
/*      */         }
/* 1352 */         else if (znorm.Imaginary() == 0.0D) {
/* 1353 */           loadpanel.slider2.setValue(5481);
/*      */         }
/* 1355 */         else if (znorm.Imaginary() == 500.0D) {
/* 1356 */           loadpanel.slider2.setValue(10963);
/*      */         }
/* 1358 */         else if (znorm.Imaginary() == -500.0D) {
/* 1359 */           loadpanel.slider2.setValue(0);
/*      */         }
/*      */       }
/* 1362 */       else if (state.IsLoadShort) {
/* 1363 */         loadpanel.slider1.setValue(0);
/* 1364 */         loadpanel.slider2.setValue(5481);
/*      */       }
/* 1366 */       else if (state.IsLoadOpen) {
/* 1367 */         loadpanel.slider1.setValue(0);
/* 1368 */         loadpanel.slider2.setValue(0);
/*      */       }
/*      */       
/*      */     }
/* 1372 */     else if (loadpanel.c2.getState())
/*      */     {
/*      */ 
/*      */ 
/*      */ 
/* 1377 */       Complex tempc = new Complex(Double.valueOf(loadpanel.text1[0].getText()).doubleValue(), Double.valueOf(loadpanel.text2[0].getText()).doubleValue());
/*      */       
/* 1379 */       double temp1 = Complex.Real(tempc);
/* 1380 */       double temp2 = Complex.Imaginary(tempc);
/*      */       
/*      */ 
/* 1383 */       if ((temp1 < 0.0D) && (temp2 != 0.0D) && (temp2 > -1.0E135D)) {
/* 1384 */         state.YL = new Complex(0.0D, temp2);
/* 1385 */         state.ZL = new Complex(0.0D, -1.0D / temp2);
/* 1386 */         loadpanel.setValue(state.YL, 0);
/* 1387 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */       }
/* 1389 */       else if ((temp1 <= 0.0D) && (temp2 == 0.0D)) {
/* 1390 */         state.YL = new Complex(0.0D, 0.0D);
/* 1391 */         state.ZL = new Complex(0.0D, -1.0E135D);
/* 1392 */         loadpanel.setValue(state.YL, 0);
/* 1393 */         state.IsLoadShort = false;state.IsLoadOpen = true;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */       }
/* 1395 */       else if ((temp1 == 0.0D) && (temp2 <= -1.0E135D)) {
/* 1396 */         state.YL = new Complex(0.0D, -1.0E135D);
/* 1397 */         state.ZL = new Complex(0.0D, 0.0D);
/* 1398 */         loadpanel.setValue(state.YL, 0);
/* 1399 */         state.IsLoadShort = true;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */       }
/* 1401 */       else if ((temp1 == 0.0D) && (temp2 != 0.0D) && (temp2 > -1.0E135D)) {
/* 1402 */         state.YL = new Complex(0.0D, temp2);
/* 1403 */         state.ZL = new Complex(0.0D, -1.0D / temp2);
/* 1404 */         loadpanel.setValue(state.YL, 0);
/* 1405 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */       }
/*      */       else {
/* 1408 */         state.YL = new Complex(temp1, temp2);
/* 1409 */         state.ZL = EMF.Inv(state.YL);
/* 1410 */         loadpanel.setValue(state.YL, 0);
/* 1411 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = true;
/*      */       }
/* 1413 */       state.is_Load_Ztype = false;
/* 1414 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */       
/* 1416 */       Complex znorm = Complex.Multiply(state.YL, state.Z0);
/* 1417 */       if ((state.IsLoadRegular) || (state.IsLoadImaginary))
/*      */       {
/* 1419 */         if ((znorm.Real() > 0.0D) && (znorm.Real() <= 1.0D)) {
/* 1420 */           loadpanel.slider1.setValue((int)(znorm.Real() * 500.0D));
/*      */         }
/* 1422 */         else if ((znorm.Real() > 1.0D) && (znorm.Real() <= 20.0D)) {
/* 1423 */           loadpanel.slider1.setValue(500 + (int)((znorm.Real() - 1.0D) * 500.0D));
/*      */         }
/* 1425 */         else if ((znorm.Real() > 20.0D) && (znorm.Real() <= 500.0D)) {
/* 1426 */           loadpanel.slider1.setValue((int)(znorm.Real() - 20.0D) + 10000);
/*      */         }
/* 1428 */         else if (znorm.Real() == 0.0D) {
/* 1429 */           if (znorm.Imaginary() > -1.0E135D) {
/* 1430 */             loadpanel.slider1.setValue(0);
/*      */           }
/*      */           else {
/* 1433 */             loadpanel.slider1.setValue(0);
/* 1434 */             loadpanel.slider2.setValue(0);
/*      */           }
/*      */         }
/*      */         
/*      */ 
/* 1439 */         if ((znorm.Imaginary() > 0.0D) && (znorm.Imaginary() <= 20.0D)) {
/* 1440 */           loadpanel.slider2.setValue((int)(znorm.Imaginary() * 250.0D) + 5481);
/*      */         }
/* 1442 */         else if ((znorm.Imaginary() > 20.0D) && (znorm.Imaginary() <= 500.0D)) {
/* 1443 */           loadpanel.slider2.setValue((int)(znorm.Imaginary() - 20.0D) + 10481);
/*      */         }
/* 1445 */         else if ((znorm.Imaginary() < 0.0D) && (znorm.Imaginary() >= -20.0D)) {
/* 1446 */           loadpanel.slider2.setValue(5481 + (int)(znorm.Imaginary() * 250.0D));
/*      */         }
/* 1448 */         else if ((znorm.Imaginary() < -20.0D) && (znorm.Imaginary() >= -500.0D)) {
/* 1449 */           loadpanel.slider2.setValue(481 + (int)(znorm.Imaginary() + 20.0D));
/*      */         }
/* 1451 */         else if (znorm.Imaginary() == 0.0D) {
/* 1452 */           loadpanel.slider2.setValue(5481);
/*      */         }
/* 1454 */         else if (znorm.Imaginary() == 500.0D) {
/* 1455 */           loadpanel.slider2.setValue(10963);
/*      */         }
/* 1457 */         else if (znorm.Imaginary() == -500.0D) {
/* 1458 */           loadpanel.slider2.setValue(0);
/*      */         }
/*      */         
/*      */       }
/* 1462 */       else if (state.IsLoadOpen) {
/* 1463 */         loadpanel.slider1.setValue(0);
/* 1464 */         loadpanel.slider2.setValue(5481);
/*      */       }
/* 1466 */       else if (state.IsLoadShort) {
/* 1467 */         loadpanel.slider1.setValue(0);
/* 1468 */         loadpanel.slider2.setValue(0);
/*      */       }
/*      */       
/*      */ 
/*      */     }
/* 1473 */     else if (loadpanel.c3.getState())
/*      */     {
/* 1475 */       double temp1 = Double.valueOf(loadpanel.text1[1].getText()).doubleValue();
/* 1476 */       double temp2 = Double.valueOf(loadpanel.text2[1].getText()).doubleValue();
/*      */       
/*      */ 
/* 1479 */       if (temp1 < 0.0D) {
/* 1480 */         state.GammaL = new Complex(0.0D, 0.0D);
/* 1481 */         state.ZL = new Complex(state.Z0.Real(), 0.0D);
/* 1482 */         state.YL = new Complex(1.0D / state.Z0.Real(), 0.0D);
/* 1483 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = true;
/*      */       }
/* 1485 */       else if ((temp1 == 1.0D) && (temp2 == 0.0D)) {
/* 1486 */         state.GammaL = new Complex(1.0D, 0.0D);
/* 1487 */         state.YL = new Complex(0.0D, 0.0D);
/* 1488 */         state.ZL = new Complex(0.0D, -1.0E135D);
/*      */         
/* 1490 */         state.IsLoadShort = false;state.IsLoadOpen = true;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */       }
/* 1492 */       else if ((temp1 == 1.0D) && ((temp2 > 179.9999D) || (temp2 < -179.9999D))) {
/* 1493 */         state.GammaL = new Complex(-1.0D, 0.0D);
/* 1494 */         state.YL = new Complex(0.0D, -1.0E135D);
/* 1495 */         state.ZL = new Complex(0.0D, 0.0D);
/*      */         
/* 1497 */         state.IsLoadShort = true;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = false;
/*      */       }
/* 1499 */       else if ((temp1 == 1.0D) && ((temp2 != 0.0D) || ((temp2 > -179.9999D) && (temp2 < 179.9999D)))) {
/* 1500 */         state.GammaL = new Complex(Math.cos(temp2 * 3.141592653589793D / 180.0D), Math.sin(temp2 * 3.141592653589793D / 180.0D));
/* 1501 */         state.ZL = new Complex(0.0D, EMF.computeZinAt(state.GammaL, Complex.Real(state.Z0), 0.0D, true).Imaginary());
/* 1502 */         state.YL = new Complex(0.0D, EMF.computeYinAt(state.GammaL, Complex.Real(state.Z0), 0.0D, true).Imaginary());
/*      */         
/* 1504 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = true;state.IsLoadRegular = false;
/*      */       }
/*      */       else {
/* 1507 */         state.GammaL = (state.GammaL = new Complex(temp1 * Math.cos(temp2 * 3.141592653589793D / 180.0D), temp1 * Math.sin(temp2 * 3.141592653589793D / 180.0D)));
/* 1508 */         state.ZL = EMF.computeZinAt(state.GammaL, Complex.Real(state.Z0), 0.0D, true);
/* 1509 */         state.YL = EMF.computeYinAt(state.GammaL, Complex.Real(state.Z0), 0.0D, true);
/*      */         
/* 1511 */         state.IsLoadShort = false;state.IsLoadOpen = false;state.IsLoadImaginary = false;state.IsLoadRegular = true;
/*      */       }
/*      */       
/* 1514 */       state.is_Load_Ztype = true;
/* 1515 */       sp2.setLoadType(state.IsLoadOpen, state.IsLoadShort, state.IsLoadImaginary, state.IsLoadRegular);
/*      */       
/* 1517 */       if ((state.IsLoadRegular) || (state.IsLoadImaginary)) {
/* 1518 */         if (state.IsLoadImaginary) {
/* 1519 */           loadpanel.slider3.setValue(loadpanel.SCROLLMAXG1 - 1);
/*      */         }
/*      */         else {
/* 1522 */           loadpanel.slider3.setValue((int)(Complex.Magnitude(state.GammaL) * 1000.0D));
/*      */         }
/* 1524 */         loadpanel.slider4.setValue((int)(MaestroA.rounder(Complex.Arg2(state.GammaL, 1), 6) * 10.0D) + 1800);
/*      */       }
/* 1526 */       else if (state.IsLoadShort) {
/* 1527 */         loadpanel.slider3.setValue(loadpanel.SCROLLMAXG1 - 1);
/* 1528 */         loadpanel.slider4.setValue(loadpanel.SCROLLMAXG2 - 1);
/*      */       }
/* 1530 */       else if (state.IsLoadOpen) {
/* 1531 */         loadpanel.slider3.setValue(loadpanel.SCROLLMAXG1 - 1);
/* 1532 */         loadpanel.slider4.setValue((loadpanel.SCROLLMAXG2 - 1) / 2);
/*      */       }
/*      */     }
/* 1535 */     state.ignition();
/* 1536 */     loadpanel.repaint();
/*      */     
/* 1538 */     sp2.setGammaFlag(state.IsLargerThanOne);
/*      */     
/* 1540 */     sp2.setxpos(state.xpos);
/* 1541 */     if (loadpanel.c1.getState()) {
/* 1542 */       sp2.setZin(state.Zin, state.Z0);
/* 1543 */       sp2.setZL(state.ZL, state.Z0);
/* 1544 */       sp2.sm.setGL(state.GammaL);
/* 1545 */       sp2.setYin(state.Yin, state.Z0);
/* 1546 */       state.is_Load_Ztype = true;
/*      */     }
/* 1548 */     else if (loadpanel.c2.getState()) {
/* 1549 */       sp2.setYin(state.Yin, state.Z0);
/* 1550 */       sp2.setYL(state.YL, state.Z0);
/* 1551 */       state.is_Load_Ztype = false;
/*      */     }
/* 1553 */     else if (loadpanel.c3.getState()) {
/* 1554 */       sp2.setZin(state.Zin, state.Z0);
/* 1555 */       sp2.setZL(state.ZL, state.Z0);
/* 1556 */       sp2.sm.setGL(state.GammaL);
/* 1557 */       sp2.setYin(state.Yin, state.Z0);
/* 1558 */       state.is_Load_Ztype = true;
/*      */     }
/*      */     
/* 1561 */     auxiliary.repaint();
/* 1562 */     auxiliary2.repaint();
/* 1563 */     auxiliary3.repaint();
/*      */   }
/*      */   
/*      */   private void send_shock_wave() {
/* 1567 */     state.ignition();
/*      */     
/* 1569 */     sp2.setxpos(state.xpos);
/* 1570 */     sp2.setZin(state.Zin, state.Z0);
/*      */     
/* 1572 */     state.ignition();
/*      */   }
/*      */ }

/* Location:           C:\Users\GENĒ\JAVA\smithchart20033\ImportedClasses
 * Qualified Name:     Chart
 * Java Class Version: 7 (51.0)
 * JD-Core Version:    0.7.1
 */
