Package bin.org.jdesktop.swingx.autocomplete

Examples of bin.org.jdesktop.swingx.autocomplete.AutoCompleteDocument


  protected void setupAutoComplete() {
    JList urlList = new JList();
    urlListModel = new DefaultListModel();
    urlList.setModel(urlListModel);
    ListAdaptor adaptor = new ListAdaptor(urlList, urlField);
    AutoCompleteDocument document = new AutoCompleteDocument(adaptor, false);
    AutoCompleteDecorator.decorate(urlField, document, adaptor);

    try {
      HashSet urlSet = (HashSet) Settings.getRegistry().get("JDBCDataStep.URLS");
      if (urlSet != null) {
        for (Object url : urlSet) {
          urlListModel.addElement(url.toString());
        }
      }
    } catch (Exception ex) {
      LOG.info("Error loading urls from registry", ex);
    }

    JList driverList = new JList();
    driverListModel = new DefaultListModel();
    driverList.setModel(driverListModel);
    adaptor = new ListAdaptor(driverList, driverField);
    document = new AutoCompleteDocument(adaptor, false);
    AutoCompleteDecorator.decorate(driverField, document, adaptor);

    try {
      HashSet driverSet = (HashSet) Settings.getRegistry().get("JDBCDataStep.DRIVERS");
      if (driverSet != null) {
View Full Code Here

TOP

Related Classes of bin.org.jdesktop.swingx.autocomplete.AutoCompleteDocument

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.