Java Code Examples for com.intellij.ui.components.JBScrollPane#setViewportView()

The following examples show how to use com.intellij.ui.components.JBScrollPane#setViewportView() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlazeSelectWorkspaceControl.java    From intellij with Apache License 2.0 6 votes vote down vote up
private JPanel getSideBar() {
  // initially generated by IntelliJ IDEA GUI Designer
  JPanel sidebar = new JPanel(new GridLayoutManager(1, 1, JBUI.emptyInsets(), -1, -1));
  sidebar.putClientProperty("BorderFactoryClass", PlainSmallWithoutIndent.class.getName());
  JBScrollPane scrollPane = new JBScrollPane();
  scrollPane.setViewportView(workspaceTypeList);
  sidebar.add(
      scrollPane,
      new GridConstraints(
          0,
          0,
          1,
          1,
          GridConstraints.ANCHOR_CENTER,
          GridConstraints.FILL_BOTH,
          GridConstraints.SIZEPOLICY_FIXED,
          GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
          null,
          null,
          null,
          0,
          false));
  return sidebar;
}
 
Example 2
Source File: TfsTreeForm.java    From azure-devops-intellij with MIT License 6 votes vote down vote up
/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
    final JBScrollPane jBScrollPane1 = new JBScrollPane();
    contentPane.add(jBScrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    tree = new Tree();
    jBScrollPane1.setViewportView(tree);
    pathField = new JTextField();
    pathField.setEditable(false);
    contentPane.add(pathField, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
    messagePanel = new JPanel();
    messagePanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
    contentPane.add(messagePanel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
    final Spacer spacer1 = new Spacer();
    messagePanel.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(11, 10), null, 0, false));
    messageLabel = new JLabel();
    messageLabel.setText("Label");
    messagePanel.add(messageLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
}
 
Example 3
Source File: SqlEditorPanel.java    From CodeGen with MIT License 5 votes vote down vote up
private void createUIComponents() {
    // TODO: place custom component creation code here
    rootPanel = new JPanel();
    sqlPanel = new JPanel();
    sqlPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    sqlPanel.setPreferredSize(JBUI.size(600, 360));
    // 设置 sql text editor
    Document document = EditorFactory.getInstance().createDocument("");
    sqlTextArea = EditorFactory.getInstance().createEditor(document, ideaContext.getProject(), FileProviderFactory.getFileType("SQL"), false);

    sqlScrollPane = new JBScrollPane();
    sqlScrollPane.setViewportView(sqlTextArea.getComponent());
}
 
Example 4
Source File: CourseTabFactory.java    From tmc-intellij with MIT License 5 votes vote down vote up
public void createCourseSpecificTab(
        ObjectFinder finder,
        ProjectOpener opener,
        String course,
        JTabbedPane tabbedPaneBase,
        CourseAndExerciseManager courseAndExerciseManager) {
    logger.info("Creating course specific tab. @CourseTabFactory");
    final JBScrollPane panel = new JBScrollPane();
    final JBList list = new JBList();
    list.setCellRenderer(new ProjectListRenderer());

    DefaultListModel defaultListModel = new DefaultListModel();
    panel.setBorder(BorderFactory.createTitledBorder(""));

    ProjectListManagerHolder.get()
            .addExercisesToList(finder, course, defaultListModel, courseAndExerciseManager);

    if (defaultListModel.getSize() <= 0) {
        return;
    }

    list.setName(course);
    list.setModel(defaultListModel);

    MouseListener mouseListener = createMouseListenerForWindow(opener, panel, list);
    list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    list.addMouseListener(mouseListener);

    panel.setName(course);
    panel.setViewportView(list);

    ProjectListManagerHolder.get().addList(list);
    tabbedPaneBase.addTab(course, panel);
    tabbedPaneBase.addMouseListener(tabMouseListener(tabbedPaneBase));
    setScrollBarToBottom(course, tabbedPaneBase, panel);
}
 
Example 5
Source File: ResolveConflictsForm.java    From azure-devops-intellij with MIT License 5 votes vote down vote up
/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    myContentPanel = new JPanel();
    myContentPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
    myContentPanel.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
    myAcceptYoursButton = new JButton();
    myAcceptYoursButton.setEnabled(false);
    myAcceptYoursButton.setText("Accept Yours");
    myAcceptYoursButton.setMnemonic('Y');
    myAcceptYoursButton.setDisplayedMnemonicIndex(7);
    panel1.add(myAcceptYoursButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final Spacer spacer1 = new Spacer();
    panel1.add(spacer1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    myAcceptTheirsButton = new JButton();
    myAcceptTheirsButton.setEnabled(false);
    myAcceptTheirsButton.setText("Accept Theirs");
    myAcceptTheirsButton.setMnemonic('T');
    myAcceptTheirsButton.setDisplayedMnemonicIndex(7);
    panel1.add(myAcceptTheirsButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myMergeButton = new JButton();
    myMergeButton.setEnabled(false);
    myMergeButton.setText("Merge");
    myMergeButton.setMnemonic('M');
    myMergeButton.setDisplayedMnemonicIndex(0);
    panel1.add(myMergeButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JBScrollPane jBScrollPane1 = new JBScrollPane();
    myContentPanel.add(jBScrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    myItemsTable = new JBTable();
    myItemsTable.putClientProperty("Table.isFileList", Boolean.FALSE);
    jBScrollPane1.setViewportView(myItemsTable);
}
 
Example 6
Source File: ManageWorkspacesForm.java    From azure-devops-intellij with MIT License 5 votes vote down vote up
/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    createUIComponents();
    contentPane = new JPanel();
    contentPane.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1));
    final JBScrollPane jBScrollPane1 = new JBScrollPane();
    contentPane.add(jBScrollPane1, new GridConstraints(0, 0, 3, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    jBScrollPane1.setViewportView(treeTable);
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
    contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
    panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("Tfvc.ManageWorkspaces.Accounts.Panel.Title")));
    reloadWorkspacesButton = new JButton();
    this.$$$loadButtonText$$$(reloadWorkspacesButton, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("Tfvc.ManageWorkspaces.Reload.Button"));
    panel1.add(reloadWorkspacesButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    proxySettingsButton = new JButton();
    this.$$$loadButtonText$$$(proxySettingsButton, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("Tfvc.ManageWorkspaces.Proxy.Button"));
    panel1.add(proxySettingsButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    workspacesPanel = new JPanel();
    workspacesPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
    contentPane.add(workspacesPanel, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
    workspacesPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("Tfvc.ManageWorkspaces.Workspaces.Panel.Title")));
    editWorkspaceButton = new JButton();
    this.$$$loadButtonText$$$(editWorkspaceButton, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("Tfvc.ManageWorkspaces.Edit.Button"));
    workspacesPanel.add(editWorkspaceButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    deleteWorkspaceButton = new JButton();
    this.$$$loadButtonText$$$(deleteWorkspaceButton, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("Tfvc.ManageWorkspaces.Delete.Button"));
    workspacesPanel.add(deleteWorkspaceButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final Spacer spacer1 = new Spacer();
    contentPane.add(spacer1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
}
 
Example 7
Source File: ArrangementRuleAliasesPanel.java    From consulo with Apache License 2.0 5 votes vote down vote up
public ArrangementRuleAliasesPanel(@Nonnull ArrangementStandardSettingsManager settingsManager,
                                   @Nonnull ArrangementColorsProvider colorsProvider) {
  super(new GridBagLayout());
  setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 5));
  JBScrollPane scrollPane = new JBScrollPane();
  final JViewport viewport = scrollPane.getViewport();
  ArrangementMatchingRulesControl.RepresentationCallback callback = new ArrangementMatchingRulesControl.RepresentationCallback() {
    @Override
    public void ensureVisible(@Nonnull Rectangle r) {
      Rectangle visibleRect = viewport.getViewRect();
      if (r.y <= visibleRect.y) {
        return;
      }

      int excessiveHeight = r.y + r.height - (visibleRect.y + visibleRect.height);
      if (excessiveHeight <= 0) {
        return;
      }

      int verticalShift = Math.min(r.y - visibleRect.y, excessiveHeight);
      if (verticalShift > 0) {
        viewport.setViewPosition(new Point(visibleRect.x, visibleRect.y + verticalShift));
      }
    }
  };
  myControl = new ArrangementRuleAliasControl(settingsManager, colorsProvider, callback);
  scrollPane.setViewportView(myControl);
  CustomizationUtil.installPopupHandler(
          myControl, ArrangementConstants.ALIAS_RULE_CONTEXT_MENU, ArrangementConstants.ALIAS_RULE_CONTROL_PLACE
  );

  TitleWithToolbar top = new TitleWithToolbar(
          ApplicationBundle.message("arrangement.settings.section.rule.sequence"),
          ArrangementConstants.ALIAS_RULE_CONTROL_TOOLBAR,
          ArrangementConstants.ALIAS_RULE_CONTROL_TOOLBAR_PLACE,
          myControl
  );
  add(top, new GridBag().coverLine().fillCellHorizontally().weightx(1));
  add(scrollPane, new GridBag().fillCell().weightx(1).weighty(1).insets(0, ArrangementConstants.HORIZONTAL_PADDING, 0, 0));
}
 
Example 8
Source File: AboutTmcDialog.java    From tmc-intellij with MIT License 4 votes vote down vote up
private void initComponents() {
    headerLabel = new JLabel();
    closeButton = new JButton();
    infoScrollPane = new JBScrollPane();
    infoTextPane = new JTextPane();

    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    setMaximumSize(new Dimension(466, 280));
    setMinimumSize(new Dimension(466, 280));
    setResizable(false);

    headerLabel.setFont(new Font("Ubuntu", 1, 20));

    closeButton.addActionListener(
            new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    closeButtonActionPerformed(e);
                }
            });

    infoTextPane.setEditable(false);
    infoTextPane.setContentType("text/html");

    infoScrollPane.setViewportView(infoTextPane);

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(
                            layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                            layout.createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment
                                                                    .LEADING)
                                                    .addComponent(
                                                            infoScrollPane,
                                                            javax.swing.GroupLayout
                                                                    .PREFERRED_SIZE,
                                                            0,
                                                            Short.MAX_VALUE)
                                                    .addGroup(
                                                            javax.swing.GroupLayout.Alignment
                                                                    .TRAILING,
                                                            layout.createSequentialGroup()
                                                                    .addGap(
                                                                            0,
                                                                            0,
                                                                            Short.MAX_VALUE)
                                                                    .addComponent(closeButton))
                                                    .addGroup(
                                                            layout.createSequentialGroup()
                                                                    .addComponent(headerLabel)
                                                                    .addGap(
                                                                            0,
                                                                            248,
                                                                            Short.MAX_VALUE)))
                                    .addContainerGap()));

    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(headerLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(infoScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(closeButton)
                .addContainerGap())
    );

    pack();
}
 
Example 9
Source File: CourseCard.java    From tmc-intellij with MIT License 4 votes vote down vote up
/**
 * This method is called from within the constructor to initialize the form. WARNING: Do NOT
 * modify this code. The content of this method is always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    titleLabel = new JLabel();
    nameLabel = new JLabel();
    infoScrollPane = new JBScrollPane();
    informationLabel = new JTextArea();

    setBackground(new Color(255, 255, 255));
    setMaximumSize(new Dimension(332, 73));
    setMinimumSize(new Dimension(332, 73));
    setPreferredSize(new Dimension(346, 107));

    titleLabel.setFont(new Font("Ubuntu", 1, 18)); // NOI18N

    nameLabel.setForeground(new Color(150, 150, 150));

    infoScrollPane.setBackground(new Color(255, 255, 255));
    infoScrollPane.setBorder(BorderFactory.createEmptyBorder(2, 10, 2, 10));
    infoScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    infoScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
    infoScrollPane.setViewportBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    infoScrollPane.setHorizontalScrollBar(null);
    infoScrollPane.setPreferredSize(new Dimension(106, 30));

    informationLabel.setEditable(false);
    informationLabel.setBackground(new Color(255, 255, 255));
    informationLabel.setLineWrap(true);
    informationLabel.setWrapStyleWord(true);
    informationLabel.setAutoscrolls(false);
    informationLabel.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    informationLabel.setMaximumSize(null);
    infoScrollPane.setViewportView(informationLabel);

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(
                            layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                            layout.createParallelGroup(
                                                GroupLayout.Alignment.LEADING)
                                                    .addGroup(
                                                            layout.createSequentialGroup()
                                                                    .addComponent(titleLabel)
                                                                    .addPreferredGap(
                                                                            LayoutStyle
                                                                                    .ComponentPlacement
                                                                                    .RELATED,
                                                                            155,
                                                                            Short.MAX_VALUE)
                                                                    .addComponent(nameLabel))
                                                    .addComponent(
                                                            infoScrollPane,
                                                            GroupLayout.DEFAULT_SIZE,
                                                            GroupLayout.DEFAULT_SIZE,
                                                            Short.MAX_VALUE))
                                    .addContainerGap()));
    layout.setVerticalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(
                            layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                            layout.createParallelGroup(
                                                GroupLayout.Alignment.BASELINE)
                                                    .addComponent(titleLabel)
                                                    .addComponent(nameLabel))
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(
                                            infoScrollPane,
                                            GroupLayout.PREFERRED_SIZE,
                                            40,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
}
 
Example 10
Source File: TextQuestionPanel.java    From tmc-intellij with MIT License 4 votes vote down vote up
/**
 * This method is called from within the constructor to initialize the form. WARNING: Do NOT
 * modify this code. The content of this method is always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
private void initComponents() {
    logger.info("Initializing components for TextQuestionPanel " + "@TextQuestionPanel");

    questionLabel = new javax.swing.JLabel();
    //textAreaScrollPane = new javax.swing.JScrollPane();
    textAreaScrollPane = new JBScrollPane();
    answerTextArea = new javax.swing.JTextArea();

    //questionLabel.setText(org.openide.util.NbBundle.getMessage(TextQuestionPanel.class, "TextQuestionPanel.questionLabel.text")); // NOI18N
    questionLabel.setText("Teting testing TextQuestionPanle"); // NOI18N

    answerTextArea.setColumns(20);
    answerTextArea.setLineWrap(true);
    answerTextArea.setRows(5);
    answerTextArea.setWrapStyleWord(true);
    textAreaScrollPane.setViewportView(answerTextArea);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                            layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                            layout.createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment
                                                                    .LEADING)
                                                    .addComponent(
                                                            textAreaScrollPane,
                                                            javax.swing.GroupLayout
                                                                    .DEFAULT_SIZE,
                                                            362,
                                                            Short.MAX_VALUE)
                                                    .addComponent(questionLabel))
                                    .addContainerGap()));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                            layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(questionLabel)
                                    .addPreferredGap(
                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                            textAreaScrollPane,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            82,
                                            Short.MAX_VALUE)
                                    .addContainerGap()));
}
 
Example 11
Source File: ApplyLabelForm.java    From azure-devops-intellij with MIT License 4 votes vote down vote up
/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new GridLayoutManager(8, 1, new Insets(0, 0, 0, 0), -1, -1));
    final JLabel label1 = new JLabel();
    this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("ApplyLabelDialog.NameLabel"));
    contentPane.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    nameText = new JTextField();
    contentPane.add(nameText, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
    final JLabel label2 = new JLabel();
    this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("ApplyLabelDialog.CommentLabel"));
    contentPane.add(label2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JLabel label3 = new JLabel();
    this.$$$loadLabelText$$$(label3, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("ApplyLabelDialog.ItemsLabel"));
    contentPane.add(label3, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
    contentPane.add(panel1, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
    addButton = new JButton();
    this.$$$loadButtonText$$$(addButton, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("ApplyLabelDialog.AddButton"));
    panel1.add(addButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final Spacer spacer1 = new Spacer();
    panel1.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
    removeButton = new JButton();
    removeButton.setEnabled(false);
    this.$$$loadButtonText$$$(removeButton, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("ApplyLabelDialog.RemoveButton"));
    panel1.add(removeButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JBScrollPane jBScrollPane1 = new JBScrollPane();
    contentPane.add(jBScrollPane1, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(-1, 250), null, 0, false));
    itemsTable = new JBTable();
    jBScrollPane1.setViewportView(itemsTable);
    final JBScrollPane jBScrollPane2 = new JBScrollPane();
    contentPane.add(jBScrollPane2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    commentTextArea = new JTextArea();
    commentTextArea.setRows(4);
    jBScrollPane2.setViewportView(commentTextArea);
    recursiveCheckBox = new JCheckBox();
    recursiveCheckBox.setSelected(true);
    this.$$$loadButtonText$$$(recursiveCheckBox, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("ApplyLabelDialog.RecursiveCheckBox"));
    contentPane.add(recursiveCheckBox, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    label1.setLabelFor(nameText);
}
 
Example 12
Source File: WorkspaceForm.java    From azure-devops-intellij with MIT License 4 votes vote down vote up
/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL
 */
private void $$$setupUI$$$() {
    createUIComponents();
    contentPane = new JPanel();
    contentPane.setLayout(new GridLayoutManager(9, 2, new Insets(0, 0, 0, 0), -1, -1));
    final JLabel label1 = new JLabel();
    this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("WorkspaceDialog.Name"));
    contentPane.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    name = new JTextField();
    contentPane.add(name, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
    final JLabel label2 = new JLabel();
    this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("WorkspaceDialog.Server"));
    contentPane.add(label2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    server = new JLabel();
    server.setText("https://");
    contentPane.add(server, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JLabel label3 = new JLabel();
    this.$$$loadLabelText$$$(label3, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("WorkspaceDialog.Owner"));
    contentPane.add(label3, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    owner = new JLabel();
    owner.setText("domain\\user");
    contentPane.add(owner, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JLabel label4 = new JLabel();
    this.$$$loadLabelText$$$(label4, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("WorkspaceDialog.Computer"));
    contentPane.add(label4, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    computer = new JLabel();
    computer.setText("localhost");
    contentPane.add(computer, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JLabel label5 = new JLabel();
    this.$$$loadLabelText$$$(label5, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("WorkspaceDialog.Comment"));
    contentPane.add(label5, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JBScrollPane jBScrollPane1 = new JBScrollPane();
    contentPane.add(jBScrollPane1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    comment = new JTextArea();
    comment.setLineWrap(true);
    comment.setRows(3);
    comment.setText("");
    jBScrollPane1.setViewportView(comment);
    workingFoldersLabel = new JLabel();
    this.$$$loadLabelText$$$(workingFoldersLabel, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("WorkspaceDialog.WorkingFolders"));
    contentPane.add(workingFoldersLabel, new GridConstraints(7, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final Spacer spacer1 = new Spacer();
    contentPane.add(spacer1, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(-1, 10), null, 0, false));
    final JLabel label6 = new JLabel();
    this.$$$loadLabelText$$$(label6, ResourceBundle.getBundle("com/microsoft/alm/plugin/idea/ui/tfplugin").getString("WorkspaceDialog.Location"));
    contentPane.add(label6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    location = new ComboBox();
    location.setEditable(false);
    contentPane.add(location, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    contentPane.add(workingFolderPanel, new GridConstraints(8, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
    label1.setLabelFor(name);
    label5.setLabelFor(comment);
    label6.setLabelFor(name);
}
 
Example 13
Source File: MainWindowBase.java    From KodeBeagle with Apache License 2.0 4 votes vote down vote up
@Override
public final void createToolWindowContent(final Project project, final ToolWindow toolWindow) {

    initSystemInfo();
    DefaultMutableTreeNode root = new DefaultMutableTreeNode(PROJECTS);
    JTree jTree = new Tree(root);
    jTree.setRootVisible(false);
    jTree.setAutoscrolls(true);

    if (!propertiesComponent.isValueSet(Identity.BEAGLE_ID)) {
        windowObjects.setBeagleId(UUID.randomUUID().toString());
        propertiesComponent.setValue(Identity.BEAGLE_ID,
                windowObjects.getBeagleId());
    } else {
        windowObjects.setBeagleId(propertiesComponent.getValue(Identity.BEAGLE_ID));
    }

    Document document = new DocumentImpl("", true, false);
    Editor windowEditor =
            EditorFactory.getInstance().createEditor(
                    document, project, FileTypeManager.getInstance()
                            .getFileTypeByExtension(JAVA),
                    false);
    //Dispose the editor once it's no longer needed
    windowEditorOps.releaseEditor(project, windowEditor);
    windowObjects.setTree(jTree);
    windowObjects.setWindowEditor(windowEditor);

    final JComponent toolBar = setUpToolBar();

    JBScrollPane jTreeScrollPane = new JBScrollPane();
    jTreeScrollPane.getViewport().setBackground(JBColor.white);
    jTreeScrollPane.setAutoscrolls(true);
    jTreeScrollPane.setBackground(JBColor.white);
    windowObjects.setJTreeScrollPane(jTreeScrollPane);

    final JSplitPane jSplitPane = new JSplitPane(
            JSplitPane.VERTICAL_SPLIT, jTreeScrollPane, windowEditor.getComponent());
    jSplitPane.setResizeWeight(DIVIDER_LOCATION);

    JPanel editorPanel = new JPanel();
    editorPanel.setOpaque(true);
    editorPanel.setBackground(JBColor.white);
    editorPanel.setLayout(new BoxLayout(editorPanel, BoxLayout.Y_AXIS));

    final JBScrollPane editorScrollPane = new JBScrollPane();
    editorScrollPane.getViewport().setBackground(JBColor.white);
    editorScrollPane.setViewportView(editorPanel);
    editorScrollPane.setPreferredSize(new Dimension(EDITOR_SCROLL_PANE_WIDTH,
            EDITOR_SCROLL_PANE_HEIGHT));
    editorScrollPane.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
    editorScrollPane.setHorizontalScrollBarPolicy(JBScrollPane.HORIZONTAL_SCROLLBAR_NEVER);

    windowObjects.setPanel(editorPanel);

    final JTabbedPane jTabbedPane = new JBTabbedPane();
    jTabbedPane.add(SPOTLIGHT_TAB, editorScrollPane);
    jTabbedPane.add(ALL_TAB, jSplitPane);
    windowObjects.setjTabbedPane(jTabbedPane);
    final Editor projectEditor = FileEditorManager.getInstance(project).getSelectedTextEditor();
    // Display initial help information here.
    if (projectEditor != null) {
        uiUtils.showHelpInfo(RefreshActionBase.HELP_MESSAGE_NO_SELECTED_CODE);
    } else {
        uiUtils.showHelpInfo(RefreshActionBase.EDITOR_ERROR);
    }
    final JPanel mainPanel = new JPanel();
    mainPanel.setLayout((new BoxLayout(mainPanel, BoxLayout.Y_AXIS)));
    mainPanel.add(toolBar);
    mainPanel.add(jTabbedPane);

    if (!LegalNotice.isLegalNoticeAccepted()) {
        new LegalNotice(project).showLegalNotice();
    }
    toolWindow.getComponent().getParent().add(mainPanel);
}
 
Example 14
Source File: DetailsPanel.java    From consulo with Apache License 2.0 4 votes vote down vote up
DetailsPanel(@Nonnull VcsLogData logData,
             @Nonnull VcsLogColorManager colorManager,
             @Nonnull Disposable parent) {
  myLogData = logData;
  myColorManager = colorManager;

  myScrollPane = new JBScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  myMainContentPanel = new ScrollablePanel() {
    @Override
    public boolean getScrollableTracksViewportWidth() {
      boolean expanded = false;
      for (Component c : getComponents()) {
        if (c instanceof CommitPanel && ((CommitPanel)c).isExpanded()) {
          expanded = true;
          break;
        }
      }
      return !expanded;
    }

    @Override
    public Dimension getPreferredSize() {
      Dimension preferredSize = super.getPreferredSize();
      int height = Math.max(preferredSize.height, myScrollPane.getViewport().getHeight());
      JBScrollPane scrollPane = UIUtil.getParentOfType(JBScrollPane.class, this);
      if (scrollPane == null || getScrollableTracksViewportWidth()) {
        return new Dimension(preferredSize.width, height);
      }
      else {
        return new Dimension(Math.max(preferredSize.width, scrollPane.getViewport().getWidth()), height);
      }
    }

    @Override
    public Color getBackground() {
      return CommitPanel.getCommitDetailsBackground();
    }

    @Override
    protected void paintChildren(Graphics g) {
      if (StringUtil.isNotEmpty(myEmptyText.getText())) {
        myEmptyText.paint(this, g);
      }
      else {
        super.paintChildren(g);
      }
    }
  };
  myEmptyText = new StatusText(myMainContentPanel) {
    @Override
    protected boolean isStatusVisible() {
      return StringUtil.isNotEmpty(getText());
    }
  };
  myMainContentPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false));

  myMainContentPanel.setOpaque(false);
  myScrollPane.setViewportView(myMainContentPanel);
  myScrollPane.setBorder(IdeBorderFactory.createEmptyBorder());
  myScrollPane.setViewportBorder(IdeBorderFactory.createEmptyBorder());

  myLoadingPanel = new JBLoadingPanel(new BorderLayout(), parent, ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS) {
    @Override
    public Color getBackground() {
      return CommitPanel.getCommitDetailsBackground();
    }
  };
  myLoadingPanel.add(myScrollPane);

  setLayout(new BorderLayout());
  add(myLoadingPanel, BorderLayout.CENTER);

  myEmptyText.setText("Commit details");
}
 
Example 15
Source File: ArrangementMatchingRulesPanel.java    From consulo with Apache License 2.0 4 votes vote down vote up
public ArrangementMatchingRulesPanel(@Nonnull Language language,
                                     @Nonnull ArrangementStandardSettingsManager settingsManager,
                                     @Nonnull ArrangementColorsProvider colorsProvider)
{
  super(new GridBagLayout());

  JBScrollPane scrollPane = new JBScrollPane();
  final JViewport viewport = scrollPane.getViewport();
  ArrangementSectionRulesControl.RepresentationCallback callback = new ArrangementSectionRulesControl.RepresentationCallback() {
    @Override
    public void ensureVisible(@Nonnull Rectangle r) {
      Rectangle visibleRect = viewport.getViewRect();
      if (r.y <= visibleRect.y) {
        return;
      }

      int excessiveHeight = r.y + r.height - (visibleRect.y + visibleRect.height);
      if (excessiveHeight <= 0) {
        return;
      }

      int verticalShift = Math.min(r.y - visibleRect.y, excessiveHeight);
      if (verticalShift > 0) {
        viewport.setViewPosition(new Point(visibleRect.x, visibleRect.y + verticalShift));
      }
    }
  };
  myControl = createRulesControl(language, settingsManager, colorsProvider, callback);
  scrollPane.setViewportView(myControl);
  CustomizationUtil.installPopupHandler(
          myControl, ArrangementConstants.ACTION_GROUP_MATCHING_RULES_CONTEXT_MENU, ArrangementConstants.MATCHING_RULES_CONTROL_PLACE
  );

  TitleWithToolbar top = new TitleWithToolbar(
          ApplicationBundle.message("arrangement.settings.section.match"),
          ArrangementConstants.ACTION_GROUP_MATCHING_RULES_CONTROL_TOOLBAR,
          ArrangementConstants.MATCHING_RULES_CONTROL_TOOLBAR_PLACE,
          myControl
  );
  add(top, new GridBag().coverLine().fillCellHorizontally().weightx(1));
  add(scrollPane, new GridBag().fillCell().weightx(1).weighty(1).insets(0, ArrangementConstants.HORIZONTAL_PADDING, 0, 0));
}