return true;
}
@Override
protected JComponent getDialogContent() {
final DCPanel driverClassOuterPanel = new DCPanel().setTitledBorder("Driver class name");
driverClassOuterPanel.add(_driverClassNameComboBox);
final JButton addButton = WidgetFactory.createSmallButton("images/actions/add.png");
addButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
addFilenameTextField();
}
});
final JButton removeButton = WidgetFactory.createSmallButton("images/actions/remove.png");
removeButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
removeFilenameTextField();
}
});
final DCPanel filesButtonPanel = new DCPanel();
filesButtonPanel.setBorder(new EmptyBorder(0, 4, 0, 0));
filesButtonPanel.setLayout(new VerticalLayout(2));
filesButtonPanel.add(addButton);
filesButtonPanel.add(removeButton);
final DCPanel filesOuterPanel = new DCPanel().setTitledBorder("Driver JAR file(s)");
filesOuterPanel.setLayout(new BorderLayout());
filesOuterPanel.add(_filesPanel, BorderLayout.CENTER);
filesOuterPanel.add(filesButtonPanel, BorderLayout.EAST);
final DCPanel buttonPanel = new DCPanel();
buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
buttonPanel.setBorder(new EmptyBorder(10, 10, 10, 10));
buttonPanel.add(_addDriverButton);
final DCPanel mainPanel = new DCPanel();
mainPanel.setLayout(new VerticalLayout(4));
mainPanel.add(driverClassOuterPanel);
mainPanel.add(filesOuterPanel);
mainPanel.add(buttonPanel);
final DCPanel outerPanel = new DCPanel();
outerPanel.setLayout(new BorderLayout());
outerPanel.add(mainPanel, BorderLayout.CENTER);
outerPanel.add(WidgetFactory.createStatusBar(_statusLabel), BorderLayout.SOUTH);
outerPanel.setPreferredSize(400, 350);
return outerPanel;
}