addWidget(cmnPane,new PatchNameWidget("Name (20 Char.)", patch, ((Driver) patch.getDriver()).getPatchNameSize()), 0, 1,6, 1, 0);
addWidget(cmnPane,new PatchNameWidget("Name (20 Char.)", patch), 0, 1,6, 1, 0);
	protected void buildEditor(Patch patch)	{		PatchEdit.showWaitDialog();	// Because it needs some time to build up the editor frame		JPanel cmnPane = new JPanel();		cmnPane.setLayout(new GridBagLayout());gbc.weightx=1;gbc.anchor=GridBagConstraints.EAST;		gbc.gridx=0;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		addWidget(cmnPane,new PatchNameWidget("Name (20 Char.)", patch, ((Driver) patch.getDriver()).getPatchNameSize()), 0, 1,6, 1, 0);		gbc.gridx=0;gbc.gridy=2;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		addWidget(cmnPane,new ComboBoxWidget("Voice Number - A"	   ,patch,new ParamModel(patch,16+ 1),new PerformanceSender( 1),VoiceName)     ,0, 3,4,1, 2);		addWidget(cmnPane,new ComboBoxWidget("Voice Number - B"	   ,patch,new ParamModel(patch,16+ 2),new PerformanceSender( 2),VoiceName)     ,4, 3,4,1, 3);		gbc.gridx=0;gbc.gridy=4;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		addWidget(cmnPane,new ComboBoxWidget("Total Volume"	   ,patch,new ParamModel(patch,16+16),new PerformanceSender(16),VolumeName)    ,0, 5,4,1, 4);		addWidget(cmnPane,new ComboBoxWidget("Balance"		   ,patch,new ParamModel(patch,16+15),new PerformanceSender(15),BalanceName)   ,4, 5,4,1, 5);		addWidget(cmnPane,new ComboBoxWidget("Dual Detune Depth"   ,patch,new ParamModel(patch,16+ 6),new PerformanceSender( 6),DetuneName)    ,8, 5,4,1, 6);		gbc.gridx=0;gbc.gridy=6;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		addWidget(cmnPane,new ComboBoxWidget("Voice Mode"	   ,patch,new ParamModel(patch,16+ 0),new PerformanceSender( 0),VoiceModeName) ,0, 7,4,1, 7);		addWidget(cmnPane,new ComboBoxWidget("Split Point"	   ,patch,new ParamModel(patch,16+ 7),new PerformanceSender( 7),NoteKeyName)   ,4, 7,4,1, 8);		addWidget(cmnPane,new ComboBoxWidget("EG Forced Damp"	   ,patch,new ParamModel(patch,16+ 8),new PerformanceSender( 8),OnOffName)     ,8, 7,4,1, 9);		gbc.gridx=0;gbc.gridy=8;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		gbc.gridx=0;gbc.gridy=9;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel("Note Shift Range for:"),gbc);		addWidget(cmnPane,new ComboBoxWidget("Channel A (SemiTones)",patch,new ParamModel(patch,16+13),new PerformanceSender(13),NoteShiftName) ,0,10,4,1,10);		addWidget(cmnPane,new ComboBoxWidget("Channel B (SemiTones)",patch,new ParamModel(patch,16+14),new PerformanceSender(14),NoteShiftName) ,4,10,4,1,11);		gbc.gridx=0;gbc.gridy=11;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		gbc.gridx=0;gbc.gridy=12;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel("Footswitch Controllers:"),gbc);		addWidget(cmnPane,new ComboBoxWidget("Sustain / FS 1 (A - B)",patch,new ParamModel(patch,16+ 9),new PerformanceSender( 9),FSOnOffName)	 ,0,13,4,1,12);		addWidget(cmnPane,new ComboBoxWidget("FS 2 (A - B)"	   ,patch,new ParamModel(patch,16+11),new PerformanceSender(11),FSOnOffName)   ,0,14,4,1,13);		addWidget(cmnPane,new ComboBoxWidget("FS 2 Assign"	   ,patch,new ParamModel(patch,16+10),new PerformanceSender(10),FSAssignName)  ,4,14,4,1,14);		addWidget(cmnPane,new ComboBoxWidget("Soft Pedal Range"	   ,patch,new ParamModel(patch,16+12),new PerformanceSender(12),DetuneName)    ,8,14,4,1,15);		gbc.gridx=0;gbc.gridy=15;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		gbc.gridx=0;gbc.gridy=16;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel("Continuous Slider:"),gbc);		addWidget(cmnPane,new ComboBoxWidget("CS Assign (A - B)"   ,patch,new ParamModel(patch,16+19),new PerformanceSender(19),CSAssignName)  ,0,17,4,1,16);		addWidget(cmnPane,new ComboBoxWidget("CS 1"		   ,patch,new ParamModel(patch,16+17),new PerformanceSender(17),CSParaName)    ,0,18,4,1,17);		addWidget(cmnPane,new ComboBoxWidget("CS 2"		   ,patch,new ParamModel(patch,16+18),new PerformanceSender(18),CSParaName)    ,4,18,4,1,18);		gbc.gridx=0;gbc.gridy=19;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		gbc.gridx=0;gbc.gridy=20;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel("Micro Tuning:"),gbc);		addWidget(cmnPane,new ComboBoxWidget("Switch \"A - B\""	   ,patch,new ParamModel(patch,16+ 5),new PerformanceSender( 5),FSOnOffName)   ,0,21,4,1,19);		addWidget(cmnPane,new ComboBoxWidget("Table Select"	   ,patch,new ParamModel(patch,16+ 3),new PerformanceSender( 3),MicroTableName),4,21,4,1,20);		addWidget(cmnPane,new ComboBoxWidget("Key Select"	   ,patch,new ParamModel(patch,16+ 4),new PerformanceSender( 4),MicroKeyName)  ,8,21,4,1,21);		gbc.gridx=0;gbc.gridy=22;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		gbc.gridx=0;gbc.gridy=23;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel("Pan(orama) Function:"),gbc);		addWidget(cmnPane,new ComboBoxWidget("Mode \"A - B\""	   ,patch,new ParamModel(patch,16+20),new PerformanceSender(20),PanModeName)   ,0,24,4,1,22);		addWidget(cmnPane,new ComboBoxWidget("Control Range"	   ,patch,new ParamModel(patch,16+21),new PerformanceSender(21),VolumeName)    ,4,24,4,1,23);		addWidget(cmnPane,new ComboBoxWidget("Control Assign"	   ,patch,new ParamModel(patch,16+22),new PerformanceSender(22),PanAssignName) ,8,24,4,1,24);		gbc.gridx=0;gbc.gridy=24;gbc.gridwidth=1;gbc.gridheight=1; cmnPane.add(new JLabel(" "),gbc);		addWidget(cmnPane,new EnvelopeWidget("Pan Envelope Generator",patch,new EnvelopeWidget.Node [] {			new EnvelopeWidget.Node(0,0,null,0,0,null,0,false,null,null,null,null),			new EnvelopeWidget.Node(0,99,new ParamModel(patch,16+23),0,99,new ParamModel(patch,16+27),0,true,new PerformanceSender(23),new PerformanceSender(27),"R1","L1"),			new EnvelopeWidget.Node(0,99,new ParamModel(patch,16+24),0,99,new ParamModel(patch,16+28),0,true,new PerformanceSender(24),new PerformanceSender(28),"R2","L2"),			new EnvelopeWidget.Node(0,99,new ParamModel(patch,16+25),0,99,new ParamModel(patch,16+29),0,true,new PerformanceSender(25),new PerformanceSender(29),"R3","L3"),			new EnvelopeWidget.Node(0,99,new ParamModel(patch,16+26),0,99,new ParamModel(patch,16+30),0,true,new PerformanceSender(26),new PerformanceSender(30),"R4","L4"),		}),0,26,10,9,25);		scrollPane.add(cmnPane,gbc);		pack();		show();		PatchEdit.hideWaitDialog();	// Okay, the editor frame is ready	}