gt: 			int current = ((StatusDialogProgressBar)e).getCurrentValue();
context: /*
   * 3D City Database - The Open Source CityGML Database
   * http://www.3dcitydb.org/
   * 
   * (C) 2013 - 2015,
   * Chair of Geoinformatics,
   * Technische Universitaet Muenchen, Germany
   * http://www.gis.bgu.tum.de/
   * 
   * The 3D City Database is jointly developed with the following
   * cooperation partners:
   * 
   * virtualcitySYSTEMS GmbH, Berlin <http://www.virtualcitysystems.de/>
   * M.O.S.S. Computer Grafik Systeme GmbH, Muenchen <http://www.moss.de/>
   * 
   * The 3D City Database Importer/Exporter program is free software:
   * you can redistribute it and/or modify it under the terms of the
   * GNU Lesser General Public License as published by the Free
   * Software Foundation, either version 3 of the License, or
   * (at your option) any later version.
   * 
   * This software is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   * GNU Lesser General Public License for more details.
   */
  package org.citydb.gui.components;
  
  import java.awt.Color;
  import java.awt.Font;
  import java.awt.GridBagConstraints;
  import java.awt.GridBagLayout;
  import java.awt.event.WindowAdapter;
  import java.awt.event.WindowEvent;
  
  import javax.swing.BorderFactory;
  import javax.swing.JButton;
  import javax.swing.JDialog;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  import javax.swing.JProgressBar;
  import javax.swing.SwingUtilities;
  
  import org.citydb.api.event.Event;
  import org.citydb.api.event.EventDispatcher;
  import org.citydb.api.event.EventHandler;
  import org.citydb.config.language.Language;
  import org.citydb.modules.common.event.EventType;
  import org.citydb.modules.common.event.StatusDialogMessage;
  import org.citydb.modules.common.event.StatusDialogProgressBar;
  import org.citydb.modules.common.event.StatusDialogTitle;
  import org.citydb.util.gui.GuiUtil;
  
  @SuppressWarnings("serial")
  public class StatusDialog extends JDialog implements EventHandler {	
  	private EventDispatcher eventDispatcher;
  
  	private JLabel titleLabel;
  	private JLabel messageLabel;
  	private JProgressBar progressBar;
  	private JLabel detailsLabel;
  	private JPanel main;
  	private JPanel row;
  	private JButton button;
  	private volatile boolean acceptStatusUpdate = true;
  
  	public StatusDialog(JFrame frame, 
  			String windowTitle, 
  			String statusTitle,
  			String statusMessage,
  			String statusDetails, 
  			boolean setButton,
  			EventDispatcher eventDispatcher) {
  		super(frame, windowTitle, true);
  
  		this.eventDispatcher = eventDispatcher;
  		eventDispatcher.addEventHandler(EventType.STATUS_DIALOG_PROGRESS_BAR, this);
  		eventDispatcher.addEventHandler(EventType.STATUS_DIALOG_MESSAGE, this);
  		eventDispatcher.addEventHandler(EventType.STATUS_DIALOG_TITLE, this);
  		eventDispatcher.addEventHandler(EventType.INTERRUPT, this);
  
  		initGUI(windowTitle, statusTitle, statusMessage, statusDetails, setButton);
  	}
  
  	public StatusDialog(JFrame frame, 
  			String windowTitle, 
  			String statusTitle,
  			String statusMessage,
  			String statusDetails, 
  			boolean setButton) {
  		super(frame, windowTitle, true);
  
  		initGUI(windowTitle, statusTitle, statusMessage, statusDetails, setButton);
  	}
  
  	private void initGUI(String windowTitle, 
  			String statusTitle, 
  			String statusMessage, 
  			String statusDetails, 
  			boolean setButton) {
  
  		if (statusTitle == null)
  			statusTitle = "";
  
  		if (statusMessage == null)
  			statusMessage = "";
  
  		String[] details = null;
  		if (statusDetails != null)
  			details = statusDetails.split("<br\\s*/*>");
  
  		setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
  		titleLabel = new JLabel(statusTitle);
  		titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD));
  		messageLabel = new JLabel(statusMessage);
  		button = new JButton(Language.I18N.getString("common.button.cancel"));		
  		progressBar = new JProgressBar();
  
  		setLayout(new GridBagLayout()); {
  			main = new JPanel();
  			add(main, GuiUtil.setConstraints(0,0,1.0,0.0,GridBagConstraints.BOTH,5,5,5,5));
  			main.setLayout(new GridBagLayout());
  			{
  				main.add(titleLabel, GuiUtil.setConstraints(0,0,0.0,0.5,GridBagConstraints.HORIZONTAL,5,5,5,5));
  				main.add(messageLabel, GuiUtil.setConstraints(0,1,0.0,0.5,GridBagConstraints.HORIZONTAL,5,5,0,5));
  				main.add(progressBar, GuiUtil.setConstraints(0,2,1.0,0.0,GridBagConstraints.HORIZONTAL,0,5,5,5));
  
  				if (details != null) {
  					detailsLabel = new JLabel("Details");
  					main.add(detailsLabel, GuiUtil.setConstraints(0,3,1.0,0.0,GridBagConstraints.HORIZONTAL,5,5,0,5));
  
  					row = new JPanel();
  					row.setBackground(new Color(255, 255, 255));
  					row.setBorder(BorderFactory.createEtchedBorder());
  					main.add(row, GuiUtil.setConstraints(0,4,1.0,0.0,GridBagConstraints.BOTH,0,5,5,5));
  					row.setLayout(new GridBagLayout());
  					{				
  						for (int i = 0; i < details.length; ++i) {
  							JLabel detail = new JLabel(details[i]);
  							detail.setBackground(row.getBackground());
  							row.add(detail, GuiUtil.setConstraints(0,i,1.0,0.0,GridBagConstraints.HORIZONTAL,i == 0 ? 5 : 2,5,i == details.length - 1 ? 5 : 0,5));
  						}
  					}
  				}
  			}
  
  			if (setButton)
  				add(button, GuiUtil.setConstraints(0,1,0.0,0.0,GridBagConstraints.NONE,5,5,5,5));
  
  			pack();
  			progressBar.setIndeterminate(true);
  
  			addWindowListener(new WindowAdapter() {
  				public void windowClosed(WindowEvent e) {
  					if (eventDispatcher != null)
  						eventDispatcher.removeEventHandler(StatusDialog.this);
  				}
  			});
  		}
  	}
  
  	public JLabel getStatusTitleLabel() {
  		return titleLabel;
  	}
  
  	public JLabel getStatusMessageLabel() {
  		return messageLabel;
  	}
  
  	public JButton getButton() {
  		return button;
  	}
  
  	public JProgressBar getProgressBar() {
  		return progressBar;
  	}
  
  	@Override
  	public void handleEvent(Event e) throws Exception {
  		if (e.getEventType() == EventType.INTERRUPT) {
  			acceptStatusUpdate = false;
  			messageLabel.setText(Language.I18N.getString("common.dialog.msg.abort"));
  			progressBar.setIndeterminate(true);
  		}
  
  		else if (e.getEventType() == EventType.STATUS_DIALOG_PROGRESS_BAR && acceptStatusUpdate) {		
  			if (((StatusDialogProgressBar)e).isSetIntermediate()) {
  				SwingUtilities.invokeLater(new Runnable() {
  					public void run() {		
  						if (!progressBar.isIndeterminate())
  							progressBar.setIndeterminate(true);
  					}
  				});
  
  				return;
  			}
  
  			if (progressBar.isIndeterminate()) {
  				SwingUtilities.invokeLater(new Runnable() {
  					public void run() {
  						progressBar.setIndeterminate(false);
  					}
  				});
  			} 
  
  			int max = ((StatusDialogProgressBar)e).getMaxValue();
  