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 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; }
.disableDownAction() .disableUpAction() .setPreferredSize(JBUI.size(0, PerlConfigurationUtil.WIDGET_HEIGHT)) .createPanel();
.setPreferredSize(JBUI.size(0, WIDGET_HEIGHT)) .createPanel();
protected void createAutobaseNamesComponent(FormBuilder builder) { autobaseModel = new CollectionListModel<>(); autobaseList = new JBList<>(autobaseModel); builder.addLabeledComponent( new JLabel("Autobase names (autobase_names option. Order is important, later components may be inherited from early):"), ToolbarDecorator .createDecorator(autobaseList) .setAddAction(anActionButton -> { String fileName = Messages.showInputDialog( myProject, "Type new Autobase filename:", "New Autobase Filename", Messages.getQuestionIcon(), "", null); if (StringUtil.isNotEmpty(fileName) && !autobaseModel.getItems().contains(fileName)) { autobaseModel.add(fileName); } }) .setPreferredSize(JBUI.size(0, PerlConfigurationUtil.WIDGET_HEIGHT)) .createPanel()); } }
.disableDownAction() .disableUpAction() .setPreferredSize(JBUI.size(0, PerlConfigurationUtil.WIDGET_HEIGHT)) .createPanel() );
.disableDownAction() .disableUpAction() .setPreferredSize(JBUI.size(0, PerlConfigurationUtil.WIDGET_HEIGHT)) .createPanel()