Search in sources :

Example 1 with DepthCombo

use of org.jetbrains.idea.svn.DepthCombo in project intellij-community by JetBrains.

the class SvnUpdatePanel method createUIComponents.

private void createUIComponents() {
    myLockOnDemand = new JCheckBox() {

        @Override
        public JToolTip createToolTip() {
            JToolTip toolTip = new JToolTip() {

                {
                    setUI(new MultiLineTooltipUI());
                }
            };
            toolTip.setComponent(this);
            return toolTip;
        }
    };
    myDepthCombo = new DepthCombo(true);
}
Also used : MultiLineTooltipUI(com.intellij.ui.MultiLineTooltipUI) DepthCombo(org.jetbrains.idea.svn.DepthCombo)

Example 2 with DepthCombo

use of org.jetbrains.idea.svn.DepthCombo in project intellij-community by JetBrains.

the class ImportOptionsDialog method createCenterPanel.

@Nullable
protected JComponent createCenterPanel() {
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gc = new GridBagConstraints();
    gc.insets = JBUI.insets(2);
    gc.gridwidth = 1;
    gc.gridheight = 1;
    gc.gridx = 0;
    gc.gridy = 0;
    gc.anchor = GridBagConstraints.WEST;
    gc.fill = GridBagConstraints.NONE;
    gc.weightx = 0;
    gc.weighty = 0;
    panel.add(new JLabel("Import to:"), gc);
    gc.gridx += 1;
    gc.gridwidth = 2;
    gc.weightx = 1;
    gc.fill = GridBagConstraints.HORIZONTAL;
    JLabel urlLabel = new JLabel(myURL.toString());
    urlLabel.setFont(urlLabel.getFont().deriveFont(Font.BOLD));
    panel.add(urlLabel, gc);
    gc.gridy += 1;
    gc.gridwidth = 1;
    gc.gridx = 0;
    gc.weightx = 0;
    gc.fill = GridBagConstraints.NONE;
    panel.add(new JLabel("Import from:"), gc);
    gc.gridx += 1;
    gc.gridwidth = 2;
    gc.weightx = 1;
    gc.fill = GridBagConstraints.HORIZONTAL;
    myPathField = new TextFieldWithBrowseButton(this);
    myPathField.setText(myFile.getAbsolutePath());
    myPathField.setEditable(false);
    panel.add(myPathField, gc);
    // other options.
    gc.gridy += 1;
    gc.gridx = 0;
    gc.weightx = 0;
    gc.gridwidth = 3;
    gc.fill = GridBagConstraints.NONE;
    final JLabel depthLabel = new JLabel(SvnBundle.message("label.depth.text"));
    depthLabel.setToolTipText(SvnBundle.message("label.depth.description"));
    panel.add(depthLabel, gc);
    ++gc.gridx;
    myDepth = new DepthCombo(false);
    panel.add(myDepth, gc);
    depthLabel.setLabelFor(myDepth);
    gc.gridx = 0;
    gc.gridy += 1;
    myIncludeIgnoredCheckbox = new JCheckBox("Include ignored resources");
    myIncludeIgnoredCheckbox.setSelected(true);
    panel.add(myIncludeIgnoredCheckbox, gc);
    gc.gridy += 1;
    panel.add(new JLabel("Commit Message:"), gc);
    gc.gridy += 1;
    gc.gridwidth = 3;
    gc.gridx = 0;
    gc.weightx = 1;
    gc.weighty = 1;
    gc.anchor = GridBagConstraints.NORTH;
    gc.fill = GridBagConstraints.BOTH;
    myCommitMessage = new JTextArea(10, 0);
    myCommitMessage.setWrapStyleWord(true);
    myCommitMessage.setLineWrap(true);
    panel.add(ScrollPaneFactory.createScrollPane(myCommitMessage), gc);
    gc.gridy += 1;
    gc.gridwidth = 3;
    gc.gridx = 0;
    gc.weightx = 0;
    gc.weighty = 0;
    gc.anchor = GridBagConstraints.NORTH;
    gc.fill = GridBagConstraints.HORIZONTAL;
    panel.add(new JLabel("Recent Messages: "), gc);
    gc.gridy += 1;
    final ArrayList<String> messages = VcsConfiguration.getInstance(myProject).getRecentMessages();
    Collections.reverse(messages);
    final String[] model = ArrayUtil.toStringArray(messages);
    final JComboBox messagesBox = new JComboBox(model);
    messagesBox.setRenderer(new MessageBoxCellRenderer());
    panel.add(messagesBox, gc);
    String lastMessage = VcsConfiguration.getInstance(myProject).getLastNonEmptyCommitMessage();
    if (lastMessage != null) {
        myCommitMessage.setText(lastMessage);
        myCommitMessage.selectAll();
    }
    messagesBox.addActionListener(e -> {
        myCommitMessage.setText(messagesBox.getSelectedItem().toString());
        myCommitMessage.selectAll();
    });
    return panel;
}
Also used : TextFieldWithBrowseButton(com.intellij.openapi.ui.TextFieldWithBrowseButton) DepthCombo(org.jetbrains.idea.svn.DepthCombo) Nullable(org.jetbrains.annotations.Nullable)

Example 3 with DepthCombo

use of org.jetbrains.idea.svn.DepthCombo in project intellij-community by JetBrains.

the class CheckoutOptionsDialog method createUIComponents.

private void createUIComponents() {
    mySelectTarget = new FixedSizeButton(20);
    myDepthCombo = new DepthCombo(false);
}
Also used : FixedSizeButton(com.intellij.openapi.ui.FixedSizeButton) DepthCombo(org.jetbrains.idea.svn.DepthCombo)

Example 4 with DepthCombo

use of org.jetbrains.idea.svn.DepthCombo in project intellij-community by JetBrains.

the class ExportOptionsDialog method createCenterPanel.

@Nullable
protected JComponent createCenterPanel() {
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gc = new GridBagConstraints();
    gc.insets = JBUI.insets(2);
    gc.gridwidth = 1;
    gc.gridheight = 1;
    gc.gridx = 0;
    gc.gridy = 0;
    gc.anchor = GridBagConstraints.WEST;
    gc.fill = GridBagConstraints.NONE;
    gc.weightx = 0;
    gc.weighty = 0;
    panel.add(new JLabel("Export:"), gc);
    gc.gridx += 1;
    gc.gridwidth = 2;
    gc.weightx = 1;
    gc.fill = GridBagConstraints.HORIZONTAL;
    JLabel urlLabel = new JLabel(myURL.toString());
    urlLabel.setFont(urlLabel.getFont().deriveFont(Font.BOLD));
    panel.add(urlLabel, gc);
    gc.gridy += 1;
    gc.gridwidth = 1;
    gc.gridx = 0;
    gc.weightx = 0;
    gc.fill = GridBagConstraints.NONE;
    panel.add(new JLabel("Destination:"), gc);
    gc.gridx += 1;
    gc.gridwidth = 2;
    gc.weightx = 1;
    gc.fill = GridBagConstraints.HORIZONTAL;
    myPathField = new TextFieldWithBrowseButton(this);
    myPathField.setText(myFile.getAbsolutePath());
    myPathField.setEditable(false);
    panel.add(myPathField, gc);
    gc.gridy += 1;
    gc.gridx = 0;
    gc.weightx = 0;
    gc.gridwidth = 3;
    gc.fill = GridBagConstraints.NONE;
    // other options.
    final JLabel depthLabel = new JLabel(SvnBundle.message("label.depth.text"));
    depthLabel.setToolTipText(SvnBundle.message("label.depth.description"));
    panel.add(depthLabel, gc);
    ++gc.gridx;
    myDepth = new DepthCombo(false);
    panel.add(myDepth, gc);
    depthLabel.setLabelFor(myDepth);
    gc.gridx = 0;
    gc.gridy += 1;
    myForceCheckbox = new JCheckBox("Replace existing files");
    myForceCheckbox.setSelected(true);
    panel.add(myForceCheckbox, gc);
    gc.gridy += 1;
    myExternalsCheckbox = new JCheckBox("Include externals locations");
    myExternalsCheckbox.setSelected(true);
    panel.add(myExternalsCheckbox, gc);
    gc.gridy += 1;
    gc.gridwidth = 2;
    panel.add(new JLabel("Override 'native' EOLs with:"), gc);
    gc.gridx += 2;
    gc.gridwidth = 1;
    myEOLStyleBox = new JComboBox(new Object[] { "None", "LF", "CRLF", "CR" });
    panel.add(myEOLStyleBox, gc);
    gc.gridy += 1;
    gc.gridwidth = 3;
    gc.gridx = 0;
    gc.weightx = 1;
    gc.weighty = 1;
    gc.anchor = GridBagConstraints.SOUTH;
    gc.fill = GridBagConstraints.HORIZONTAL;
    panel.add(new JSeparator(), gc);
    return panel;
}
Also used : TextFieldWithBrowseButton(com.intellij.openapi.ui.TextFieldWithBrowseButton) DepthCombo(org.jetbrains.idea.svn.DepthCombo) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

DepthCombo (org.jetbrains.idea.svn.DepthCombo)4 TextFieldWithBrowseButton (com.intellij.openapi.ui.TextFieldWithBrowseButton)2 Nullable (org.jetbrains.annotations.Nullable)2 FixedSizeButton (com.intellij.openapi.ui.FixedSizeButton)1 MultiLineTooltipUI (com.intellij.ui.MultiLineTooltipUI)1