126 private JCheckBox showFullDescriptionCheckBox; 127 private JCheckBox useFileViewCheckBox; 128 private JCheckBox useFileSystemViewCheckBox; 129 private JCheckBox accessoryCheckBox; 130 private JCheckBox setHiddenCheckBox; 131 private JCheckBox useEmbedInWizardCheckBox; 132 private JCheckBox useControlsCheckBox; 133 private JCheckBox enableDragCheckBox; 134 private JRadioButton singleSelectionRadioButton; 135 private JRadioButton multiSelectionRadioButton; 136 private JRadioButton openRadioButton; 137 private JRadioButton saveRadioButton; 138 private JRadioButton customButton; 139 private JComboBox lafComboBox; 140 private JRadioButton justFilesRadioButton; 141 private JRadioButton justDirectoriesRadioButton; 142 private JRadioButton bothFilesAndDirectoriesRadioButton; 143 private JTextField customField; 144 private final ExampleFileView fileView; 145 private final ExampleFileSystemView fileSystemView; 146 private final static Dimension hpad10 = new Dimension(10, 1); 147 private final static Dimension vpad20 = new Dimension(1, 20); 148 private final static Dimension vpad7 = new Dimension(1, 7); 149 private final static Dimension vpad4 = new Dimension(1, 4); 150 private final static Insets insets = new Insets(5, 10, 0, 10); 151 private final FilePreviewer previewer; 152 private final JFileChooser chooser; 153 154 @SuppressWarnings("LeakingThisInConstructor") 155 public FileChooserDemo() { 156 UIManager.LookAndFeelInfo[] installedLafs = UIManager. 157 getInstalledLookAndFeels(); 158 for (UIManager.LookAndFeelInfo lafInfo : installedLafs) { 159 try { 160 Class<?> lnfClass = Class.forName(lafInfo.getClassName()); 161 LookAndFeel laf = (LookAndFeel) (lnfClass.newInstance()); 162 if (laf.isSupportedLookAndFeel()) { 163 String name = lafInfo.getName(); 164 SupportedLaF supportedLaF = new SupportedLaF(name, laf); 165 supportedLaFs.add(supportedLaF); 166 if (NIMBUS_LAF_NAME.equals(name)) { 167 nimbusLaF = supportedLaF; 168 } 169 } 170 } catch (Exception ignored) { | 126 private JCheckBox showFullDescriptionCheckBox; 127 private JCheckBox useFileViewCheckBox; 128 private JCheckBox useFileSystemViewCheckBox; 129 private JCheckBox accessoryCheckBox; 130 private JCheckBox setHiddenCheckBox; 131 private JCheckBox useEmbedInWizardCheckBox; 132 private JCheckBox useControlsCheckBox; 133 private JCheckBox enableDragCheckBox; 134 private JRadioButton singleSelectionRadioButton; 135 private JRadioButton multiSelectionRadioButton; 136 private JRadioButton openRadioButton; 137 private JRadioButton saveRadioButton; 138 private JRadioButton customButton; 139 private JComboBox lafComboBox; 140 private JRadioButton justFilesRadioButton; 141 private JRadioButton justDirectoriesRadioButton; 142 private JRadioButton bothFilesAndDirectoriesRadioButton; 143 private JTextField customField; 144 private final ExampleFileView fileView; 145 private final ExampleFileSystemView fileSystemView; 146 private static final Dimension hpad10 = new Dimension(10, 1); 147 private static final Dimension vpad20 = new Dimension(1, 20); 148 private static final Dimension vpad7 = new Dimension(1, 7); 149 private static final Dimension vpad4 = new Dimension(1, 4); 150 private static final Insets insets = new Insets(5, 10, 0, 10); 151 private final FilePreviewer previewer; 152 private final JFileChooser chooser; 153 154 @SuppressWarnings("LeakingThisInConstructor") 155 public FileChooserDemo() { 156 UIManager.LookAndFeelInfo[] installedLafs = UIManager. 157 getInstalledLookAndFeels(); 158 for (UIManager.LookAndFeelInfo lafInfo : installedLafs) { 159 try { 160 Class<?> lnfClass = Class.forName(lafInfo.getClassName()); 161 LookAndFeel laf = (LookAndFeel) (lnfClass.newInstance()); 162 if (laf.isSupportedLookAndFeel()) { 163 String name = lafInfo.getName(); 164 SupportedLaF supportedLaF = new SupportedLaF(name, laf); 165 supportedLaFs.add(supportedLaF); 166 if (NIMBUS_LAF_NAME.equals(name)) { 167 nimbusLaF = supportedLaF; 168 } 169 } 170 } catch (Exception ignored) { |