Package com.jbidwatcher.search

Examples of com.jbidwatcher.search.Searcher


    boolean isUpdated = mLogin.updateLogin(getName());

    if(!mLogin.isDefault()) {
      if (isUpdated) forceLogin();

      Searcher s = SearchManager.getInstance().getSearchByName("My Selling Items");
      if(s == null) {
        mSellerSearch = SearchManager.getInstance().buildSearch(System.currentTimeMillis(), "Seller", "My Selling Items", mLogin.getUserId(), getName(), null, 1);
        mSellerSearch.setCategory("selling");
        SearchManager.getInstance().addSearch(mSellerSearch);
      } else {
        s.setSearch(mLogin.getUserId());
      }
    }
  }
View Full Code Here


   * searches to the search manager.
   *
   * @param searchManager - The search manager to add these searches to.
   */
  public void addSearches(SearchManagerInterface searchManager) {
    Searcher s = searchManager.getSearchByName("My eBay");
    if(s == null) searchManager.addSearch("My Items", "My eBay", "", Constants.EBAY_SERVER_NAME, -1, 1);
  }
View Full Code Here

    return hDoc.extractMicroformat();
  }

  private void testSearching() {
    Searcher sm = SearchManager.getInstance().addSearch("Title", "zarf", "zarf", "ebay", -1, 12345678);
    sm.execute();
  }
View Full Code Here

    if(i==4) return Integer.class; else
    return getColumnClass(i);
  }

  public Object getSortByValueAt(int i, int j) {
    Searcher s = SearchManager.getInstance().getSearchByIndex(i);

    switch(j) {
      case -1: return s;

      case 0: return s.getName();
      case 1: return s.getTypeName();
      case 2: return s.getSearch();
      case 3: return s.getServer();
      case 4: return s.getPeriod();
      case 5: return s.getLastRun() + (s.getPeriod() * Constants.ONE_HOUR);
    }

    return null;
  }
View Full Code Here

    return null;
  }

  public Object getValueAt(int i, int j) {
    Searcher s = SearchManager.getInstance().getSearchByIndex(i);

    switch(j) {
      case -1:
      case 0:
      case 1:
View Full Code Here

  private Searcher add(String type, String name, String search, String server) {
    int inc=0;
    String curName = name + Integer.toString(inc);
    SearchManager sm = SearchManager.getInstance();
    Searcher s;

    s = sm.buildSearch(System.currentTimeMillis(), type, curName, search, server, null, -1);
    _stm.insert(s);

    return s;
View Full Code Here

  public void actionPerformed(ActionEvent ae) {
    String act = ae.getActionCommand();

    if(act.equals("Add") || act.equals("Search")) {
      String text = searchString.getText();
      Searcher s = add((String)newType.getSelectedItem(), "New Search ", text, Constants.EBAY_SERVER_NAME);

      _stm.fireTableDataChanged();
      newType.setSelectedIndex(0);
      searchString.setText("");

      if(act.equals("Search")) {
        if(JConfig.debugging) System.out.println("Doing a " + newType.getSelectedItem() + " for " + text);
        s.execute();
      }
    }
  }
View Full Code Here

    JComponent inComponent = (JComponent) e.getComponent();

    if(inComponent instanceof JTable) {
      JTable thisTable = (JTable) inComponent;
      int rowPoint = thisTable.rowAtPoint(new Point(e.getX(), e.getY()));
      Searcher whichSearch = (Searcher) thisTable.getValueAt(rowPoint, -1);

      whichSearch.execute();
    }
  }
View Full Code Here

    }
  }

  public void actionPerformed(ActionEvent ae) {
    String actionString = ae.getActionCommand();
    Searcher whichSearch = null;
    if(actionString.startsWith(Constants.NO_CONTEXT)) {
      actionString = actionString.substring(Constants.NO_CONTEXT.length());
    } else {
      if(_inTable != null) {
        int rowPoint = _inTable.rowAtPoint(new Point(getPopupX(), getPopupY()));
View Full Code Here

    return !(endResult == JOptionPane.CANCEL_OPTION ||
        endResult == JOptionPane.CLOSED_OPTION);
  }

  private void DoDelete(Searcher chosenSearch) {
    Searcher s = chosenSearch;
    int[] rows = getPossibleRows();
    String prompt;

    if( (rows.length <= 1) && s != null) {
      if(rows.length == 1) s = (Searcher)_inTable.getValueAt(rows[0], -1);

      prompt = "<HTML><BODY>Are you sure you want to remove this search?<br><b>" + s.getName() + "</b></body></html>";
      //  Use the right parent!  FIXME -- mrs: 17-February-2003 23:53
      if(confirmDeletion(null, prompt)) {
        SearchManager.getInstance().deleteSearch(s);
      }
    } else {
View Full Code Here

TOP

Related Classes of com.jbidwatcher.search.Searcher

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.