@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; }
myPanel.add(decorator.createPanel(), BorderLayout.CENTER); if (librariesService instanceof GoApplicationLibrariesService) { myUseEnvGoPathCheckBox.addActionListener(event -> {
myPanel.add(decorator.createPanel(), BorderLayout.CENTER); if (librariesService instanceof BallerinaApplicationLibrariesService) { myUseEnvBallerinaPathCheckBox.addActionListener(event -> {
private JPanel buildClassPathPanel() { final ToolbarDecorator pathListDecorator = ToolbarDecorator.createDecorator(pathList); pathListDecorator.setAddAction(new AddPathAction()); pathListDecorator.setEditAction(new EditPathAction()); pathListDecorator.setRemoveAction(new RemovePathAction()); pathListDecorator.setMoveUpAction(new MoveUpPathAction()); pathListDecorator.setMoveDownAction(new MoveDownPathAction()); pathListDecorator.setPreferredSize(DECORATOR_DIMENSIONS); final JPanel container = new JPanel(new BorderLayout()); container.add(new TitledSeparator(CheckStyleBundle.message("config.path.tab")), BorderLayout.NORTH); container.add(pathListDecorator.createPanel(), BorderLayout.CENTER); return container; }
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() ); }
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<MethodParameterSetting>() { @Override public MethodParameterSetting createElement() { //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true); return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> MethodParameterReferenceSettingsForm.this.openTwigPathDialog(MethodParameterReferenceSettingsForm.this.tableView.getSelectedObject()) ); tablePanel.setAddAction(anActionButton -> MethodParameterReferenceSettingsForm.this.openTwigPathDialog(null) ); tablePanel.disableUpAction(); tablePanel.disableDownAction(); this.panelConfigTableView.add(tablePanel.createPanel()); return this.panel1; }
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<MethodSignatureSetting>() { @Override public MethodSignatureSetting createElement() { //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true); return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> MethodSignatureTypeSettingsForm.this.openTwigPathDialog(MethodSignatureTypeSettingsForm.this.tableView.getSelectedObject()) ); tablePanel.setAddAction(anActionButton -> MethodSignatureTypeSettingsForm.this.openTwigPathDialog(null) ); tablePanel.disableUpAction(); tablePanel.disableDownAction(); this.panelConfigTableView.add(tablePanel.createPanel()); return this.panel1; }
.disableRemoveAction() .disableUpDownActions() .createPanel() );
private JPanel buildRuleFilePanel() { setColumnWith(locationTable, 0, ACTIVE_COL_MIN_WIDTH, ACTIVE_COL_MAX_WIDTH, ACTIVE_COL_MAX_WIDTH); setColumnWith(locationTable, 1, DESC_COL_MIN_WIDTH, DESC_COL_MAX_WIDTH, DESC_COL_MAX_WIDTH); locationTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); locationTable.setStriped(true); locationTable.getTableHeader().setReorderingAllowed(false); final ToolbarDecorator tableDecorator = ToolbarDecorator.createDecorator(locationTable); tableDecorator.setAddAction(new AddLocationAction()); tableDecorator.setEditAction(new EditPropertiesAction()); tableDecorator.setRemoveAction(new RemoveLocationAction()); tableDecorator.setEditActionUpdater(new DisableForDefaultUpdater()); tableDecorator.setRemoveActionUpdater(new DisableForDefaultUpdater()); tableDecorator.setPreferredSize(DECORATOR_DIMENSIONS); final JPanel container = new JPanel(new BorderLayout()); container.add(new TitledSeparator(CheckStyleBundle.message("config.file.tab")), BorderLayout.NORTH); container.add(tableDecorator.createPanel(), BorderLayout.CENTER); final JLabel infoLabel = new JLabel(CheckStyleBundle.message("config.file.description"), Icons.icon("/general/information.png"), SwingConstants.LEFT); infoLabel.setBorder(JBUI.Borders.empty(8, 0, 4, 0)); container.add(infoLabel, BorderLayout.SOUTH); return container; }
.disableRemoveAction() .disableUpDownActions() .createPanel() );
this.panel1.add(tablePanel.createPanel()); return this.panel1;
this.panel1.add(tablePanel.createPanel());
private void replaceTreeWithDecorated() { JPanel panel = decorator.createPanel(); treePanel.add(panel); }
tablePanel.disableDownAction(); this.panelTableView.add(tablePanel.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; }
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)); }
/** 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()); }
private JComponent createCheckboxTreeView(ConfigCheckboxTree tree, List<MethodConfig> configs) { ToolbarDecorator decorator = ToolbarDecorator.createDecorator(tree); decorator.setToolbarPosition(ActionToolbarPosition.RIGHT); decorator.setAddAction(new AddNodeActionButton(tree, tempConfiguration, project)); decorator.setRemoveAction(new RemoveNodeActionButton(tree)); decorator.addExtraAction(AnActionButton.fromAction(new CopyAction(tree))); JPanel panel = decorator.createPanel(); tree.initTree(configs); initValidation(); return panel; }
private void createUIComponents() { tableModel = new Model(); analyzerTable = new JBTable(tableModel); analyzerTable.setShowGrid(false); analyzerTable.setIntercellSpacing(JBUI.emptySize()); analyzerTable.getEmptyText().setText("No information"); analyzerTable.setDragEnabled(false); analyzerTable.setShowVerticalLines(false); analyzerTable.getTableHeader().setReorderingAllowed(false); analyzerTable.enableInputMethods(false); analyzerTable.setDefaultRenderer(String.class, new NoFocusCellRenderer(new DefaultTableCellRenderer())); final ToolbarDecorator decorator = ToolbarDecorator.createDecorator(analyzerTable); tablePanel = decorator.createPanel(); }