@Nullable @Override public JComponent createComponent() { FormBuilder builder = FormBuilder.createFormBuilder(); myCbShowImportPopup = new JCheckBox(ApplicationBundle.message("checkbox.show.import.popup")); myCbAddUnambiguousImports = new JCheckBox(ApplicationBundle.message("checkbox.add.unambiguous.imports.on.the.fly")); builder.addComponent(myCbShowImportPopup); builder.addComponent(myCbAddUnambiguousImports); JPanel result = new JPanel(new BorderLayout()); result.add(builder.getPanel(), BorderLayout.NORTH); if (myIsDialog) { result.setPreferredSize(new Dimension(300, -1)); } return result; }
@Nullable @Override public JComponent createComponent() { FormBuilder builder = FormBuilder.createFormBuilder(); myCbShowImportPopup = new JCheckBox(ApplicationBundle.message("checkbox.show.import.popup")); myCbAddUnambiguousImports = new JCheckBox(ApplicationBundle.message("checkbox.add.unambiguous.imports.on.the.fly")); builder.addComponent(myCbShowImportPopup); builder.addComponent(myCbAddUnambiguousImports); myExcludePackagesList = new JBList(); JComponent excludedPanel = new JPanel(new BorderLayout()); excludedPanel.add(ToolbarDecorator.createDecorator(myExcludePackagesList) .setAddAction(new AddImportExclusionAction()).disableUpDownActions().createPanel(), BorderLayout.CENTER); excludedPanel.setBorder(IdeBorderFactory.createTitledBorder(ApplicationBundle.message("exclude.from.completion.group"), true)); if (!myIsDefaultProject) { builder.addComponent(excludedPanel); } JPanel result = new JPanel(new BorderLayout()); result.add(builder.getPanel(), BorderLayout.NORTH); if (myIsDialog) result.setPreferredSize(new Dimension(300, -1)); return result; }