/**
* Initializes all components.
*/
private void initialize() {
Container content = this.getContentPane();
content.setLayout(new GridBagLayout());
abortButton = new JButton(LangageManager
.getProperty("common.dialog.abort"));
abortButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (finished) {
ListingProgressDialog.this.dispose();
} else {
if (JOptionPane.showConfirmDialog(
ListingProgressDialog.this, LangageManager
.getProperty("listgen.confirmabort"),
LangageManager.getProperty("common.dialog.abort")
+ "?", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
aborted = true;
}
}
}
});
currentDirectory = new JLabel("not set");
currentFile = new JLabel("not set");
progressBar = new JProgressBar();
messagePane = new JTextPane();
messagePane.setEditable(false);
messagePane.setAutoscrolls(true);
content.add(currentDirectory, new GridBagConstraints(0, 0, 2, 1, 0, 0,
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(0, 0, 0, 0), 0, 0));
content.add(currentFile, new GridBagConstraints(0, 1, 2, 1, 0, 0,
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(0, 0, 0, 0), 0, 0));
content.add(progressBar, new GridBagConstraints(0, 2, 2, 1, 0, 0,
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(0, 0, 0, 0), 0, 0));
content.add(new JScrollPane(messagePane), new GridBagConstraints(0, 3,
2, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
new Insets(0, 0, 0, 0), 0, 150));
content.add(abortButton, new GridBagConstraints(1, 4, 1, 1, 0, 0,
GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0,
0, 0, 0), 0, 0));
setSize(500, 300);
this.setModal(true);
this.setTitle(LangageManager.getProperty("listgen.progress"));