change table column positions in tables of FrameworkModules and horizontal scrollbar...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFrameworkModules.java
1 package org.tianocore.frameworkwizard.platform.ui;
2
3 import java.awt.BorderLayout;
4
5 import javax.swing.JFrame;
6 import javax.swing.JOptionPane;
7 import javax.swing.JPanel;
8 import javax.swing.JSplitPane;
9 import javax.swing.JLabel;
10 import javax.swing.JScrollPane;
11 import javax.swing.JTable;
12 import javax.swing.JButton;
13 import javax.swing.ListSelectionModel;
14 import javax.swing.table.DefaultTableModel;
15
16 import org.tianocore.PlatformSurfaceAreaDocument;
17 import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
18 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
19 import org.tianocore.frameworkwizard.platform.ui.global.GlobalData;
20 import org.tianocore.frameworkwizard.platform.ui.id.ModuleIdentification;
21 import org.tianocore.frameworkwizard.platform.ui.id.PackageIdentification;
22
23 import java.awt.FlowLayout;
24 import java.io.File;
25 import java.util.ArrayList;
26 import java.util.HashMap;
27 import java.util.Iterator;
28 import java.util.Map;
29 import java.util.Set;
30 import java.util.Vector;
31
32 public class FpdFrameworkModules extends IInternalFrame {
33
34 /**
35 *
36 */
37 private static final long serialVersionUID = 1L;
38
39 static JFrame frame;
40
41 private JSplitPane jSplitPane = null;
42
43 private JPanel jPanelTop = null;
44
45 private JPanel jPanelBottom = null;
46
47 private JLabel jLabel = null;
48
49 private JScrollPane jScrollPaneAllModules = null;
50
51 private JTable jTableAllModules = null;
52
53 private JPanel jPanelTopSouth = null;
54
55 private JButton jButtonAddModule = null;
56
57 private JLabel jLabelModulesAdded = null;
58
59 private JPanel jPanelBottomSouth = null;
60
61 private JScrollPane jScrollPaneFpdModules = null;
62
63 private JTable jTableFpdModules = null;
64
65 private JButton jButtonSettings = null;
66
67 private JButton jButtonRemoveModule = null;
68
69 private NonEditableTableModel modelAllModules = null;
70
71 private NonEditableTableModel modelFpdModules = null;
72
73 private FpdModuleSA settingDlg = null;
74
75 private FpdFileContents ffc = null;
76
77 private OpeningPlatformType docConsole = null;
78
79 private Map<String, ArrayList<String>> fpdMsa = null;
80
81 private ArrayList<ModuleIdentification> miList = null;
82
83 private final int ModNameColForAllModTable = 0;
84
85 private final int PkgNameColForAllModTable = 1;
86
87 private final int PathColForAllModTable = 2;
88
89 private final int PkgVerColForAllModTable = 3;
90
91 private final int ModVerColForAllModTable = 4;
92
93 private final int ModNameColForFpdModTable = 0;
94
95 private final int PkgNameColForFpdModTable = 1;
96
97 private final int PathColForFpdModTable = 2;
98
99 private final int ArchColForFpdModTable = 3;
100
101 private final int PkgVerColForFpdModTable = 4;
102
103 private final int ModVerColForFpdModTable = 5;
104
105 private final int ModNameMinWidth = 168;
106
107 private final int ModNamePrefWidth = 200;
108
109 private final int PkgNameMinWidth = 100;
110
111 private final int PkgNamePrefWidth = 110;
112
113 private final int PkgNameMaxWidth = 150;
114
115 private final int VerMinWidth = 50;
116
117 private final int VerMaxWidth = 80;
118
119 private final int VerPrefWidth = 60;
120
121 private final int PathPrefWidth = 320;
122
123 private final int PathMinWidth = 280;
124
125 private final int ArchPrefWidth = 80;
126
127 private final int ArchMinWidth = 60;
128
129 private final int ArchMaxWidth = 100;
130
131 /**
132 * This method initializes jSplitPane
133 *
134 * @return javax.swing.JSplitPane
135 */
136 private JSplitPane getJSplitPane() {
137 if (jSplitPane == null) {
138 jSplitPane = new JSplitPane();
139 jSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
140 jSplitPane.setDividerLocation(250);
141 jSplitPane.setBottomComponent(getJPanelBottom());
142 jSplitPane.setTopComponent(getJPanelTop());
143 }
144 return jSplitPane;
145 }
146
147 /**
148 * This method initializes jPanel
149 *
150 * @return javax.swing.JPanel
151 */
152 private JPanel getJPanelTop() {
153 if (jPanelTop == null) {
154 jLabel = new JLabel();
155 jLabel.setText("Modules in Workspace");
156 jPanelTop = new JPanel();
157 jPanelTop.setLayout(new BorderLayout());
158 jPanelTop.add(jLabel, java.awt.BorderLayout.NORTH);
159 jPanelTop.add(getJScrollPaneAllModules(), java.awt.BorderLayout.CENTER);
160 jPanelTop.add(getJPanelTopSouth(), java.awt.BorderLayout.SOUTH);
161 }
162 return jPanelTop;
163 }
164
165 /**
166 * This method initializes jPanel1
167 *
168 * @return javax.swing.JPanel
169 */
170 private JPanel getJPanelBottom() {
171 if (jPanelBottom == null) {
172 jLabelModulesAdded = new JLabel();
173 jLabelModulesAdded.setText("Modules Added");
174 jPanelBottom = new JPanel();
175 jPanelBottom.setLayout(new BorderLayout());
176 jPanelBottom.add(jLabelModulesAdded, java.awt.BorderLayout.NORTH);
177 jPanelBottom.add(getJPanelBottomSouth(), java.awt.BorderLayout.SOUTH);
178 jPanelBottom.add(getJScrollPaneFpdModules(), java.awt.BorderLayout.CENTER);
179 }
180 return jPanelBottom;
181 }
182
183 /**
184 * This method initializes jScrollPane
185 *
186 * @return javax.swing.JScrollPane
187 */
188 private JScrollPane getJScrollPaneAllModules() {
189 if (jScrollPaneAllModules == null) {
190 jScrollPaneAllModules = new JScrollPane();
191 jScrollPaneAllModules.setPreferredSize(new java.awt.Dimension(600, 200));
192 jScrollPaneAllModules.setViewportView(getJTableAllModules());
193 }
194 return jScrollPaneAllModules;
195 }
196
197 /**
198 * This method initializes jTable
199 *
200 * @return javax.swing.JTable
201 */
202 private JTable getJTableAllModules() {
203 if (jTableAllModules == null) {
204 modelAllModules = new NonEditableTableModel();
205 TableSorter sorter = new TableSorter(modelAllModules);
206 jTableAllModules = new JTable(sorter);
207 sorter.setTableHeader(jTableAllModules.getTableHeader());
208 jTableAllModules.setRowHeight(20);
209 modelAllModules.addColumn("<html>Module<br>Name</html>");
210 modelAllModules.addColumn("<html>Package<br>Name</html>");
211 modelAllModules.addColumn("Path");
212 modelAllModules.addColumn("<html>Package<br>Version</html>");
213 modelAllModules.addColumn("<html>Module<br>Version</html>");
214
215 javax.swing.table.TableColumn column = null;
216 column = jTableAllModules.getColumnModel().getColumn(ModNameColForAllModTable);
217 column.setPreferredWidth(ModNamePrefWidth);
218 column.setMinWidth(ModNameMinWidth);
219 column = jTableAllModules.getColumnModel().getColumn(ModVerColForAllModTable);
220 column.setPreferredWidth(VerPrefWidth);
221 column.setMaxWidth(VerMaxWidth);
222 column.setMinWidth(VerMinWidth);
223 column = jTableAllModules.getColumnModel().getColumn(PkgNameColForAllModTable);
224 column.setPreferredWidth(PkgNamePrefWidth);
225 column.setMinWidth(PkgNameMinWidth);
226 column.setMaxWidth(PkgNameMaxWidth);
227 column = jTableAllModules.getColumnModel().getColumn(PkgVerColForAllModTable);
228 column.setPreferredWidth(VerPrefWidth);
229 column.setMaxWidth(VerMaxWidth);
230 column.setMinWidth(VerMinWidth);
231 column = jTableAllModules.getColumnModel().getColumn(PathColForAllModTable);
232 column.setPreferredWidth(PathPrefWidth);
233 column.setMinWidth(PathMinWidth);
234
235 jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
236 jTableAllModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
237 }
238 return jTableAllModules;
239 }
240
241 /**
242 * This method initializes jPanel2
243 *
244 * @return javax.swing.JPanel
245 */
246 private JPanel getJPanelTopSouth() {
247 if (jPanelTopSouth == null) {
248 FlowLayout flowLayout = new FlowLayout();
249 flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
250 jPanelTopSouth = new JPanel();
251 jPanelTopSouth.setLayout(flowLayout);
252 jPanelTopSouth.add(getJButtonAddModule(), null);
253 }
254 return jPanelTopSouth;
255 }
256
257 /**
258 * This method initializes jButton
259 *
260 * @return javax.swing.JButton
261 */
262 private JButton getJButtonAddModule() {
263 if (jButtonAddModule == null) {
264 jButtonAddModule = new JButton();
265 jButtonAddModule.setPreferredSize(new java.awt.Dimension(130, 20));
266 jButtonAddModule.setText("Add a Module");
267 jButtonAddModule.addActionListener(new java.awt.event.ActionListener() {
268 public void actionPerformed(java.awt.event.ActionEvent e) {
269 int selectedRow = jTableAllModules.getSelectedRow();
270 if (selectedRow < 0) {
271 return;
272 }
273
274 TableSorter sorter = (TableSorter) jTableAllModules.getModel();
275 selectedRow = sorter.modelIndex(selectedRow);
276 String path = modelAllModules.getValueAt(selectedRow, PathColForAllModTable) + "";
277 ModuleIdentification mi = miList.get(selectedRow);
278 Vector<String> vArchs = null;
279 try {
280 vArchs = GlobalData.getModuleSupArchs(mi);
281 }
282 catch (Exception exp) {
283 JOptionPane.showMessageDialog(frame, exp.getMessage());
284 }
285
286 if (vArchs == null) {
287 JOptionPane.showMessageDialog(frame, "No Supported Architectures specified in MSA file.");
288 return;
289 }
290
291 String archsAdded = "";
292 String mg = mi.getGuid();
293 String mv = mi.getVersion();
294 String pg = mi.getPackage().getGuid();
295 String pv = mi.getPackage().getVersion();
296
297 ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);
298 if (al == null) {
299 al = new ArrayList<String>();
300 fpdMsa.put(mg + mv + pg + pv, al);
301 }
302 for (int i = 0; i < al.size(); ++i) {
303 vArchs.remove(al.get(i));
304 }
305 //
306 // Archs this Module supported have already been added.
307 //
308 if (vArchs.size() == 0) {
309 JOptionPane.showMessageDialog(frame, "This Module has already been added.");
310 return;
311 }
312 //ToDo put Arch instead of null
313 boolean errorOccurred = false;
314 for (int i = 0; i < vArchs.size(); ++i) {
315 String arch = vArchs.get(i);
316 al.add(arch);
317 archsAdded += arch + " ";
318 String[] row = { "", "", "", "", "", "" };
319
320 if (mi != null) {
321 row[ModNameColForFpdModTable] = mi.getName();
322 row[PkgNameColForFpdModTable] = mi.getPackage().getName();
323 row[PathColForFpdModTable] = path;
324 row[ArchColForFpdModTable] = arch;
325 row[PkgVerColForFpdModTable] = pv;
326 row[ModVerColForFpdModTable] = mv;
327
328 }
329 modelFpdModules.addRow(row);
330
331 docConsole.setSaved(false);
332 try {
333 //ToDo : specify archs need to add.
334 ffc.addFrameworkModulesPcdBuildDefs(mi, arch, null);
335 } catch (Exception exception) {
336 JOptionPane.showMessageDialog(frame, "Adding " + row[ModNameColForFpdModTable] + " with SupArch " + arch
337 + ": " + exception.getMessage());
338 errorOccurred = true;
339 }
340 }
341
342 String s = "This Module with Architecture " + archsAdded;
343 if (errorOccurred) {
344 s += " was added with Error. Platform may NOT Build.";
345 } else {
346 s += " was added Successfully.";
347 }
348 JOptionPane.showMessageDialog(frame, s);
349 jTableFpdModules.changeSelection(modelFpdModules.getRowCount() - 1, 0, false, false);
350 }
351 });
352 }
353 return jButtonAddModule;
354 }
355
356 /**
357 * This method initializes jPanel3
358 *
359 * @return javax.swing.JPanel
360 */
361 private JPanel getJPanelBottomSouth() {
362 if (jPanelBottomSouth == null) {
363 FlowLayout flowLayout1 = new FlowLayout();
364 flowLayout1.setAlignment(java.awt.FlowLayout.RIGHT);
365 jPanelBottomSouth = new JPanel();
366 jPanelBottomSouth.setLayout(flowLayout1);
367 jPanelBottomSouth.add(getJButtonSettings(), null);
368 jPanelBottomSouth.add(getJButtonRemoveModule(), null);
369 }
370 return jPanelBottomSouth;
371 }
372
373 /**
374 * This method initializes jScrollPane1
375 *
376 * @return javax.swing.JScrollPane
377 */
378 private JScrollPane getJScrollPaneFpdModules() {
379 if (jScrollPaneFpdModules == null) {
380 jScrollPaneFpdModules = new JScrollPane();
381 jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(453, 200));
382 jScrollPaneFpdModules.setViewportView(getJTableFpdModules());
383 }
384 return jScrollPaneFpdModules;
385 }
386
387 /**
388 * This method initializes jTable1
389 *
390 * @return javax.swing.JTable
391 */
392 private JTable getJTableFpdModules() {
393 if (jTableFpdModules == null) {
394 modelFpdModules = new NonEditableTableModel();
395 TableSorter sorter = new TableSorter(modelFpdModules);
396 jTableFpdModules = new JTable(sorter);
397 sorter.setTableHeader(jTableFpdModules.getTableHeader());
398 jTableFpdModules.setRowHeight(20);
399 modelFpdModules.addColumn("<html>Module<br>Name</html>");
400 modelFpdModules.addColumn("<html>Package<br>Name</html>");
401 modelFpdModules.addColumn("Path");
402 modelFpdModules.addColumn("<html>Supported<br>Architectures</html>");
403 modelFpdModules.addColumn("<html>Package<br>Version</html>");
404 modelFpdModules.addColumn("<html>Module<br>Version</html>");
405
406 javax.swing.table.TableColumn column = null;
407 column = jTableFpdModules.getColumnModel().getColumn(ModNameColForFpdModTable);
408 column.setPreferredWidth(ModNamePrefWidth);
409 column.setMinWidth(ModNameMinWidth);
410 column = jTableFpdModules.getColumnModel().getColumn(ModVerColForFpdModTable);
411 column.setPreferredWidth(VerPrefWidth);
412 column.setMaxWidth(VerMaxWidth);
413 column.setMinWidth(VerMinWidth);
414 column = jTableFpdModules.getColumnModel().getColumn(PkgNameColForFpdModTable);
415 column.setPreferredWidth(PkgNamePrefWidth);
416 column.setMinWidth(PkgNameMinWidth);
417 column.setMaxWidth(PkgNameMaxWidth);
418 column = jTableFpdModules.getColumnModel().getColumn(PkgVerColForFpdModTable);
419 column.setPreferredWidth(VerPrefWidth);
420 column.setMaxWidth(VerMaxWidth);
421 column.setMinWidth(VerMinWidth);
422 column = jTableFpdModules.getColumnModel().getColumn(ArchColForFpdModTable);
423 column.setPreferredWidth(ArchPrefWidth);
424 column.setMaxWidth(ArchMaxWidth);
425 column.setMinWidth(ArchMinWidth);
426 column = jTableFpdModules.getColumnModel().getColumn(PathColForFpdModTable);
427 column.setPreferredWidth(PathPrefWidth);
428 column.setMinWidth(PathMinWidth);
429
430 jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
431 jTableFpdModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
432 }
433 return jTableFpdModules;
434 }
435
436 /**
437 * This method initializes jButton1
438 *
439 * @return javax.swing.JButton
440 */
441 private JButton getJButtonSettings() {
442 if (jButtonSettings == null) {
443 jButtonSettings = new JButton();
444 jButtonSettings.setPreferredSize(new java.awt.Dimension(130,20));
445 jButtonSettings.setText("Settings");
446 jButtonSettings.addActionListener(new java.awt.event.ActionListener() {
447 public void actionPerformed(java.awt.event.ActionEvent e) {
448 int selectedRow = jTableFpdModules.getSelectedRow();
449 if (selectedRow < 0) {
450 return;
451 }
452
453 TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
454 selectedRow = sorter.modelIndex(selectedRow);
455 try {
456 if (ffc.adjustPcd(selectedRow)) {
457 docConsole.setSaved(false);
458 }
459 }
460 catch (Exception exp) {
461 JOptionPane.showMessageDialog(frame, exp.getMessage());
462 return;
463 }
464
465 if (settingDlg == null) {
466 settingDlg = new FpdModuleSA(ffc);
467 }
468
469 String[] sa = new String[5];
470 ffc.getFrameworkModuleInfo(selectedRow, sa);
471 String mg = sa[0];
472 String mv = sa[1];
473 String pg = sa[2];
474 String pv = sa[3];
475 String arch = sa[4];
476 settingDlg.setKey(mg + " " + mv + " " + pg + " " + pv + " " + arch, selectedRow, docConsole);
477 settingDlg.setVisible(true);
478 }
479 });
480 }
481 return jButtonSettings;
482 }
483
484 /**
485 * This method initializes jButton2
486 *
487 * @return javax.swing.JButton
488 */
489 private JButton getJButtonRemoveModule() {
490 if (jButtonRemoveModule == null) {
491 jButtonRemoveModule = new JButton();
492 jButtonRemoveModule.setPreferredSize(new java.awt.Dimension(130, 20));
493 jButtonRemoveModule.setText("Remove Module");
494 jButtonRemoveModule.addActionListener(new java.awt.event.ActionListener() {
495 public void actionPerformed(java.awt.event.ActionEvent e) {
496 int selectedRow = jTableFpdModules.getSelectedRow();
497 if (selectedRow < 0) {
498 return;
499 }
500
501 TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
502 selectedRow = sorter.modelIndex(selectedRow);
503
504 String[] sa = new String[5];
505 ffc.getFrameworkModuleInfo(selectedRow, sa);
506 String mg = sa[0];
507 String mv = sa[1];
508 String pg = sa[2];
509 String pv = sa[3];
510 String arch = sa[4];
511 ModuleIdentification mi = GlobalData.getModuleId(sa[0] + " " + sa[1] + " "
512 + sa[2] + " " + sa[3] + " "
513 + sa[4]);
514 mv = mi.getVersion();
515 pv = mi.getPackage().getVersion();
516 modelFpdModules.removeRow(selectedRow);
517 if (arch == null) {
518 // if no arch specified in ModuleSA
519 fpdMsa.remove(mg + mv + pg + pv);
520 } else {
521 ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);
522 al.remove(arch);
523 if (al.size() == 0) {
524 fpdMsa.remove(mg + mv + pg + pv);
525 }
526 }
527
528 docConsole.setSaved(false);
529 ffc.removeModuleSA(selectedRow);
530 }
531 });
532 }
533 return jButtonRemoveModule;
534 }
535
536 /**
537 * @param args
538 */
539 public static void main(String[] args) {
540 // TODO Auto-generated method stub
541 new FpdFrameworkModules().setVisible(true);
542 }
543
544 /**
545 * This is the default constructor
546 */
547 public FpdFrameworkModules() {
548 super();
549 initialize();
550 }
551
552 public FpdFrameworkModules(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {
553 this();
554 init(fpd);
555
556 }
557
558 public FpdFrameworkModules(OpeningPlatformType opt) {
559 this(opt.getXmlFpd());
560 docConsole = opt;
561 }
562
563 private void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {
564 try {
565 GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", System.getenv("WORKSPACE"));
566 }
567 catch(Exception e){
568 JOptionPane.showMessageDialog(frame, "Error occurred when getting module data.");
569 }
570
571 if (ffc == null) {
572 ffc = new FpdFileContents(fpd);
573 ffc.initDynPcdMap();
574 }
575
576 if (fpdMsa == null) {
577 fpdMsa = new HashMap<String, ArrayList<String>>();
578 }
579
580 if (ffc.getFrameworkModulesCount() > 0) {
581 String[][] saa = new String[ffc.getFrameworkModulesCount()][5];
582 ffc.getFrameworkModulesInfo(saa);
583 for (int i = 0; i < saa.length; ++i) {
584 ModuleIdentification mi = GlobalData.getModuleId(saa[i][0] + " " + saa[i][1] + " "
585 + saa[i][2] + " " + saa[i][3]);
586 String[] row = { "", "", "", "", "", "" };
587 if (mi != null) {
588 row[ModNameColForFpdModTable] = mi.getName();
589 row[ModVerColForFpdModTable] = mi.getVersion();
590 row[PkgNameColForFpdModTable] = mi.getPackage().getName();
591 row[PkgVerColForFpdModTable] = mi.getPackage().getVersion();
592 row[ArchColForFpdModTable] = saa[i][4];
593 try {
594 row[PathColForFpdModTable] = GlobalData.getMsaFile(mi).getPath().substring(
595 System.getenv("WORKSPACE")
596 .length() + 1);
597 } catch (Exception e) {
598 JOptionPane.showMessageDialog(frame, "Show FPD Modules:" + e.getMessage());
599 }
600 }
601 modelFpdModules.addRow(row);
602 ArrayList<String> al = fpdMsa.get(saa[i][0] + saa[i][1]
603 + saa[i][2] + saa[i][3]);
604 if (al == null) {
605 al = new ArrayList<String>();
606 fpdMsa.put(saa[i][0] + saa[i][1] + saa[i][2] + saa[i][3], al);
607 }
608 al.add(saa[i][4]);
609
610 }
611 }
612
613 showAllModules();
614
615 }
616
617 private void showAllModules() {
618
619 if (miList == null) {
620 miList = new ArrayList<ModuleIdentification>();
621 }
622 Set<PackageIdentification> spi = GlobalData.getPackageList();
623 Iterator ispi = spi.iterator();
624
625 while (ispi.hasNext()) {
626 PackageIdentification pi = (PackageIdentification) ispi.next();
627 String[] s = { "", "", "", "", "" };
628
629 Set<ModuleIdentification> smi = GlobalData.getModules(pi);
630 Iterator ismi = smi.iterator();
631 while (ismi.hasNext()) {
632 ModuleIdentification mi = (ModuleIdentification) ismi.next();
633 s[ModNameColForAllModTable] = mi.getName();
634 s[ModVerColForAllModTable] = mi.getVersion();
635 s[PkgNameColForAllModTable] = pi.getName();
636 s[PkgVerColForAllModTable] = pi.getVersion();
637 try {
638 s[PathColForAllModTable] = GlobalData.getMsaFile(mi).getPath()
639 .substring(System.getenv("WORKSPACE").length() + 1);
640 } catch (Exception e) {
641 JOptionPane.showMessageDialog(frame, "Show All Modules:" + e.getMessage());
642 }
643 modelAllModules.addRow(s);
644 miList.add(mi);
645 }
646 }
647 }
648
649 /**
650 * This method initializes this
651 *
652 * @return void
653 */
654 private void initialize() {
655 this.setSize(633, 533);
656 this.setTitle("Framework Modules");
657 this.setContentPane(getJSplitPane());
658 this.setVisible(true);
659
660 }
661
662 } // @jve:decl-index=0:visual-constraint="10,10"
663
664 class NonEditableTableModel extends DefaultTableModel {
665 /**
666 *
667 */
668 private static final long serialVersionUID = 1L;
669
670 public boolean isCellEditable(int row, int col) {
671 return false;
672 }
673 }