Package com.intellij.ui

Examples of com.intellij.ui.DocumentAdapter


          removeButton.setEnabled(true);
        }

      }
    });
    ticketTemplateNameTextField.getDocument().addDocumentListener(new DocumentAdapter() {
      protected void textChanged(DocumentEvent e) {
        Template selected = (Template) ticketTemplatesList.getSelectedValue();
        if (selected != null) {
          selected.setName(ticketTemplateNameTextField.getText());
        }
      }
    });
    ticketTemplateContentEditorPane.getDocument().addDocumentListener(new DocumentAdapter() {
      protected void textChanged(DocumentEvent e) {
        Template selected = (Template) ticketTemplatesList.getSelectedValue();
        if (selected != null) {
          selected.setContent(ticketTemplateContentEditorPane.getText());
        }
View Full Code Here


    if (directory != null) {
      myDirectory.setText(directory.getPath());
    }

    myDirectory.getTextField().getDocument().addDocumentListener(new DocumentAdapter() {
      protected void textChanged(final DocumentEvent e) {
        myDirectory.getTextField().setForeground(getDirectory() != null ? SimpleTextAttributes.REGULAR_ATTRIBUTES.getFgColor() :SimpleTextAttributes.ERROR_ATTRIBUTES.getFgColor());
        updateOkButton();
      }
    });

    if (extensions.size() == 0) {
      myExtension.setEnabled(false);
    }
    else {
      for (String extension : extensions) {
        myExtension.addItem(extension);
      }
    }

    if (defaultFileName != null) myFileName.setText(defaultFileName);
    myFileName.getDocument().addDocumentListener(new DocumentAdapter() {
      protected void textChanged(final DocumentEvent e) {
        myFileName.setForeground(isValidFileName(myFileName.getText()) ? SimpleTextAttributes.REGULAR_ATTRIBUTES.getFgColor() :SimpleTextAttributes.ERROR_ATTRIBUTES.getFgColor());

        updateOkButton();
      }
View Full Code Here

  private JTextField myFunctionNameField;

  protected ErlangExtractFunctionDialog(@NotNull Project project, @NotNull String functionName, @NotNull List<ErlangNamedElement> inParams) {
    super(project);
    myInParams = inParams;
    myFunctionNameField.getDocument().addDocumentListener(new DocumentAdapter() {
      @Override
      protected void textChanged(DocumentEvent e) {
        mySignatureLabel.setText(createSignature());
      }
    });
View Full Code Here

  private boolean myRebarPathValid;

  public RebarConfigurationForm() {
    myRebarPathSelector.addBrowseFolderListener("Select Rebar executable", "", null,
      FileChooserDescriptorFactory.createSingleLocalFileDescriptor());
    myRebarPathSelector.getTextField().getDocument().addDocumentListener(new DocumentAdapter() {
      @Override
      protected void textChanged(DocumentEvent documentEvent) {
        myRebarPathValid = validateRebarPath();
      }
    });
View Full Code Here

  private final ErlangFacetConfiguration myConfiguration;
  private boolean myIsModified = false;

  public ErlangFacetEditor(@SuppressWarnings("UnusedParameters") FacetEditorContext editorContext, ErlangFacetConfiguration configuration) {
    myConfiguration = configuration;
    myParseTransformsEditorField.getDocument().addDocumentListener(new DocumentAdapter() {
      @Override
      protected void textChanged(DocumentEvent e) {
        myIsModified = true;
      }
    });
View Full Code Here

                if (text.endsWith("/")) {
                    hostTextField.setText(text.substring(0, text.length() - 1));
                }
            }
        });
        DocumentListener listener = new DocumentAdapter() {
            @Override
            protected void textChanged(DocumentEvent e) {
                dialog.clearErrors();
            }
        };
View Full Code Here

  protected NamedConfigurable(boolean isNameEditable, @Nullable final Runnable updateTree) {
    myNameEditable = isNameEditable;
    myNamePanel.setVisible(myNameEditable);
    if (myNameEditable){
      myNameField.getDocument().addDocumentListener(new DocumentAdapter() {
        protected void textChanged(DocumentEvent e) {
          setDisplayName(myNameField.getText());
          if (updateTree != null){
            updateTree.run();
          }
View Full Code Here

    }
    else {
      final JTextArea textArea = new JTextArea(10, 50);
      textArea.setWrapStyleWord(true);
      textArea.setLineWrap(true);
      textArea.getDocument().addDocumentListener(new DocumentAdapter() {
        protected void textChanged(final DocumentEvent e) {
          textField.setText(textArea.getText());
        }
      });
      textArea.setText(textField.getText().replaceAll("[\\ ]*=[\\ ]*", "=").replaceAll(" ", "\n"));
View Full Code Here

                close(exitCode);
              }
            }
          };
          actions[i].putValue(DEFAULT_ACTION, Boolean.TRUE);
          myField.getDocument().addDocumentListener(new DocumentAdapter() {
            public void textChanged(DocumentEvent event) {
              actions[exitCode].setEnabled(myValidator == null || myValidator.checkInput(myField.getText().trim()));
            }
          });
        }
View Full Code Here

            public void itemStateChanged(ItemEvent e) {
              actions[exitCode].setEnabled(myValidator == null || myValidator.checkInput(myComboBox.getSelectedItem().toString().trim()));
            }
          });
          final JTextField textField = (JTextField)myComboBox.getEditor().getEditorComponent();
          textField.getDocument().addDocumentListener(new DocumentAdapter() {
            public void textChanged(DocumentEvent event) {
              actions[exitCode].setEnabled(myValidator == null || myValidator.checkInput(textField.getText().trim()));
            }
          });
        }
View Full Code Here

TOP

Related Classes of com.intellij.ui.DocumentAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.