Package org.eobjects.datacleaner.util

Examples of org.eobjects.datacleaner.util.DCDocumentListener


    _userPreferences = userPreferences;
    _originalsynonymCatalog = synonymCatalog;
    _catalog = catalog;

    _nameTextField = WidgetFactory.createTextField("Synonym catalog name");
    _nameTextField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent e) {
        _nameAutomaticallySet = false;
      }
    });
View Full Code Here


        }
      }
    };
    valueDistributionCheckBox.addActionListener(actionListener);
    patternFinderCheckBox.addActionListener(actionListener);
    columnsTextField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        actionListener.actionPerformed(null);
      }
    });
View Full Code Here

    final DCPanel proxyPanel = new DCPanel().setTitledBorder("Proxy settings");

    final JTextField proxyHostField = WidgetFactory.createTextField("Proxy host");
    proxyHostField.setText(_userPreferences.getProxyHostname());
    proxyHostField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent e) {
        _userPreferences.setProxyHostname(proxyHostField.getText());
      }
    });
    WidgetUtils.addToGridBag(new JLabel("Proxy host"), proxyPanel, 0, 0);
    WidgetUtils.addToGridBag(proxyHostField, proxyPanel, 1, 0);

    final JTextField proxyPortField = WidgetFactory.createTextField("Proxy port");
    proxyPortField.setDocument(new NumberDocument());
    proxyPortField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        int port;
        try {
          port = Integer.parseInt(proxyPortField.getText());
        } catch (Exception e) {
          port = 8080;
        }
        _userPreferences.setProxyPort(port);
      }
    });
    proxyPortField.setText("" + _userPreferences.getProxyPort());
    WidgetUtils.addToGridBag(new JLabel("Proxy port"), proxyPanel, 0, 1);
    WidgetUtils.addToGridBag(proxyPortField, proxyPanel, 1, 1);

    final JCheckBox proxyAuthCheckBox = new JCheckBox("Enable authentication?",
        _userPreferences.isProxyAuthenticationEnabled());
    proxyAuthCheckBox.setOpaque(false);
    proxyAuthCheckBox.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        _userPreferences.setProxyAuthenticationEnabled(proxyAuthCheckBox.isSelected());
      }
    });

    final DCPanel proxyAuthPanel = new DCPanel().setTitledBorder("Proxy authentication");
    final JTextField proxyUsernameField = WidgetFactory.createTextField("Username");
    proxyUsernameField.setText(_userPreferences.getProxyUsername());
    proxyUsernameField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        _userPreferences.setProxyUsername(proxyUsernameField.getText());
      }
    });
    WidgetUtils.addToGridBag(new JLabel("Username"), proxyAuthPanel, 0, 0);
    WidgetUtils.addToGridBag(proxyUsernameField, proxyAuthPanel, 1, 0);

    final JPasswordField proxyPasswordField = new JPasswordField(_userPreferences.getProxyPassword());
    proxyPasswordField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        _userPreferences.setProxyPassword(String.valueOf(proxyPasswordField.getPassword()));
      }
    });
View Full Code Here

      _datastoreNameField.setEnabled(false);
      _filenameField.setFilename(getFilename(_originalDatastore));
    }

    // add listeners after setting initial values.
    _datastoreNameField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        validateAndUpdate();
      }
    });
    setFileFilters(_filenameField);
    _filenameField.getTextField().getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent e) {
        validateAndUpdate();
      }
    });
View Full Code Here

  @Inject
  protected FixedWidthDatastoreDialog(@Nullable FixedWidthDatastore originalDatastore,
      MutableDatastoreCatalog mutableDatastoreCatalog, WindowContext windowContext, UserPreferences userPreferences) {
    super(originalDatastore, mutableDatastoreCatalog, windowContext, userPreferences);
    _updatePreviewTableDocumentListener = new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        onSettingsUpdated(false);
      }
    };
View Full Code Here

    _referenceDataCatalog = referenceDataCatalog;
    _datastoreCatalog = datastoreCatalog;
    _injectorBuilder = injectorBuilder;

    _nameTextField = WidgetFactory.createTextField("Dictionary name");
    _nameTextField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent e) {
        _nameAutomaticallySet = false;
      }
    });
View Full Code Here

          _separatorCharField.setSelectedItem(SEPARATOR_TAB);
        }
      }
    });

    filenameField.getTextField().getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent e) {
        onSettingsUpdated(true, true);
      }
    });
View Full Code Here

    super(windowContext, imageManager.getImage("images/window/banner-datastores.png"));
    _mutableDatastoreCatalog = mutableDatastoreCatalog;
    _originalDatastore = originalDatastore;
    _statusLabel = DCLabel.bright("");
    _datastoreNameField = WidgetFactory.createTextField("Datastore name");
    _datastoreNameField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        updateStatusLabel();
      }
    });
View Full Code Here

TOP

Related Classes of org.eobjects.datacleaner.util.DCDocumentListener

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.