if (SvgShapePropertiesPanel.fileChooser == null) {
SvgShapePropertiesPanel.fileChooser = new JFileChooser();
// Add a custom file filter and disable the default
SvgShapePropertiesPanel.fileChooser.setAcceptAllFileFilterUsed(true);
// add the optionnal (Accept All) file filter.
SvgShapePropertiesPanel.fileChooser.addChoosableFileFilter(new SvgFileFilter());
// Add the preview pane.
SvgShapePropertiesPanel.fileChooser.setAccessory(new SvgImagePreview(
SvgShapePropertiesPanel.fileChooser));
File svgDirectory = ((SvgShapePropertiesPanel.defaultDirectory != null) && SvgShapePropertiesPanel.defaultDirectory
.exists()) ? SvgShapePropertiesPanel.defaultDirectory