@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; }
private void createUIComponents() { mainPanel = new JPanel(); mainPanel.setLayout(new GridLayout(0, 1)); this.modelList = new ListTableModel<>( new IconColumn(), new NamespaceColumn(), new ServiceColumn() ); for (Map.Entry<String, Set<String>> entry : this.arguments.entrySet()) { this.modelList.addRow(new ServiceParameter(entry.getKey(), entry.getValue())); } this.tableView = new TableView<>(); this.tableView.setModelAndUpdateColumns(this.modelList); mainPanel.add(ToolbarDecorator.createDecorator(this.tableView) .disableAddAction() .disableDownAction() .disableRemoveAction() .disableUpDownActions() .createPanel() ); }
.disableDownAction() .disableRemoveAction() .disableUpDownActions() .createPanel() );
.disableDownAction() .disableRemoveAction() .disableUpDownActions() .createPanel() );
private JComponent createResourcesTableComponent() { JPanel panelForTable = ToolbarDecorator.createDecorator(myResourcesTable,null). disableUpDownActions(). disableAddAction().disableRemoveAction(). createPanel(); panelForTable.setPreferredSize(new Dimension(-1,400)); return panelForTable; }
private JComponent createJComponent() { JPanel panelForTable = ToolbarDecorator.createDecorator(mySonarResourcesTable, null). setAddAction( addAction() ). setRemoveAction( anActionButton -> TableUtil.removeSelectedItems(mySonarResourcesTable) ) .disableUpDownActions() .createPanel(); panelForTable.setPreferredSize(new Dimension(-1, 100)); return panelForTable; }
public EditableList(String emptyLabel, Supplier<T> onAdd, Function<T, T> onEdit) { this.onAdd = onAdd; this.onEdit = onEdit; list = new JBList(); list.getEmptyText().setText(emptyLabel); list.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent evt) { if (evt.getClickCount() == 2) { editEntry(); } } }); model = new CollectionListModel<>(new ArrayList<>()); list.setModel(model); ToolbarDecorator toolbarDecorator = ToolbarDecorator.createDecorator(list) .setEditActionName("Edit") .setEditAction(e -> editEntry()) .setAddAction(new AddEntryAction()) .setRemoveAction(new RemoveEntryAction()) .disableUpDownActions(); listPanel = new JPanel(new BorderLayout()); listPanel.add(toolbarDecorator.createPanel(), BorderLayout.CENTER); }
.setEditActionName("Edit") .setEditAction(e -> editServer()) .disableUpDownActions();
FileMaskPanel(Set<String> patterns, String textEmpty, String textTitle, String textAddMessage, String textAddTitle, String textEditMessage, String textEditTitle) { this.textAddMessage = textAddMessage; this.textAddTitle = textAddTitle; this.textEditMessage = textEditMessage; this.textEditTitle = textEditTitle; patternList = new JBList<>(patternModels); patternList.setEmptyText(textEmpty); patternPanel = ToolbarDecorator.createDecorator(patternList) .setAddAction(getAddActionButtonRunnable(patterns)) .setRemoveAction(getRemoveActionButtonRunnable(patterns)) .setEditAction(getEditActionButtonRunnable(patterns)) .disableUpDownActions() .createPanel(); patternPanel.setBorder(IdeBorderFactory.createTitledBorder(textTitle)); }
.setAddAction(new AddEntryAction()) .setRemoveAction(new RemoveEntryAction()) .disableUpDownActions();
/** Sets up the the toolbar that appears in the cloud debugger snapshots panel. */ private void configureToolbar() { final ToolbarDecorator decorator = ToolbarDecorator.createDecorator(table) .disableUpDownActions() .disableAddAction() .setToolbarPosition(ActionToolbarPosition.TOP); decorator.setRemoveAction(new RemoveSelectedBreakpointsAction()); decorator.addExtraAction(new RemoveAllBreakpointsAction()); decorator.addExtraAction(new ReactivateBreakpointAction()); this.add(decorator.createPanel()); }
.setText("There are no custom watches for this snapshot location."); final ToolbarDecorator decorator = ToolbarDecorator.createDecorator(treePanel.getTree()).disableUpDownActions(); decorator.setToolbarPosition(ActionToolbarPosition.RIGHT); decorator.setAddAction(