gt: 				if (hlLineColor != null)
context: /*
   * This file is part of the 3D City Database Importer/Exporter.
   * Copyright (c) 2007 - 2013
   * Institute for Geodesy and Geoinformation Science
   * Technische Universitaet Berlin, Germany
   * http://www.gis.tu-berlin.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 program 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.
   * 
   * You should have received a copy of the GNU Lesser General Public
   * License along with this program. If not, see 
   * <http://www.gnu.org/licenses/>.
   * 
   * The development of the 3D City Database Importer/Exporter has 
   * been financially supported by the following cooperation partners:
   * 
   * Business Location Center, Berlin <http://www.businesslocationcenter.de/>
   * virtualcitySYSTEMS GmbH, Berlin <http://www.virtualcitysystems.de/>
   * Berlin Senate of Business, Technology and Women <http://www.berlin.de/sen/wtf/>
   */
  package de.tub.citydb.modules.kml.gui.preferences;
  
  import java.awt.Color;
  import java.awt.Dimension;
  import java.awt.GridBagConstraints;
  import java.awt.GridBagLayout;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  
  import javax.swing.BorderFactory;
  import javax.swing.ButtonGroup;
  import javax.swing.JButton;
  import javax.swing.JCheckBox;
  import javax.swing.JColorChooser;
  import javax.swing.JComboBox;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  import javax.swing.JRadioButton;
  import javax.swing.JSpinner;
  import javax.swing.JTextField;
  import javax.swing.SpinnerModel;
  import javax.swing.SpinnerNumberModel;
  import javax.swing.border.TitledBorder;
  
  import org.citygml.textureAtlasAPI.TextureAtlasGenerator;
  
  import de.tub.citydb.config.Config;
  import de.tub.citydb.config.internal.Internal;
  import de.tub.citydb.config.project.kmlExporter.ColladaOptions;
  import de.tub.citydb.config.project.kmlExporter.DisplayForm;
  import de.tub.citydb.gui.factory.PopupMenuDecorator;
  import de.tub.citydb.gui.preferences.AbstractPreferencesComponent;
  import de.tub.citydb.util.gui.GuiUtil;
  
  @SuppressWarnings("serial")
  public class CityFurnitureRenderingPanel extends AbstractPreferencesComponent {
  
  	protected static final int BORDER_THICKNESS = 5;
  	protected static final int MAX_TEXTFIELD_HEIGHT = 20;
  
  	private ArrayList<DisplayForm> internalDfs = new ArrayList<DisplayForm>();
  
  	private JPanel footprintPanel;
  	private JCheckBox footprintHighlightingCheckbox = new JCheckBox();
  	private JLabel footprintFillColorLabel = new JLabel();
  	private JButton footprintFillColorButton = new JButton(" ");
  	private JLabel footprintLineColorLabel = new JLabel();
  	private JButton footprintLineColorButton = new JButton(" ");
  	private JLabel footprintHLFillColorLabel = new JLabel();
  	private JButton footprintHLFillColorButton = new JButton(" ");
  	private JLabel footprintHLLineColorLabel = new JLabel();
  	private JButton footprintHLLineColorButton = new JButton(" ");
  	private JLabel footprintAlphaLabel = new JLabel();
  	private JSpinner footprintAlphaSpinner;
  
  	private JPanel geometryPanel;
  	private JLabel geometryAlphaLabel = new JLabel();
  	private JSpinner geometryAlphaSpinner;
  	private JLabel geometryWallFillColorLabel = new JLabel();
  	private JButton geometryWallFillColorButton = new JButton(" ");
  /*
  	private JLabel geometryRoofFillColorLabel = new JLabel();
  	private JButton geometryRoofFillColorButton = new JButton(" ");
  */
  	private JLabel geometryWallLineColorLabel = new JLabel();
  	private JButton geometryWallLineColorButton = new JButton(" ");
  /*
  	private JLabel geometryRoofLineColorLabel = new JLabel();
  	private JButton geometryRoofLineColorButton = new JButton(" ");
  */
  	private JCheckBox geometryHighlightingCheckbox = new JCheckBox();
  	private JLabel geometryHLSurfaceDistanceLabel = new JLabel();
  	private JTextField geometryHLSurfaceDistanceText = new JTextField("", 3);
  	private JLabel geometryHLFillColorLabel = new JLabel();
  	private JButton geometryHLFillColorButton = new JButton(" ");
  	private JLabel geometryHLLineColorLabel = new JLabel();
  	private JButton geometryHLLineColorButton = new JButton(" ");
  
  	private JPanel colladaPanel;
  	private JCheckBox ignoreSurfaceOrientationCheckbox = new JCheckBox();
  	private JCheckBox textureAtlasCheckbox = new JCheckBox();
  	private JCheckBox textureAtlasPotsCheckbox = new JCheckBox();
  	private JCheckBox scaleTexImagesCheckbox = new JCheckBox();
  	private JTextField scaleFactorText = new JTextField("", 3);
  	private JRadioButton groupObjectsRButton = new JRadioButton();
  	private JTextField groupSizeText = new JTextField("", 3);
  	private JRadioButton colladaHighlightingRButton = new JRadioButton();
  	private JLabel colladaHLSurfaceDistanceLabel = new JLabel();
  	private JTextField colladaHLSurfaceDistanceText = new JTextField("", 3);
  	private JLabel colladaHLFillColorLabel = new JLabel();
  	private JButton colladaHLFillColorButton = new JButton(" ");
  	private JLabel colladaHLLineColorLabel = new JLabel();
  	private JButton colladaHLLineColorButton = new JButton(" ");
  
  	private HashMap<String, Integer> packingAlgorithms = new HashMap<String, Integer>();  
  	private JComboBox packingAlgorithmsComboBox = new JComboBox();
  
  	public CityFurnitureRenderingPanel(Config config) {
  		super(config);
  		initGui();
  	}
  
  	private ColladaOptions getConfigColladaOptions() {
  		return config.getProject().getKmlExporter().getCityFurnitureColladaOptions();
  	}
  
  	private List<DisplayForm> getConfigDisplayForms() {
  		return config.getProject().getKmlExporter().getCityFurnitureDisplayForms();
  	}
  
  	private void setConfigDisplayForms(List<DisplayForm> displayForms) {
  		config.getProject().getKmlExporter().setCityFurnitureDisplayForms(displayForms);
  	}
  
  	@Override
  	public String getTitle() {
  		return Internal.I18N.getString("pref.tree.kmlExport.cityFurnitureRendering");
  	}
  
  	@Override
  	public boolean isModified() {
  		setInternalDisplayFormValues();
  		ColladaOptions colladaOptions = getConfigColladaOptions();
  		List<DisplayForm> configDfs = getConfigDisplayForms();
  
  		for (int form = DisplayForm.FOOTPRINT; form <= DisplayForm.COLLADA; form++) {
  			DisplayForm configDf = new DisplayForm(form, -1, -1);
  			int indexOfConfigDf = configDfs.indexOf(configDf); 
  			if (indexOfConfigDf != -1) {
  				configDf = configDfs.get(indexOfConfigDf);
  			}
  			DisplayForm internalDf = new DisplayForm(form, -1, -1);
  			int indexOfInternalDf = internalDfs.indexOf(internalDf); 
  			if (indexOfInternalDf != -1) {
  				internalDf = internalDfs.get(indexOfInternalDf);
  			}
  
  			if (areDisplayFormsContentsDifferent(internalDf, configDf)) return true;
  		}
  
  		if (ignoreSurfaceOrientationCheckbox.isSelected() != colladaOptions.isIgnoreSurfaceOrientation()) return true;
  		if (textureAtlasCheckbox.isSelected() != colladaOptions.isGenerateTextureAtlases()) return true;
  		if (textureAtlasPotsCheckbox.isSelected() != colladaOptions.isTextureAtlasPots()) return true;
  		if (packingAlgorithms.get(packingAlgorithmsComboBox.getSelectedItem()).intValue() != colladaOptions.getPackingAlgorithm()) return true;
  
  		int groupSize = 1;
  		try {
  			groupSize = Integer.parseInt(groupSizeText.getText().trim());
  			if (groupSize < 2) {
  				groupSize = 1;
  			}
  		}
  		catch (NumberFormatException nfe) {return true;}
  		//		groupSizeText.setText(String.valueOf(groupSize));
  		if (groupObjectsRButton.isSelected() != colladaOptions.isGroupObjects() ||
  				groupSize != colladaOptions.getGroupSize()) return true;
  
  		double imageScaleFactor = 1;
  		try {
  			imageScaleFactor = Double.parseDouble(scaleFactorText.getText().trim());
  			if (imageScaleFactor <= 0 || imageScaleFactor > 1) {
  				imageScaleFactor = 1;
  			}
  		}
  		catch (NumberFormatException nfe) {return true;}
  		//		scaleFactorText.setText(String.valueOf(imageScaleFactor));
  		if (scaleTexImagesCheckbox.isSelected() != colladaOptions.isScaleImages() ||
  				imageScaleFactor != colladaOptions.getImageScaleFactor()) return true;
  
  		return false;
  	}
  
  	private void initGui() {
  		setLayout(new GridBagLayout());
  
  		footprintPanel = new JPanel();
  		add(footprintPanel, GuiUtil.setConstraints(0,1,2,2,1.0,0.0,GridBagConstraints.BOTH,BORDER_THICKNESS,0,BORDER_THICKNESS,0));
  		footprintPanel.setLayout(new GridBagLayout());
  		footprintPanel.setBorder(BorderFactory.createTitledBorder(""));
  
  		SpinnerModel falphaValueModel = new SpinnerNumberModel(200, 0, 255, 1);
  		footprintAlphaSpinner = new JSpinner(falphaValueModel);
  //		footprintAlphaSpinner.setMinimumSize(new Dimension(footprintAlphaSpinner.getPreferredSize().width, MAX_TEXTFIELD_HEIGHT));
  //		footprintAlphaSpinner.setMaximumSize(new Dimension(footprintAlphaSpinner.getPreferredSize().width, MAX_TEXTFIELD_HEIGHT));
  
          GridBagConstraints fal = GuiUtil.setConstraints(0,0,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,BORDER_THICKNESS,BORDER_THICKNESS);
  		fal.anchor = GridBagConstraints.EAST;
  		footprintPanel.add(footprintAlphaLabel, fal);
  		footprintPanel.add(footprintAlphaSpinner, GuiUtil.setConstraints(1,0,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,BORDER_THICKNESS,0));
  
  		GridBagConstraints ffcl = GuiUtil.setConstraints(0,1,0.25,1.0,GridBagConstraints.NONE,BORDER_THICKNESS,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		ffcl.anchor = GridBagConstraints.EAST;
  		footprintPanel.add(footprintFillColorLabel, ffcl);
  
  		footprintFillColorButton.setPreferredSize(footprintAlphaSpinner.getPreferredSize());
  		footprintFillColorButton.setBackground(new Color(DisplayForm.DEFAULT_FILL_COLOR, true));
  		footprintFillColorButton.setContentAreaFilled(false);
  		footprintFillColorButton.setOpaque(true);
  		footprintPanel.add(footprintFillColorButton, GuiUtil.setConstraints(1,1,0.25,1.0,GridBagConstraints.HORIZONTAL,BORDER_THICKNESS,0,2*BORDER_THICKNESS,0));
  		
  		GridBagConstraints flcl = GuiUtil.setConstraints(2,1,0.25,1.0,GridBagConstraints.NONE,BORDER_THICKNESS,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		flcl.anchor = GridBagConstraints.EAST;
  		footprintPanel.add(footprintLineColorLabel, flcl);
  
  		footprintLineColorButton.setPreferredSize(footprintAlphaSpinner.getPreferredSize());
  		footprintLineColorButton.setBackground(new Color(DisplayForm.DEFAULT_LINE_COLOR, true));
  		footprintLineColorButton.setContentAreaFilled(false);
  		footprintLineColorButton.setOpaque(true);
  		footprintPanel.add(footprintLineColorButton, GuiUtil.setConstraints(3,1,0.25,1.0,GridBagConstraints.HORIZONTAL,BORDER_THICKNESS,0,2*BORDER_THICKNESS,BORDER_THICKNESS));
  
  		GridBagConstraints fhlcb = GuiUtil.setConstraints(0,2,0.5,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,0);
  		fhlcb.anchor = GridBagConstraints.WEST;
  		fhlcb.gridwidth = 2;
  		footprintHighlightingCheckbox.setIconTextGap(10);
  		footprintPanel.add(footprintHighlightingCheckbox, fhlcb);
  
  		GridBagConstraints fhlfcl = GuiUtil.setConstraints(0,3,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		fhlfcl.anchor = GridBagConstraints.EAST;
  		footprintPanel.add(footprintHLFillColorLabel, fhlfcl);
  
  		footprintHLFillColorButton.setPreferredSize(footprintAlphaSpinner.getPreferredSize());
  		footprintHLFillColorButton.setBackground(new Color(DisplayForm.DEFAULT_FILL_HIGHLIGHTED_COLOR, true));
  		footprintHLFillColorButton.setContentAreaFilled(false);
  		footprintHLFillColorButton.setOpaque(true);
  		footprintPanel.add(footprintHLFillColorButton, GuiUtil.setConstraints(1,3,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,0));
  
  		GridBagConstraints fhllcl = GuiUtil.setConstraints(2,3,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		fhllcl.anchor = GridBagConstraints.EAST;
  		footprintPanel.add(footprintHLLineColorLabel, fhllcl);
  
  		footprintHLLineColorButton.setPreferredSize(footprintAlphaSpinner.getPreferredSize());
  		footprintHLLineColorButton.setBackground(new Color(DisplayForm.DEFAULT_LINE_HIGHLIGHTED_COLOR, true));
  		footprintHLLineColorButton.setContentAreaFilled(false);
  		footprintHLLineColorButton.setOpaque(true);
  		footprintPanel.add(footprintHLLineColorButton, GuiUtil.setConstraints(3,3,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,BORDER_THICKNESS));
  
  		geometryPanel = new JPanel();
  		geometryPanel.setLayout(new GridBagLayout());
  		geometryPanel.setBorder(BorderFactory.createTitledBorder(""));
  
  		SpinnerModel galphaValueModel = new SpinnerNumberModel(200, 0, 255, 1);
  		geometryAlphaSpinner = new JSpinner(galphaValueModel);
  		geometryAlphaSpinner.setMinimumSize(new Dimension(geometryAlphaSpinner.getPreferredSize().width, MAX_TEXTFIELD_HEIGHT));
  		geometryAlphaSpinner.setMaximumSize(new Dimension(geometryAlphaSpinner.getPreferredSize().width, MAX_TEXTFIELD_HEIGHT));
  
          GridBagConstraints gal = GuiUtil.setConstraints(0,0,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,BORDER_THICKNESS,BORDER_THICKNESS);
          gal.anchor = GridBagConstraints.EAST;
  		geometryPanel.add(geometryAlphaLabel, gal);
  		geometryPanel.add(geometryAlphaSpinner, GuiUtil.setConstraints(1,0,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,BORDER_THICKNESS,0));
  
  		GridBagConstraints gwcl = GuiUtil.setConstraints(0,1,0.25,1.0,GridBagConstraints.NONE,BORDER_THICKNESS,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		gwcl.anchor = GridBagConstraints.EAST;
  		geometryPanel.add(geometryWallFillColorLabel, gwcl);
  
  		geometryWallFillColorButton.setPreferredSize(geometryAlphaSpinner.getPreferredSize());
  		geometryWallFillColorButton.setBackground(new Color(DisplayForm.DEFAULT_WALL_FILL_COLOR, true));
  		geometryWallFillColorButton.setContentAreaFilled(false);
  		geometryWallFillColorButton.setOpaque(true);
  		geometryPanel.add(geometryWallFillColorButton, GuiUtil.setConstraints(1,1,0.25,1.0,GridBagConstraints.HORIZONTAL,BORDER_THICKNESS,0,2*BORDER_THICKNESS,0));
  		
  		GridBagConstraints grcl = GuiUtil.setConstraints(2,1,0.25,1.0,GridBagConstraints.NONE,BORDER_THICKNESS,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		grcl.anchor = GridBagConstraints.EAST;
  		geometryPanel.add(geometryWallLineColorLabel, grcl);
  
  		geometryWallLineColorButton.setPreferredSize(geometryAlphaSpinner.getPreferredSize());
  		geometryWallLineColorButton.setBackground(new Color(DisplayForm.DEFAULT_WALL_LINE_COLOR, true));
  		geometryWallLineColorButton.setContentAreaFilled(false);
  		geometryWallLineColorButton.setOpaque(true);
  		geometryPanel.add(geometryWallLineColorButton, GuiUtil.setConstraints(3,1,0.25,1.0,GridBagConstraints.HORIZONTAL,BORDER_THICKNESS,0,2*BORDER_THICKNESS,BORDER_THICKNESS));
  /*
  		GridBagConstraints grfcl = GuiUtil.setConstraints(0,2,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		grfcl.anchor = GridBagConstraints.EAST;
  		geometryPanel.add(geometryRoofFillColorLabel, grfcl);
  
  		geometryRoofFillColorButton.setPreferredSize(geometryAlphaSpinner.getPreferredSize());
  		geometryRoofFillColorButton.setBackground(new Color(DisplayForm.DEFAULT_ROOF_FILL_COLOR, true));
  		geometryRoofFillColorButton.setContentAreaFilled(false);
  		geometryRoofFillColorButton.setOpaque(true);
  		geometryPanel.add(geometryRoofFillColorButton, GuiUtil.setConstraints(1,2,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,0));
  
  		GridBagConstraints grlcl = GuiUtil.setConstraints(2,2,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		grlcl.anchor = GridBagConstraints.EAST;
  		geometryPanel.add(geometryRoofLineColorLabel, grlcl);
  		
  		geometryRoofLineColorButton.setPreferredSize(geometryAlphaSpinner.getPreferredSize());
  		geometryRoofLineColorButton.setBackground(new Color(DisplayForm.DEFAULT_ROOF_LINE_COLOR, true));
  		geometryRoofLineColorButton.setContentAreaFilled(false);
  		geometryRoofLineColorButton.setOpaque(true);
  		geometryPanel.add(geometryRoofLineColorButton, GuiUtil.setConstraints(3,2,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,BORDER_THICKNESS));
  */
  		geometryHighlightingCheckbox.setIconTextGap(10);
  		GridBagConstraints ghcb = GuiUtil.setConstraints(0,2,0.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,2*BORDER_THICKNESS,0);
  		ghcb.gridwidth = 2;
  		geometryPanel.add(geometryHighlightingCheckbox, ghcb);
  
  		GridBagConstraints ghlfcl = GuiUtil.setConstraints(0,3,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		ghlfcl.anchor = GridBagConstraints.EAST;
  		geometryPanel.add(geometryHLFillColorLabel, ghlfcl);
  
  		geometryHLFillColorButton.setPreferredSize(geometryAlphaSpinner.getPreferredSize());
  		geometryHLFillColorButton.setBackground(new Color(DisplayForm.DEFAULT_FILL_HIGHLIGHTED_COLOR, true));
  		geometryHLFillColorButton.setContentAreaFilled(false);
  		geometryHLFillColorButton.setOpaque(true);
  		geometryPanel.add(geometryHLFillColorButton, GuiUtil.setConstraints(1,3,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,0));
  
  		GridBagConstraints ghllcl = GuiUtil.setConstraints(2,3,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		ghllcl.anchor = GridBagConstraints.EAST;
  		geometryPanel.add(geometryHLLineColorLabel, ghllcl);
  
  		geometryHLLineColorButton.setPreferredSize(geometryAlphaSpinner.getPreferredSize());
  		geometryHLLineColorButton.setBackground(new Color(DisplayForm.DEFAULT_LINE_HIGHLIGHTED_COLOR, true));
  		geometryHLLineColorButton.setContentAreaFilled(false);
  		geometryHLLineColorButton.setOpaque(true);
  		geometryPanel.add(geometryHLLineColorButton, GuiUtil.setConstraints(3,3,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,BORDER_THICKNESS));
  
  		GridBagConstraints ghdl = GuiUtil.setConstraints(0,4,0.0,1.0,GridBagConstraints.NONE,0,2*BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		ghdl.anchor = GridBagConstraints.EAST;
  		geometryPanel.add(geometryHLSurfaceDistanceLabel, ghdl);
  
  		GridBagConstraints ghdt = GuiUtil.setConstraints(1,4,0.0,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,0);
  		geometryPanel.add(geometryHLSurfaceDistanceText, ghdt);
  
  		colladaPanel = new JPanel();
  		colladaPanel.setLayout(new GridBagLayout());
  		colladaPanel.setBorder(BorderFactory.createTitledBorder(""));
  
  		ignoreSurfaceOrientationCheckbox.setIconTextGap(10);
  		GridBagConstraints isoc = GuiUtil.setConstraints(0,0,0.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,0,0);
  		isoc.gridwidth = 2;
  		colladaPanel.add(ignoreSurfaceOrientationCheckbox, isoc);
  
  		packingAlgorithms.put("BASIC", -1);
  //		packingAlgorithms.put("FFDH", TextureAtlasGenerator.FFDH);
  //		packingAlgorithms.put("NFDH", TextureAtlasGenerator.NFDH);
  		packingAlgorithms.put("SLEA", TextureAtlasGenerator.SLEA);
  		packingAlgorithms.put("TPIM", TextureAtlasGenerator.TPIM);
  		packingAlgorithms.put("TPIM_WO_R", TextureAtlasGenerator.TPIM_WITHOUT_ROTATION);
  
  		for (String algorithm: packingAlgorithms.keySet()) {
  			packingAlgorithmsComboBox.addItem(algorithm);
  		}
  
  		textureAtlasCheckbox.setIconTextGap(10);
  		colladaPanel.add(textureAtlasCheckbox, GuiUtil.setConstraints(0,1,0.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,2,0));
  		colladaPanel.add(packingAlgorithmsComboBox, GuiUtil.setConstraints(1,1,1.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,2,BORDER_THICKNESS));
  
  		textureAtlasPotsCheckbox.setIconTextGap(10);
  		GridBagConstraints tapc = GuiUtil.setConstraints(0,2,0.0,1.0,GridBagConstraints.BOTH,BORDER_THICKNESS,BORDER_THICKNESS + 23,BORDER_THICKNESS,0);
  		tapc.gridwidth = 2;
  		colladaPanel.add(textureAtlasPotsCheckbox, tapc);
  		
  		scaleTexImagesCheckbox.setIconTextGap(10);
  		colladaPanel.add(scaleTexImagesCheckbox, GuiUtil.setConstraints(0,3,0.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,2,0));
  		colladaPanel.add(scaleFactorText, GuiUtil.setConstraints(1,3,1.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,2,BORDER_THICKNESS));
  
  		ButtonGroup colladaRadioGroup = new ButtonGroup();
  		colladaRadioGroup.add(groupObjectsRButton);
  		colladaRadioGroup.add(colladaHighlightingRButton);
  
  		groupObjectsRButton.setIconTextGap(10);
  		colladaPanel.add(groupObjectsRButton, GuiUtil.setConstraints(0,4,0.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,2,0));
  		colladaPanel.add(groupSizeText, GuiUtil.setConstraints(1,4,1.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,2,BORDER_THICKNESS));
  
  		colladaHighlightingRButton.setIconTextGap(10);
  		GridBagConstraints chrb = GuiUtil.setConstraints(0,5,0.0,1.0,GridBagConstraints.BOTH,0,BORDER_THICKNESS,2*BORDER_THICKNESS,0);
  		chrb.gridwidth = 2;
  		colladaPanel.add(colladaHighlightingRButton, chrb);
  
  		JPanel colladaHLSubPanel = new JPanel();
  		colladaHLSubPanel.setLayout(new GridBagLayout());
  		GridBagConstraints chlsp = GuiUtil.setConstraints(0,6,0.0,1.0,GridBagConstraints.BOTH,0,0,0,0);
  		chlsp.gridwidth = 2;
  		colladaPanel.add(colladaHLSubPanel, chlsp);
  		
  		GridBagConstraints chlfcl = GuiUtil.setConstraints(0,0,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		chlfcl.anchor = GridBagConstraints.EAST;
  		colladaHLSubPanel.add(colladaHLFillColorLabel, chlfcl);
  
  		colladaHLFillColorButton.setPreferredSize(geometryAlphaSpinner.getPreferredSize());
  		colladaHLFillColorButton.setBackground(new Color(DisplayForm.DEFAULT_FILL_HIGHLIGHTED_COLOR, true));
  		colladaHLFillColorButton.setContentAreaFilled(false);
  		colladaHLFillColorButton.setOpaque(true);
  		colladaHLSubPanel.add(colladaHLFillColorButton, GuiUtil.setConstraints(1,0,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,0));
  
  		GridBagConstraints chllcl = GuiUtil.setConstraints(2,0,0.25,1.0,GridBagConstraints.NONE,0,BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		chllcl.anchor = GridBagConstraints.EAST;
  		colladaHLSubPanel.add(colladaHLLineColorLabel, chllcl);
  
  		colladaHLLineColorButton.setPreferredSize(geometryAlphaSpinner.getPreferredSize());
  		colladaHLLineColorButton.setBackground(new Color(DisplayForm.DEFAULT_LINE_HIGHLIGHTED_COLOR, true));
  		colladaHLLineColorButton.setContentAreaFilled(false);
  		colladaHLLineColorButton.setOpaque(true);
  		colladaHLSubPanel.add(colladaHLLineColorButton, GuiUtil.setConstraints(3,0,0.25,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,BORDER_THICKNESS));
  		
  		GridBagConstraints chldl = GuiUtil.setConstraints(0,1,0.0,1.0,GridBagConstraints.NONE,0,2*BORDER_THICKNESS,2*BORDER_THICKNESS,BORDER_THICKNESS);
  		chldl.anchor = GridBagConstraints.EAST;
  		colladaHLSubPanel.add(colladaHLSurfaceDistanceLabel, chldl);
  
  		GridBagConstraints chldt = GuiUtil.setConstraints(1,1,0.0,1.0,GridBagConstraints.HORIZONTAL,0,0,2*BORDER_THICKNESS,0);
  		colladaHLSubPanel.add(colladaHLSurfaceDistanceText, chldt);
  	
  		PopupMenuDecorator.getInstance().decorate(geometryHLSurfaceDistanceText, scaleFactorText, 
  				groupSizeText, colladaHLSurfaceDistanceText);
  		
  		scaleTexImagesCheckbox.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				scaleFactorText.setEnabled(scaleTexImagesCheckbox.isSelected());
  			}
  		});
  
  		groupObjectsRButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				setEnabledHighlighting();
  			}
  		});
  
  		colladaHighlightingRButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				setEnabledHighlighting();
  			}
  		});
  
  		footprintFillColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color fillColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseFillColor"),
  						footprintFillColorButton.getBackground());
  				if (fillColor != null)
  					footprintFillColorButton.setBackground(fillColor);
  			}
  		});
  
  		footprintLineColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color lineColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseLineColor"),
  						footprintLineColorButton.getBackground());
  				if (lineColor != null)
  					footprintLineColorButton.setBackground(lineColor);
  			}
  		});
  
  		footprintHighlightingCheckbox.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				setEnabledHighlighting();
  			}
  		});
  
  		footprintHLFillColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color hlFillColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseHighlightedFillColor"),
  						footprintHLFillColorButton.getBackground());
  				if (hlFillColor != null)
  					footprintHLFillColorButton.setBackground(hlFillColor);
  			}
  		});
  
  		footprintHLLineColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color hlLineColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseHighlightedLineColor"),
  						footprintHLLineColorButton.getBackground());
  				if (hlLineColor != null)
  					footprintHLLineColorButton.setBackground(hlLineColor);
  			}
  		});
  
  		geometryWallFillColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color wallFillColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseWallFillColor"),
  						geometryWallFillColorButton.getBackground());
  				if (wallFillColor != null)
  					geometryWallFillColorButton.setBackground(wallFillColor);
  			}
  		});
  
  		geometryWallLineColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color wallLineColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseWallLineColor"),
  						geometryWallLineColorButton.getBackground());
  				if (wallLineColor != null)
  					geometryWallLineColorButton.setBackground(wallLineColor);
  			}
  		});
  /*
  		geometryRoofFillColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color roofFillColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseRoofFillColor"),
  						geometryRoofFillColorButton.getBackground());
  				if (roofFillColor != null)
  					geometryRoofFillColorButton.setBackground(roofFillColor);
  			}
  		});
  
  		geometryRoofLineColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color roofLineColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseRoofLineColor"),
  						geometryRoofLineColorButton.getBackground());
  				if (roofLineColor != null)
  					geometryRoofLineColorButton.setBackground(roofLineColor);
  			}
  		});
  */
  		geometryHighlightingCheckbox.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				setEnabledHighlighting();
  			}
  		});
  
  		geometryHLFillColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color hlFillColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseHighlightedFillColor"),
  						geometryHLFillColorButton.getBackground());
  				if (hlFillColor != null)
  					geometryHLFillColorButton.setBackground(hlFillColor);
  			}
  		});
  
  		geometryHLLineColorButton.addActionListener(new ActionListener() {
  			public void actionPerformed(ActionEvent e) {
  				Color hlLineColor = chooseColor(Internal.I18N.getString("pref.kmlexport.label.chooseHighlightedLineColor"),
  						geometryHLLineColorButton.getBackground());
  