Tabnine Logo
JBTextField
Code IndexAdd Tabnine to your IDE (free)

How to use
JBTextField
in
com.intellij.ui.components

Best Java code snippets using com.intellij.ui.components.JBTextField (Showing top 20 results out of 315)

origin: go-lang-plugin-org/go-lang-idea-plugin

@Override
protected void applyEditorTo(@NotNull GoAppEngineRunConfiguration configuration) throws ConfigurationException {
 configuration.setHost(StringUtil.nullize(myHostField.getText().trim()));
 configuration.setPort(StringUtil.nullize(myPortField.getText().trim()));
 configuration.setAdminPort(StringUtil.nullize(myAdminPortField.getText().trim()));
 configuration.setConfigFile(StringUtil.nullize(myConfigFileField.getText().trim()));
 myCommonSettingsPanel.applyEditorTo(configuration);
}
origin: go-lang-plugin-org/go-lang-idea-plugin

@Override
protected void resetEditorFrom(@NotNull GoAppEngineRunConfiguration configuration) {
 myHostField.setText(StringUtil.notNullize(configuration.getHost()));
 myPortField.setText(StringUtil.notNullize(configuration.getPort()));
 myAdminPortField.setText(StringUtil.notNullize(configuration.getAdminPort()));
 myConfigFileField.getChildComponent().setText(StringUtil.notNullize(configuration.getConfigFile()));
 myCommonSettingsPanel.resetEditorFrom(configuration);
}
origin: hsz/idea-gitignore

/**
 * Factory method. It creates panel with dialog options. Options panel is located at the
 * center of the dialog's content pane. The implementation can return <code>null</code>
 * value. In this case there will be no options panel.
 *
 * @return center panel
 */
@Nullable
@Override
protected JComponent createCenterPanel() {
  final JPanel centerPanel = new JPanel(new BorderLayout());
  centerPanel.setPreferredSize(new Dimension(600, 300));
  previewDocument = EditorFactory.getInstance().createDocument(content);
  preview = Utils.createPreviewEditor(previewDocument, project, false);
  name = new JBTextField(IgnoreBundle.message("dialog.userTemplate.name.value"));
  JLabel nameLabel = new JLabel(IgnoreBundle.message("dialog.userTemplate.name"));
  nameLabel.setBorder(JBUI.Borders.emptyRight(10));
  JPanel namePanel = new JPanel(new BorderLayout());
  namePanel.add(nameLabel, BorderLayout.WEST);
  namePanel.add(name, BorderLayout.CENTER);
  JComponent previewComponent = preview.getComponent();
  previewComponent.setBorder(JBUI.Borders.emptyTop(10));
  centerPanel.add(namePanel, BorderLayout.NORTH);
  centerPanel.add(previewComponent, BorderLayout.CENTER);
  return centerPanel;
}
origin: SonarSource/sonarlint-intellij

 @Override public void actionPerformed(ActionEvent e) {
  Map<String, RemoteProject> map = downloadProjectList();
  if (map != null) {
   SearchProjectKeyDialog dialog = new SearchProjectKeyDialog(rootPanel, projectKeyTextField.getText(), map);
   if (dialog.showAndGet()) {
    projectKeyTextField.setText(dialog.getSelectedProjectKey() != null ? dialog.getSelectedProjectKey() : "");
   }
  }
 }
});
origin: GoogleCloudPlatform/google-cloud-intellij

private void updateStagedArtifactNameEmptyText() {
 File artifact = deploymentSource.getFile();
 if (artifact == null) {
  stagedArtifactNameTextField.getEmptyText().clear();
  return;
 }
 AppEngineFlexibleDeploymentArtifactType artifactType =
   AppEngineFlexibleDeploymentArtifactType.typeForPath(artifact.toPath());
 if (artifactType.equals(UNKNOWN)) {
  stagedArtifactNameTextField.getEmptyText().clear();
 } else {
  stagedArtifactNameTextField.getEmptyText().setText(artifact.getName());
 }
}
origin: SonarSource/sonarlint-intellij

 private void createUIComponents() {
  sonarcloudIcon = new JLabel(SonarLintIcons.icon("SonarCloud"));
  sonarqubeIcon = new JLabel(SonarLintIcons.icon("SonarQube"));
  sonarcloudText = SwingHelper.createHtmlViewer(false, null, null, null);
  sonarqubeText = SwingHelper.createHtmlViewer(false, null, null, null);

  JBTextField text = new JBTextField();
  text.getEmptyText().setText("Example: http://localhost:9000");
  urlText = text;

  nameField = new JBTextField();
  nameField.setDocument(new LengthRestrictedDocument(NAME_MAX_LENGTH));
 }
}
origin: antlr/intellij-plugin-v4

@Override
protected JComponent createCenterPanel() {
  nameField = new JBTextField("newRule");
  double h = nameField.getSize().getHeight();
  nameField.setPreferredSize(new Dimension(250,(int)h));
  setTitle("Name the extracted rule");
  nameField.selectAll();
  return nameField;
}
origin: uwolfer/gerrit-intellij-plugin

public LoginPanel(final LoginDialog dialog) {
  hostTextField.getEmptyText().setText("https://review.example.org");
  hostTextField.addFocusListener(new FocusAdapter() {
    @Override
    public void focusLost(FocusEvent e) {
      SettingsPanel.fixUrl(hostTextField);
    }
  });
  DocumentListener listener = new DocumentAdapter() {
    @Override
    protected void textChanged(DocumentEvent e) {
      dialog.clearErrors();
    }
  };
  loginTextField.getDocument().addDocumentListener(listener);
  passwordField.getDocument().addDocumentListener(listener);
  gerritLoginInfoTestField.setText(LOGIN_CREDENTIALS_INFO);
  gerritLoginInfoTestField.setMargin(new Insets(5, 0, 0, 0));
  gerritLoginInfoTestField.setBackground(UIUtil.TRANSPARENT_COLOR);
}
origin: GoogleCloudPlatform/google-cloud-intellij

public UserSelector() {
 getTextField().setCursor(Cursor.getDefaultCursor());
 getTextField()
   .getEmptyText()
   .setText(GoogleCloudCoreMessageBundle.message("select.user.emptytext"));
}
origin: GoogleCloudPlatform/google-cloud-intellij

textField.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0));
textField.addMouseListener(listener);
textField.addFocusListener(
  new FocusListener() {
   @Override
origin: GoogleCloudPlatform/google-cloud-intellij

public Document getDocument() {
 return getTextField().getDocument();
}
origin: GoogleCloudPlatform/google-cloud-intellij

@Override
public void addNotify() {
 super.addNotify();
 textField.addFocusListener(
   new FocusAdapter() {
    @Override
    public void focusGained(FocusEvent event) {
     CustomizableComboBox.this.repaint();
    }
    @Override
    public void focusLost(FocusEvent event) {
     CustomizableComboBox.this.repaint();
    }
   });
}
origin: GoogleCloudPlatform/google-cloud-intellij

public RepositorySelector(@Nullable CloudProject cloudProject, boolean canCreateRepository) {
 this.cloudProject = cloudProject;
 this.canCreateRepository = canCreateRepository;
 getTextField()
   .getEmptyText()
   .setText(CloudReposMessageBundle.message("cloud.repository.selector.placeholder.text"));
}
origin: SonarSource/sonarlint-intellij

projectKeyTextField = new JBTextField();
projectKeyTextField.getEmptyText().setText("Input project key or search one");
origin: uwolfer/gerrit-intellij-plugin

public SettingsPanel() {
  hostTextField.getEmptyText().setText("https://review.example.org");
  hostTextField.addFocusListener(new FocusAdapter() {
    @Override
    public void focusLost(FocusEvent e) {
origin: SonarSource/sonarlint-intellij

public AddEditExclusionDialog(Project project) {
 super(project, false);
 this.project = project;
 setTitle("Add SonarLint File Exclusion");
 init();
 FileChooserDescriptor fileChooser = new FileChooserDescriptor(true, false, false,
  true, false, false);
 fileChooser.setRoots(project.getBaseDir());
 fileTextField.addBrowseFolderListener("Select File to Exclude",
  "Select the file which will be excluded from SonarLint analysis",
  project, fileChooser);
 FileChooserDescriptor directoryChooser = FileChooserDescriptorFactory.createSingleFolderDescriptor();
 directoryChooser.setRoots(project.getBaseDir());
 directoryTextField.addBrowseFolderListener("Select Directory to Exclude",
  "Select the directory which will be excluded from SonarLint analysis",
  project, directoryChooser);
 DocumentListener docListener = new DocumentAdapter() {
  protected void textChanged(final DocumentEvent e) {
   updateOk();
  }
 };
 fileTextField.getTextField().getDocument().addDocumentListener(docListener);
 directoryTextField.getTextField().getDocument().addDocumentListener(docListener);
 globTextField.getDocument().addDocumentListener(docListener);
 ActionListener listener = e -> updateControls();
 directoryRadioButton.addActionListener(listener);
 globRadioButton.addActionListener(listener);
 fileRadioButton.addActionListener(listener);
 updateControls();
}
origin: hsz/idea-gitignore

  /**
   * Creates new user template.
   */
  private void performCreateAction() {
    IgnoreSettings.UserTemplate template =
        new IgnoreSettings.UserTemplate(name.getText(), previewDocument.getText());
    settings.getUserTemplates().add(template);

    Notifications.Bus.notify(new Notification(
        IgnoreBundle.PLUGIN_ID,
        IgnoreBundle.message("dialog.userTemplate.added"),
        IgnoreBundle.message("dialog.userTemplate.added.description", template.getName()),
        NotificationType.INFORMATION
    ), project);

    super.doOKAction();
  }
}
origin: uwolfer/gerrit-intellij-plugin

public void setHost(final String host) {
  hostTextField.setText(host);
}
origin: GoogleCloudPlatform/google-cloud-intellij

@Test
public void fireStateChange_doesSetStagedArtifactNameEmptyText() {
 when(deploymentSource.getFile()).thenReturn(warArtifact);
 String beforeText = editor.getStagedArtifactNameTextField().getEmptyText().getText();
 editor.fireStateChange();
 String afterText = editor.getStagedArtifactNameTextField().getEmptyText().getText();
 assertThat(beforeText).isEmpty();
 assertThat(afterText).isEqualTo(warArtifact.getName());
}
origin: liias/monkey

public JBTextField createComponent() {
 String valueAsString = Objects.toString(setting.getValueAsFloat(), null);
 JBTextField jbTextField = new JBTextField(valueAsString);
 applyGenericProperties(jbTextField);
 return jbTextField;
}
com.intellij.ui.componentsJBTextField

Most used methods

  • getText
  • setText
  • getEmptyText
  • <init>
  • addFocusListener
  • getDocument
  • selectAll
  • setEnabled
  • addMouseListener
  • getSize
  • getWidth
  • grabFocus
  • getWidth,
  • grabFocus,
  • isFocusOwner,
  • setBorder,
  • setCursor,
  • setEditable,
  • setPreferredSize

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now