Package org.jmule.core.searchmanager

Examples of org.jmule.core.searchmanager.SearchResultItem


 
  public Component getTableCellRendererComponent(JTable table, Object value,
      boolean isSelected, boolean hasFocus, int row, int column) {
    super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
        search_result = (SearchResultItem)value;
        SearchResultItem search_result = (SearchResultItem)value;
       // if( _download_manager.hasDownload(search_result.getFileHash()) )
    //  this.setForeground(Color.GREEN);
    // else
    if( _sharing_manager.hasFile(search_result.getFileHash()) )
        this.setForeground(Color.RED);
     else this.setForeground(Color.BLACK);
    return this;
  }
View Full Code Here


          byte clientID[] = new byte[4];
          packet_data.get(clientID);

          short clientPort = packet_data.getShort();

          SearchResultItem result = new SearchResultItem(
              new FileHash(fileHash), new ClientID(clientID),
              clientPort);
          int tag_count = packet_data.getInt();

          for (int j = 0; j < tag_count; j++) {
            Tag tag = TagScanner.scanTag(packet_data);
            result.addTag(tag);
          }
          // transform Server's file rating into eMule file rating
          if (result.hasTag(FT_FILERATING)) {
            Tag tag = result.getTag(FT_FILERATING);
            try {
              int data = (Integer) tag.getValue();
              data = Convert.byteToInt(Misc.getByte(data, 0));
              int rating_value = data / SERVER_SEARCH_RATIO;
              tag.setValue(rating_value);
View Full Code Here

TOP

Related Classes of org.jmule.core.searchmanager.SearchResultItem

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.