addWidget(kitPane,new PatchNameWidget(" Name", patch, ((Driver) patch.getDriver()).getPatchNameSize()),1,1,2,1,0);
addWidget(kitPane,new PatchNameWidget(" Name", patch),1,1,2,1,0);
 public BossDR660DrumkitEditor(Patch patch)  {    super ("Boss DR660 Drumkit Editor",patch);  JPanel kitPane=new JPanel();  kitPane.setLayout(new GridBagLayout());gbc.weightx=1;  addWidget(kitPane,new PatchNameWidget(" Name", patch, ((Driver) patch.getDriver()).getPatchNameSize()),1,1,2,1,0);  addWidget(kitPane,new ComboBoxWidget("Sense Curve A",patch,new ParamModel(patch,0x554),new BankSender(0),new String []      			{"Exp1","Lin1","Exp2","Lin2","XfdO","XfdI","Fix1","Fix2"}),1,2,1,1,1);  addWidget(kitPane,new ComboBoxWidget("Sense Curve B",patch,new ParamModel(patch,0x555),new BankSender(1),new String []      			{"Exp1","Lin1","Exp2","Lin2","XfdO","XfdI","Fix1","Fix2"}),1,3,1,1,2);  addWidget(kitPane,new CheckBoxWidget("Bank Layer",patch,new ParamModel(patch,0x556),new BankSender(2)),1,4,1,1,-1);  gbc.gridx=0;gbc.gridy=0;gbc.gridwidth=3;gbc.gridheight=4;  kitPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"DrumKit Settings",TitledBorder.CENTER,TitledBorder.CENTER));  scrollPane.add(kitPane,gbc);/*  FIXME: Changing FX thru Sysex don't seem to affect the sound, only display on the DR  JPanel fxPane=new JPanel();  fxPane.setLayout(new GridBagLayout());gbc.weightx=1;  addWidget(fxPane,new ComboBoxWidget("Effect Type",patch,new ParamModel(patch,0x53C),new FXSender(0),new String []      			{"Hall","Room","Plate","Delay","Pan-Delay"}),1,1,2,1,3);  addWidget(fxPane,new ScrollBarWidget("  Reverb Time",patch,0,31,0,new ParamModel(patch,0x53D),new FXSender(1)),1,2,3,1,4);  gbc.gridx=0;gbc.gridy=4;gbc.gridwidth=3;gbc.gridheight=4;  fxPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"Effects Settings",TitledBorder.CENTER,TitledBorder.CENTER));  scrollPane.add(fxPane,gbc);  */  JPanel padPane=new JPanel();  padPane.setLayout(new GridBagLayout());gbc.weightx=1;  final JComboBox cb=new JComboBox(padList);  padPane.add(cb);  cb.addActionListener (new ActionListener() {    public void actionPerformed(ActionEvent e)   {drum=cb.getSelectedIndex();   SysexWidget w;   for (int i=0; i<widgetList.size();i++)   {w= ((SysexWidget)widgetList.get(i));    w.setValue();       // Now w.setValue() does the following job.       /*	 if (w instanceof ScrollBarWidget) ((ScrollBarWidget)w).slider.setValue(w.getValue());	 if (w instanceof ScrollBarLookupWidget) ((ScrollBarLookupWidget)w).slider.setValue(w.getValue());         if (w instanceof ComboBoxWidget) ((ComboBoxWidget)w).cb.setSelectedIndex(w.getValue());         if (w instanceof CheckBoxWidget) ((CheckBoxWidget)w).cb.setSelected((w.getValue()>0));       */   }   }}  );  gbc.gridx=4;gbc.gridy=0;gbc.gridwidth=3;gbc.gridheight=2;  padPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"Choose a Pad",TitledBorder.CENTER,TitledBorder.CENTER));  scrollPane.add(padPane,gbc);  JPanel drumPane=new JPanel();  drumPane.setLayout(new GridBagLayout());gbc.weightx=1;  addWidget(drumPane,new ComboBoxWidget("Instrument",patch,new WaveModel(patch,9),new WaveSender(),waveNameList),1,1,2,1,3);  addWidget(drumPane,new ScrollBarWidget("Level",patch,0,15,0,new DrumModel(patch,11),new DrumSender(2)),1,2,3,1,4);  addWidget(drumPane,new ScrollBarWidget("Nuance",patch,0,15,-7,new DrumModel(patch,12),new DrumSender(3)),1,3,3,1,5);  addWidget(drumPane,new ScrollBarWidget("Pitch",patch,0,512,-240,new PitchModel(patch,13),new PitchSender()),1,4,3,1,6);  addWidget(drumPane,new ScrollBarWidget("Decay",patch,0,62,-31,new DrumModel(patch,15),new DrumSender(6)),1,5,3,1,7);  addWidget(drumPane,new ScrollBarLookupWidget("Pan",patch,0,15,new DrumModel(patch,16),new DrumSender(7),    new String [] {"L7","L6","L5","L4","L3","L2","L1","C","R1","R2","R3","R4","R5","R6","R7","Indiv"}),1,6,3,1,8);  addWidget(drumPane,new CheckBoxWidget("Poly Mode",patch,new DrumModel(patch,17+drum*24),new DrumSender(8)),1,7,1,1,-2);  addWidget(drumPane,new ComboBoxWidget("Assign Group",patch,new DrumModel(patch,18),new DrumSender(9),new String []      			{"Off","Exc1","Exc2","Exc3","Exc4","Exc5","Exc6","Exc7"}),2,7,2,1,9);  addWidget(drumPane,new ScrollBarWidget("Reverb Send",patch,0,15,0,new DrumModel(patch,19),new DrumSender(10)),1,8,3,1,10);  addWidget(drumPane,new ScrollBarWidget("Chorus Send",patch,0,15,0,new DrumModel(patch,20),new DrumSender(11)),1,9,3,1,11);  addWidget(drumPane,new ScrollBarWidget("Midi Note",patch,27,81,0,new NoteModel(patch,0x4FA),new NoteSender()),1,10,3,1,12);  gbc.gridx=4;gbc.gridy=2;gbc.gridwidth=3;gbc.gridheight=4;  drumPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"Drum Setting",TitledBorder.CENTER,TitledBorder.CENTER));  scrollPane.add(drumPane,gbc);   pack();   show();  }