// popup.add(new AttachFile("pdf"));
// popup.add(new AttachFile("ps"));
popup.add(new AttachUrl());
getContentPane().add(centerPan, BorderLayout.CENTER);
ButtonBarBuilder bb = new ButtonBarBuilder();
bb.addGlue();
bb.addGridded(ok);
bb.addGridded(stop);
bb.addGridded(cancel);
bb.addRelatedGap();
bb.addGridded(help);
bb.addGlue();
bb.getPanel().setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
ButtonStackBuilder builder = new ButtonStackBuilder();
builder.addGridded(selectAll);
builder.addGridded(deselectAll);
builder.addGridded(deselectAllDuplicates);
builder.addRelatedGap();
builder.addGridded(delete);
builder.addRelatedGap();
builder.addGridded(autoGenerate);
builder.addGridded(generate);
builder.getPanel().setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
centerPan.add(builder.getPanel(), BorderLayout.WEST);
ok.setEnabled(false);
generate.setEnabled(false);
ok.addActionListener(new OkListener());
cancel.addActionListener(new CancelListener());
generate.addActionListener(new GenerateListener());
stop.addActionListener(new StopListener());
selectAll.addActionListener(new SelectionButton(true));
deselectAll.addActionListener(new SelectionButton(false));
deselectAllDuplicates.addActionListener(new DeselectDuplicatesButtonListener());
deselectAllDuplicates.setEnabled(false);
delete.addActionListener(deleteListener);
help.addActionListener(new HelpAction(frame.helpDiag, GUIGlobals.importInspectionHelp));
getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
// Remember and default to last size:
setSize(new Dimension(Globals.prefs.getInt("importInspectionDialogWidth"), Globals.prefs
.getInt("importInspectionDialogHeight")));
addWindowListener(new WindowAdapter() {