0fca_gabriele/gui.pde
/* =========================================================
 * ====                   WARNING                        ===
 * =========================================================
 * The code in this tab has been generated from the GUI form
 * designer and care should be taken when editing this file.
 * Only add/edit code inside the event handlers i.e. only
 * use lines between the matching comment tags. e.g.

 void myBtnEvents(GButton button) { //_CODE_:button1:12356:
     // It is safe to enter your event code here  
 } //_CODE_:button1:12356:
 
 * Do not rename this tab!
 * =========================================================
 */

public void typeCbx_clickEvt(GDropList source, GEvent event) { //_CODE_:typeCbx:342525:
  sinePlotChckbx.setEnabled(typeCbx.getSelectedIndex() == 0 ? true : false );
} //_CODE_:typeCbx:342525:

public void checkbox1_clicked1(GCheckbox source, GEvent event) { //_CODE_:sinePlotChckbx:934500:
  if(source.isSelected()){
    amplifier = 5f;
  }else{
    amplifier = 1f;
  }
} //_CODE_:sinePlotChckbx:934500:

public void windowTypeCbx_click1(GDropList source, GEvent event) { //_CODE_:windowTypCbx:878703:
  Field[] fs = FFT.class.getFields();
  
  for(Field f : fs){
      if(f.getName().contains(windowTypCbx.getSelectedText())){
        try{
          fftLin.window((WindowFunction)f.get(null));
        }catch(IllegalAccessException e){
          e.printStackTrace();
        }
      }
  }
} //_CODE_:windowTypCbx:878703:

public void workPanel_Click(GPanel source, GEvent event) { //_CODE_:workPanel:787303:
  //println("panel1 - GPanel >> GEvent." + event + " @ " + millis());
} //_CODE_:workPanel:787303:



// Create all the GUI controls. 
// autogenerated do not edit
public void createGUI(){
  G4P.messagesEnabled(true);
  G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
  G4P.setCursor(ARROW);
  surface.setTitle("Natalie");
  typeCbx = new GDropList(this, 419, 76, 192, 80, 3);
  typeCbx.setItems(loadStrings("list_342525"), 0);
  typeCbx.setLocalColorScheme(GCScheme.CYAN_SCHEME);
  typeCbx.addEventHandler(this, "typeCbx_clickEvt");
  sinePlotChckbx = new GCheckbox(this, 422, 38, 135, 23);
  sinePlotChckbx.setIconAlign(GAlign.LEFT, GAlign.MIDDLE);
  sinePlotChckbx.setText("Standard spectrum plot");
  sinePlotChckbx.setLocalColorScheme(GCScheme.CYAN_SCHEME);
  sinePlotChckbx.setOpaque(false);
  sinePlotChckbx.addEventHandler(this, "checkbox1_clicked1");
  sinePlotChckbx.setSelected(true);
  windowTypCbx = new GDropList(this, 422, 167, 132, 80, 3);
  windowTypCbx.setItems(loadStrings("list_878703"), 0);
  windowTypCbx.setLocalColorScheme(GCScheme.CYAN_SCHEME);
  windowTypCbx.addEventHandler(this, "windowTypeCbx_click1");
  workPanel = new GPanel(this, 365, 0, 334, 180, "Control panel");
  workPanel.setCollapsible(false);
  workPanel.setText("Control panel");
  workPanel.setLocalColorScheme(GCScheme.CYAN_SCHEME);
  workPanel.setOpaque(false);
  workPanel.addEventHandler(this, "workPanel_Click");
}

// Variable declarations 
// autogenerated do not edit
GDropList typeCbx; 
GCheckbox sinePlotChckbx; 
GDropList windowTypCbx; 
GPanel workPanel; 
