Example usage for com.intellij.openapi.ui TextFieldWithBrowseButton TextFieldWithBrowseButton

List of usage examples for com.intellij.openapi.ui TextFieldWithBrowseButton TextFieldWithBrowseButton

Introduction

In this page you can find the example usage for com.intellij.openapi.ui TextFieldWithBrowseButton TextFieldWithBrowseButton.

Prototype

public TextFieldWithBrowseButton() 

Source Link

Usage

From source file:bazaar4idea.ui.BzrConfigurationIdePanel.java

License:Apache License

/** Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 * @noinspection ALL/*from ww w  .ja  va  2s . com*/
 */
private void $$$setupUI$$$() {
    basePanel = new JPanel();
    basePanel.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 0), -1, -1));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
    basePanel.add(panel1,
            new GridConstraints(0, 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));
    panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
            ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
                    .getString("bzr4intellij.path_to_executable.text")));
    pathSelector = new TextFieldWithBrowseButton();
    pathSelector.setEnabled(true);
    panel1.add(pathSelector,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    new Dimension(100, -1), null, null, 0, false));
    pathDefaultButton = new JButton();
    this.$$$loadButtonText$$$(pathDefaultButton,
            ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
                    .getString("configdialog.default_path_button.text"));
    panel1.add(pathDefaultButton,
            new GridConstraints(0, 2, 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 JLabel label1 = new JLabel();
    this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
            .getString("configpanel.exe_path.text"));
    panel1.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));
    final Spacer spacer1 = new Spacer();
    basePanel.add(spacer1,
            new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
                    GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    final JPanel panel2 = new JPanel();
    panel2.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
    basePanel.add(panel2,
            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_CAN_GROW, null, null,
                    null, 0, false));
    panel2.setBorder(BorderFactory
            .createTitledBorder(ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
                    .getString("configpanel.miscellaneous_group.text")));
    m_trimAnnotationCheckBox = new JCheckBox();
    this.$$$loadButtonText$$$(m_trimAnnotationCheckBox,
            ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
                    .getString("configpanel.trim_annotation_author.text"));
    panel2.add(m_trimAnnotationCheckBox,
            new GridConstraints(0, 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));
    final Spacer spacer2 = new Spacer();
    panel2.add(spacer2,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
    m_modalErrorPopupEnabledCheckBox = new JCheckBox();
    this.$$$loadButtonText$$$(m_modalErrorPopupEnabledCheckBox,
            ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
                    .getString("configpanel.allow_modal_error_popup.text"));
    panel2.add(m_modalErrorPopupEnabledCheckBox,
            new GridConstraints(1, 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));
    final JPanel panel3 = new JPanel();
    panel3.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));
    basePanel.add(panel3,
            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));
    panel3.setBorder(BorderFactory
            .createTitledBorder(ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
                    .getString("configpanel.envvars_group.text")));
    m_envBzrEmailTextField = new JTextField();
    m_envBzrEmailTextField.setEnabled(true);
    m_envBzrEmailTextField.setText("");
    panel3.add(m_envBzrEmailTextField,
            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 Spacer spacer3 = new Spacer();
    panel3.add(spacer3,
            new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
    final Spacer spacer4 = new Spacer();
    panel3.add(spacer4,
            new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
                    GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    m_envBzrHomeTextField = new JTextField();
    m_envBzrHomeTextField.setEnabled(true);
    panel3.add(m_envBzrHomeTextField,
            new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,
                    new Dimension(150, -1), null, 0, false));
    m_envBzrEmailCheckBox = new JCheckBox();
    m_envBzrEmailCheckBox.setText("BZR_EMAIL");
    panel3.add(m_envBzrEmailCheckBox,
            new GridConstraints(0, 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));
    m_envBzrHomeCheckBox = new JCheckBox();
    m_envBzrHomeCheckBox.setText("BZR_HOME");
    panel3.add(m_envBzrHomeCheckBox,
            new GridConstraints(1, 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));
    final JPanel panel4 = new JPanel();
    panel4.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
    basePanel.add(panel4,
            new GridConstraints(4, 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));
    panel4.setBorder(BorderFactory
            .createTitledBorder(ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
                    .getString("configpanel.experimental_group.text")));
    m_granularExecLockingCheckBox = new JCheckBox();
    this.$$$loadButtonText$$$(m_granularExecLockingCheckBox,
            ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
                    .getString("configpanel.fine_grained_exec_locking.text"));
    panel4.add(m_granularExecLockingCheckBox,
            new GridConstraints(0, 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));
    final Spacer spacer5 = new Spacer();
    panel4.add(spacer5,
            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
                    GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
}

From source file:bazaar4idea.ui.BzrSetExecutableDialog.java

License:Apache License

/** Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 * @noinspection ALL/*  w w w  . j  ava  2s  .  c o m*/
 */
private void $$$setupUI$$$() {
    centerPanel = new JPanel();
    centerPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
    hgExecutablePath = new TextFieldWithBrowseButton();
    centerPanel.add(hgExecutablePath,
            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                    new Dimension(400, -1), null, 0, false));
    infoLabel = new JLabel();
    this.$$$loadLabelText$$$(infoLabel, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
            .getString("bzr4intellij.executable.full_path"));
    centerPanel.add(infoLabel,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    errorLabel = new JLabel();
    errorLabel.setFont(new Font(errorLabel.getFont().getName(), Font.ITALIC, errorLabel.getFont().getSize()));
    errorLabel.setForeground(Color.red);
    this.$$$loadLabelText$$$(errorLabel, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
            .getString("bzr4intellij.error.invalidExecutable"));
    centerPanel.add(errorLabel,
            new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    final Spacer spacer1 = new Spacer();
    centerPanel.add(spacer1,
            new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
                    GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
}

From source file:com.android.tools.idea.wizard.dynamic.ScopedDataBinderTest.java

License:Apache License

public void testRegisterTextFieldWithBrowseButton() throws Exception {
    Key<String> textKey = myState.createKey("textField", String.class);
    Key<String> textKey2 = myState.createKey("boundSecond", String.class);
    final Key<String> triggerKey = myState.createKey("triggerKey", String.class);
    TextFieldWithBrowseButton textField = new TextFieldWithBrowseButton();

    myScopedDataBinder.register(textKey, textField);
    myScopedDataBinder.register(textKey2, textField);

    // Test binding UI -> Store
    textField.setText("Hello World!");
    assertEquals("Hello World!", myState.get(textKey));
    assertEquals("Hello World!", myState.get(textKey2));

    // Test binding Store -> UI
    myState.put(textKey, "Awesome");
    assertEquals("Awesome", textField.getText());
    assertEquals("Awesome", myState.get(textKey2));

    myState.put(textKey2, "Goodbye");
    assertEquals("Goodbye", textField.getText());
    assertEquals("Goodbye", myState.get(textKey));

    final AtomicBoolean respectsUserEdits = new AtomicBoolean(true);

    // Test value derivation
    myScopedDataBinder.registerValueDeriver(textKey, new ValueDeriver<String>() {
        @Nullable//w  w  w . j  a  va  2s.  c  om
        @Override
        public Set<Key<?>> getTriggerKeys() {
            return makeSetOf(triggerKey);
        }

        @Override
        public boolean respectUserEdits() {
            return respectsUserEdits.get();
        }

        @NotNull
        @Override
        public String deriveValue(ScopedStateStore state, Key changedKey, @Nullable String currentValue) {
            String trigger = state.get(triggerKey);
            if (trigger == null) {
                return "UNEXPECTED NULL!";
            } else {
                return trigger.toUpperCase();
            }
        }
    });

    myState.put(triggerKey, "Some value to trigger update");
    // The deriver does not fire because user edits are respected
    assertEquals("Goodbye", textField.getText());

    respectsUserEdits.set(false);
    myState.put(triggerKey, "the quick brown fox");
    // The deriver fires because user edits are not respected
    assertEquals("THE QUICK BROWN FOX", textField.getText());
}

From source file:com.compoundtheory.intellij.tmux.config.AppConfigurable.java

License:Apache License

public JComponent createComponent() {
    myPanel = new JPanel(new BorderLayout(10, 5));
    final JPanel contentPanel = new JPanel(new BorderLayout(4, 0));
    myPanel.add(contentPanel, BorderLayout.NORTH);
    contentPanel.add(new JLabel("Tmux Binary: "), BorderLayout.WEST);
    myPathField = new TextFieldWithBrowseButton();

    myPathField.setText(settings.TMUX_BINARY_PATH);

    contentPanel.add(myPathField);/*from   w  w w . j a v a2 s .  c  o  m*/

    myPathField.addBrowseFolderListener("Select Tmux Binary", "", null,
            new FileChooserDescriptor(true, false, false, false, false, false) {
                @Override
                public boolean isFileSelectable(VirtualFile file) {
                    return (file.getName().equals("tmux"));
                }
            });

    return myPanel;
}

From source file:com.facebook.buck.intellij.ideabuck.ui.BuckSettingsUI.java

License:Apache License

private void init() {
    setLayout(new BorderLayout());
    JPanel container = this;

    buckPathField = new TextFieldWithBrowseButton();
    FileChooserDescriptor buckFileChooserDescriptor = new FileChooserDescriptor(true, false, false, false,
            false, false);//from   w  ww .  j  a v a2  s.c  om
    buckPathField.addBrowseFolderListener("", "Buck Executable Path", null, buckFileChooserDescriptor,
            TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT, false);

    adbPathField = new TextFieldWithBrowseButton();
    FileChooserDescriptor adbFileChooserDescriptor = new FileChooserDescriptor(true, false, false, false, false,
            false);
    adbPathField.addBrowseFolderListener("", "Adb Executable Path", null, adbFileChooserDescriptor,
            TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT, false);
    customizedInstallSettingField = new JBTextField();
    customizedInstallSettingField.getEmptyText().setText(CUSTOMIZED_INSTALL_FLAGS_HINT);
    customizedInstallSettingField.setEnabled(false);

    showDebug = new JCheckBox("Show debug in tool window");
    enableAutoDeps = new JCheckBox("Enable auto dependencies");
    runAfterInstall = new JCheckBox("Run after install (-r)");
    multiInstallMode = new JCheckBox("Multi-install mode (-x)");
    uninstallBeforeInstall = new JCheckBox("Uninstall before installing (-u)");
    customizedInstallSetting = new JCheckBox("Use customized install setting:  ");
    initCustomizedInstallCommandListener();

    JPanel buckSettings = new JPanel(new GridBagLayout());
    buckSettings.setBorder(IdeBorderFactory.createTitledBorder("Buck Settings", true));
    container.add(container = new JPanel(new BorderLayout()), BorderLayout.NORTH);
    container.add(buckSettings, BorderLayout.NORTH);
    final GridBagConstraints constraints = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST,
            GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);

    buckSettings.add(new JLabel("Buck Executable Path:"), constraints);
    constraints.gridx = 1;
    constraints.weightx = 1;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    buckSettings.add(buckPathField, constraints);
    constraints.gridx = 0;
    constraints.gridy = 1;
    constraints.weightx = 1;
    buckSettings.add(new JLabel("Adb Executable Path:"), constraints);
    constraints.gridx = 1;
    constraints.gridy = 1;
    constraints.weightx = 1;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    buckSettings.add(adbPathField, constraints);
    constraints.gridx = 0;
    constraints.gridy = 2;
    buckSettings.add(showDebug, constraints);
    constraints.gridx = 0;
    constraints.gridy = 3;
    buckSettings.add(enableAutoDeps, constraints);

    JPanel installSettings = new JPanel(new BorderLayout());
    installSettings.setBorder(IdeBorderFactory.createTitledBorder("Buck Install Settings", true));
    container.add(container = new JPanel(new BorderLayout()), BorderLayout.SOUTH);
    container.add(installSettings, BorderLayout.NORTH);

    installSettings.add(runAfterInstall, BorderLayout.NORTH);
    installSettings.add(installSettings = new JPanel(new BorderLayout()), BorderLayout.SOUTH);

    installSettings.add(multiInstallMode, BorderLayout.NORTH);
    installSettings.add(installSettings = new JPanel(new BorderLayout()), BorderLayout.SOUTH);

    installSettings.add(uninstallBeforeInstall, BorderLayout.NORTH);
    installSettings.add(installSettings = new JPanel(new BorderLayout()), BorderLayout.SOUTH);

    final GridBagConstraints customConstraints = new GridBagConstraints(0, 0, 1, 1, 0, 0,
            GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
    JPanel customizedInstallSetting = new JPanel(new GridBagLayout());
    customizedInstallSetting.add(this.customizedInstallSetting, customConstraints);
    customConstraints.gridx = 1;
    customConstraints.weightx = 1;
    customConstraints.fill = GridBagConstraints.HORIZONTAL;
    customizedInstallSetting.add(customizedInstallSettingField, customConstraints);
    installSettings.add(customizedInstallSetting, BorderLayout.NORTH);
}

From source file:com.facebook.buck.intellij.plugin.ui.BuckSettingsUI.java

License:Apache License

private void init() {
    setLayout(new BorderLayout());
    JPanel container = this;

    buckPathField = new TextFieldWithBrowseButton();
    FileChooserDescriptor fileChooserDescriptor = new FileChooserDescriptor(true, false, false, false, false,
            false);/* w  w  w.j a v a2  s  .c  o  m*/
    buckPathField.addBrowseFolderListener("", "Buck Executable Path", null, fileChooserDescriptor,
            TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT, false);
    customizedInstallSettingField = new JBTextField();
    customizedInstallSettingField.getEmptyText().setText(CUSTOMIZED_INSTALL_FLAGS_HINT);
    customizedInstallSettingField.setEnabled(false);

    runAfterInstall = new JCheckBox("Run after install (-r)");
    multiInstallMode = new JCheckBox("Multi-install mode (-x)");
    uninstallBeforeInstall = new JCheckBox("Uninstall before installing (-u)");
    customizedInstallSetting = new JCheckBox("Use customized install setting:  ");
    initCustomizedInstallCommandListener();

    JPanel buckSettings = new JPanel(new GridBagLayout());
    buckSettings.setBorder(IdeBorderFactory.createTitledBorder("Buck Settings", true));
    container.add(container = new JPanel(new BorderLayout()), BorderLayout.NORTH);
    container.add(buckSettings, BorderLayout.NORTH);
    final GridBagConstraints constraints = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST,
            GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);

    buckSettings.add(new JLabel("Buck Executable Path:"), constraints);
    constraints.gridx = 1;
    constraints.weightx = 1;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    buckSettings.add(buckPathField, constraints);

    JPanel installSettings = new JPanel(new BorderLayout());
    installSettings.setBorder(IdeBorderFactory.createTitledBorder("Buck Install Settings", true));
    container.add(container = new JPanel(new BorderLayout()), BorderLayout.SOUTH);
    container.add(installSettings, BorderLayout.NORTH);

    installSettings.add(runAfterInstall, BorderLayout.NORTH);
    installSettings.add(installSettings = new JPanel(new BorderLayout()), BorderLayout.SOUTH);

    installSettings.add(multiInstallMode, BorderLayout.NORTH);
    installSettings.add(installSettings = new JPanel(new BorderLayout()), BorderLayout.SOUTH);

    installSettings.add(uninstallBeforeInstall, BorderLayout.NORTH);
    installSettings.add(installSettings = new JPanel(new BorderLayout()), BorderLayout.SOUTH);

    final GridBagConstraints customConstraints = new GridBagConstraints(0, 0, 1, 1, 0, 0,
            GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
    JPanel customizedInstallSetting = new JPanel(new GridBagLayout());
    customizedInstallSetting.add(this.customizedInstallSetting, customConstraints);
    customConstraints.gridx = 1;
    customConstraints.weightx = 1;
    customConstraints.fill = GridBagConstraints.HORIZONTAL;
    customizedInstallSetting.add(customizedInstallSettingField, customConstraints);
    installSettings.add(customizedInstallSetting, BorderLayout.NORTH);
}

From source file:com.github.kumaraman21.intellijbehave.settings.JBehaveSettingsPanel.java

License:Apache License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//from   www  . jav  a  2  s  . co  m
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1));
    storyRunnerLabel = new JLabel();
    storyRunnerLabel.setText("Main class for running stories");
    storyRunnerLabel
            .setToolTipText("Class with a main function to receive the story file to run as a parameter");
    contentPane.add(storyRunnerLabel,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    storyRunnerField = new TextFieldWithBrowseButton();
    storyRunnerField.setAlignmentX(0.5f);
    storyRunnerField.setPreferredSize(new Dimension(400, 28));
    contentPane.add(storyRunnerField,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    final Spacer spacer1 = new Spacer();
    contentPane.add(spacer1,
            new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
                    GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
}

From source file:com.google.idea.blaze.base.wizard.BlazeProjectSettingsControl.java

License:Open Source License

private void fillUi(@NotNull JPanel canvas, int indentLevel) {
    JLabel projectDataDirLabel = new JBLabel("Project data directory:");

    Dimension minSize = ProjectViewUi.getMinimumSize();
    // Add 120 pixels so we have room for our extra fields
    minSize.setSize(minSize.width, minSize.height + 120);
    canvas.setMinimumSize(minSize);// w ww  .j  a  v a 2 s  .  c om
    canvas.setPreferredSize(minSize);

    projectDataDirField = new TextFieldWithBrowseButton();
    projectDataDirField.addBrowseFolderListener("", "Blaze Android Studio project data directory", null,
            STUDIO_PROJECT_FOLDER_DESCRIPTOR, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT, false);
    final String dataDirToolTipText = "Directory in which to store the project's metadata. Choose a directory outside of"
            + " the Piper/CitC client directories or Git5 directory.";
    projectDataDirField.setToolTipText(dataDirToolTipText);
    projectDataDirLabel.setToolTipText(dataDirToolTipText);

    canvas.add(projectDataDirLabel, UiUtil.getLabelConstraints(indentLevel));
    canvas.add(projectDataDirField, UiUtil.getFillLineConstraints(0));

    JLabel projectNameLabel = new JLabel("Project name:");
    projectNameField = new JTextField();
    final String projectNameToolTipText = "Project display name.";
    projectNameField.setToolTipText(projectNameToolTipText);
    projectNameLabel.setToolTipText(projectNameToolTipText);
    canvas.add(projectNameLabel, UiUtil.getLabelConstraints(indentLevel));
    canvas.add(projectNameField, UiUtil.getFillLineConstraints(0));

    projectViewUi.fillUi(canvas, indentLevel);
}

From source file:com.google.idea.blaze.base.wizard2.ui.BlazeEditProjectViewControl.java

License:Open Source License

private void fillUi(JPanel canvas, int indentLevel) {
    JLabel projectDataDirLabel = new JBLabel("Project data directory:");

    Dimension minSize = ProjectViewUi.getMinimumSize();
    // Add 120 pixels so we have room for our extra fields
    minSize.setSize(minSize.width, minSize.height + 120);
    canvas.setMinimumSize(minSize);//from  w  w  w. ja  va2s  . c o  m
    canvas.setPreferredSize(minSize);

    projectDataDirField = new TextFieldWithBrowseButton();
    projectDataDirField.addBrowseFolderListener("", buildSystemName + " project data directory", null,
            PROJECT_FOLDER_DESCRIPTOR, TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT, false);
    final String dataDirToolTipText = "Directory in which to store the project's metadata. "
            + "Choose a directory outside of your workspace.";
    projectDataDirField.setToolTipText(dataDirToolTipText);
    projectDataDirLabel.setToolTipText(dataDirToolTipText);

    canvas.add(projectDataDirLabel, UiUtil.getLabelConstraints(indentLevel));
    canvas.add(projectDataDirField, UiUtil.getFillLineConstraints(0));

    JLabel projectNameLabel = new JLabel("Project name:");
    projectNameField = new JTextField();
    final String projectNameToolTipText = "Project display name.";
    projectNameField.setToolTipText(projectNameToolTipText);
    projectNameLabel.setToolTipText(projectNameToolTipText);
    canvas.add(projectNameLabel, UiUtil.getLabelConstraints(indentLevel));
    canvas.add(projectNameField, UiUtil.getFillLineConstraints(0));

    projectViewUi.fillUi(canvas, indentLevel);
}

From source file:com.googlecode.instinct.integrate.idea.InstinctRunConfigurationSettingsEditor.java

License:Apache License

private void initClassChooser() {
    contextClassInput = new TextFieldWithBrowseButton();
    contextClassInput.addActionListener(new ActionListener() {
        @Fix("Make sure the browse box is not already showing.")
        public void actionPerformed(final ActionEvent e) {
            final ContextClassBrowser browser = new ContextClassBrowser(project, "Choose Context");
            browser.setField(contextClassInput);
            contextClassInput.setText(browser.show());
            // reset the name of the context in the "Name" field.
        }/*from   w  w  w. j  av  a2 s.com*/
    });
}