Package com.intellij.ui

Examples of com.intellij.ui.DocumentAdapter


        };
    }

    @Override
    protected DocumentListener createDocumentListener() {
        return new DocumentAdapter() {
            @Override
            protected void textChanged(DocumentEvent e) {
                getConfiguration().setModified(true);
                updatePreview();
            }
View Full Code Here


    public abstract void applyChanges() throws ConfigurationException;
    public abstract void resetChanges();

    protected DocumentListener createDocumentListener() {
        return new DocumentAdapter() {
            protected void textChanged(DocumentEvent e) {
                getConfiguration().setModified(true);
            }
        };
    }
View Full Code Here

      FileTextField fileTextField = FileChooserFactory.getInstance().createFileTextField(
        fileChooser.getDescriptor(), false, myDisposable);

      tfFile = fileTextField.getField();
      tfFile.setColumns(60);
      DocumentAdapter textFieldsListener = new DocumentAdapter()
      {
        public void textChanged(DocumentEvent event)
        {
          setOKActionEnabled(!tfFile.getText().trim().equals(review.getFile()));
        }
View Full Code Here

    public void setConnectionId(String connectionId) {
        this.connectionId = connectionId;
    }

    protected DocumentListener createDocumentListener() {
        return new DocumentAdapter() {
            protected void textChanged(DocumentEvent e) {
                GenericConnectionDatabaseSettings connectionConfig = getConfiguration();
                connectionConfig.setModified(true);

                Document document = e.getDocument();
View Full Code Here

          }
          return super.getInitialFile();
        }
    });

    final DocumentListener updateOkButtonListener = new DocumentAdapter() {
      @Override protected void textChanged(DocumentEvent e) {
        updateButtons();
      }
    };
    myParentDirectory.getChildComponent().getDocument().addDocumentListener(updateOkButtonListener);
View Full Code Here

      FileTextField fileTextField = FileChooserFactory.getInstance().createFileTextField(
        fileChooser.getDescriptor(), false, myDisposable);

      tfFile = fileTextField.getField();
      tfFile.setColumns(60);
      DocumentAdapter textFieldsListener = new DocumentAdapter()
      {
        public void textChanged(DocumentEvent event)
        {
          setOKActionEnabled(!tfFile.getText().trim().equals(review.getFile()));
        }
View Full Code Here

    DefaultListCellRenderer comboRenderer = createComboReviewRenderer();
    cbReviewCopy.setRenderer(comboRenderer);
    cbReviewLink.setRenderer(comboRenderer);

    DocumentAdapter textFieldsListener = new DocumentAdapter()
    {
      public void textChanged(DocumentEvent event)
      {
        setOKActionEnabled((!createMode)
        || ((tfName.getText().trim().length() > 0)
View Full Code Here

        for (StatementExecutionVariable variable: variablesBundle.getVariables()) {
            StatementExecutionVariableValueForm variableValueForm = new StatementExecutionVariableValueForm(variable);
            variableValueForms.add(variableValueForm);
            variablesPanel.add(variableValueForm.getComponent());
            variableValueForm.addDocumentListener(new DocumentAdapter() {
                protected void textChanged(DocumentEvent e) {
                    updatePreview();
                }
            });
            variableValueForm.addActionListener(new ActionListener() {
View Full Code Here

        }

        JTextField[] modifiableFields = new JTextField[]{pathToEclipsePreferenceFileJava, pathToEclipsePreferenceFileJS,
                optimizeImportGroups, disabledFileTypes, importOrder};
        for (JTextField field : modifiableFields) {
            field.getDocument().addDocumentListener(new DocumentAdapter() {
                protected void textChanged(DocumentEvent e) {
                    updateComponents();
                }
            });
        }
View Full Code Here

    }

    JTextField[] modifiableFields = new JTextField[]{pathToEclipsePreferenceFileJava,
        pathToEclipsePreferenceFileJS, disabledFileTypes, importOrder, pathToImportOrderPreferenceFile};
    for (JTextField field : modifiableFields) {
      field.getDocument().addDocumentListener(new DocumentAdapter() {
        protected void textChanged(DocumentEvent e) {
          updateComponents();
        }
      });
    }

    eclipsePreferenceFilePathJavaBrowse.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        browseForFile(pathToEclipsePreferenceFileJava);
      }
    });
    pathToImportOrderPreferenceFileBrowse.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        browseForFile(pathToImportOrderPreferenceFile);
      }
    });
    eclipsePreferenceFilePathJSBrowse.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        browseForFile(pathToEclipsePreferenceFileJS);
      }
    });

    rootComponent.addAncestorListener(new AncestorListener() {
      public void ancestorAdded(AncestorEvent event) {
        // Called when component becomes visible, to ensure that the
        // popups
        // are visible when the form is shown for the first time.
        updateComponents();
      }

      public void ancestorRemoved(AncestorEvent event) {
      }

      public void ancestorMoved(AncestorEvent event) {
      }
    });

    pathToEclipsePreferenceFileJava.getDocument().addDocumentListener(new DocumentAdapter() {
      @Override
      protected void textChanged(DocumentEvent e) {
        setJavaFormatterProfileModel();
      }
    });

    pathToEclipsePreferenceFileJS.getDocument().addDocumentListener(new DocumentAdapter() {
      @Override
      protected void textChanged(DocumentEvent e) {
        setJavaScriptFormatterProfileModel();
      }
    });
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.