Java Code Examples for com.intellij.openapi.ui.TextFieldWithBrowseButton#setEditable()

The following examples show how to use com.intellij.openapi.ui.TextFieldWithBrowseButton#setEditable() . 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: FilePartUI.java    From p4ic4idea with Apache License 2.0 5 votes vote down vote up
private void setupUI() {
    rootPanel = new JPanel(new BorderLayout());

    fileLocation = new TextFieldWithBrowseButton();
    // TODO make these keys conform to the standards.
    fileLocation.setText(P4Bundle.getString("config.file.location.tooltip"));
    fileLocation.setToolTipText(P4Bundle.getString("configuration.p4config.chooser"));
    fileLocation.setEditable(true);

    JLabel label = SwingUtil.createLabelFor(P4Bundle.getString("configuration.p4config"), fileLocation);
    label.setHorizontalAlignment(SwingConstants.TRAILING);

    rootPanel.add(label, BorderLayout.WEST);
    rootPanel.add(fileLocation, BorderLayout.CENTER);
}
 
Example 2
Source File: PathMappingsComponent.java    From consulo with Apache License 2.0 5 votes vote down vote up
public PathMappingsComponent() {
  super();
  final TextFieldWithBrowseButton pathTextField = new TextFieldWithBrowseButton();
  pathTextField.setEditable(false);
  setComponent(pathTextField);
  setText("Path mappings:");
  getComponent().addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(final ActionEvent e) {
      showConfigureMappingsDialog();
    }
  });
}