Package net.sourceforge.squirrel_sql.fw.gui

Examples of net.sourceforge.squirrel_sql.fw.gui.IFileListBoxModel


    _url.setText(_sqlDriver.getUrl());
    _weburl.setText(_sqlDriver.getWebSiteUrl());

    _extraClassPathList.removeAll();
    String[] fileNames = _sqlDriver.getJarFileNames();
    IFileListBoxModel model = _extraClassPathList.getTypedModel();
    for (int i = 0; i < fileNames.length; ++i)
    {
      model.addFile(new File(fileNames[i]));
    }

    if (model.getSize() > 0)
    {
      _extraClassPathList.setSelectedIndex(0);
    }

  }
View Full Code Here


  {
    _javaClasspathListDriversBtn = new ListDriversButton(_javaClassPathList);
    _javaClasspathListDriversBtn.setEnabled(_javaClassPathList.getModel().getSize() > 0);
    // _javaClassPathList.addListSelectionListener(new JavaClassPathListBoxListener());

    IFileListBoxModel model = _javaClassPathList.getTypedModel();
    if (model.getSize() > 0)
    {
      _javaClassPathList.setSelectedIndex(0);
    }

    JPanel pnl = new JPanel(new GridBagLayout());
View Full Code Here

        synchronized (_extraClassPathList)
        {
          int idx = _extraClassPathList.getSelectedIndex();
          if (idx > 0)
          {
            IFileListBoxModel model = _extraClassPathList.getTypedModel();
            File file = model.removeFile(idx);
            --idx;
            model.insertFileAt(file, idx);
            _extraClassPathList.setSelectedIndex(idx);
          }
        }
      }
    });

    _extraClasspathDownBtn = new JButton(s_stringMgr.getString("DriverInternalFrame.down"));
    _extraClasspathDownBtn.setEnabled(false);
    _extraClasspathDownBtn.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        synchronized (_extraClassPathList)
        {
          int idx = _extraClassPathList.getSelectedIndex();
          IFileListBoxModel model = _extraClassPathList.getTypedModel();
          if (idx > -1 && idx < (model.getSize() - 1))
          {
            File file = model.removeFile(idx);
            ++idx;
            model.insertFileAt(file, idx);
            _extraClassPathList.setSelectedIndex(idx);
          }
        }
      }
    });

    JButton newBtn = new AddListEntryButton();

    _extraClasspathDeleteBtn = new JButton(s_stringMgr.getString("DriverInternalFrame.delete"));
    _extraClasspathDeleteBtn.setEnabled(false);
    _extraClasspathDeleteBtn.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        int idx = _extraClassPathList.getSelectedIndex();
        if (idx != -1)
        {
          IFileListBoxModel model = _extraClassPathList.getTypedModel();
          model.removeFile(idx);
          final int size = model.getSize();
          if (idx < size)
          {
            _extraClassPathList.setSelectedIndex(idx);
          }
          else if (size > 0)
View Full Code Here

      if (returnVal == JFileChooser.APPROVE_OPTION)
      {
        File[] selFiles = _chooser.getSelectedFiles();
        if (selFiles != null)
        {
          IFileListBoxModel myModel = _extraClassPathList.getTypedModel();
          for (int i = 0; i < selFiles.length; ++i)
          {
            myModel.addFile(selFiles[i]);
          }
          _extraClassPathList.setSelectedIndex(myModel.getSize() - 1);
        }
      }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.gui.IFileListBoxModel

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.