QueryResultList.java
| Index Score | ||
|---|---|---|
![]() |
![]() |
org.furthurnet.xmlparser |
![]() |
![]() |
Furthurnet |
View: Reasons, Metrics, Source Code
These are the metrics that contribute to the Enerjy Score for this file, ranked by impact. So the metrics listed at the top influence the score to a greater extent that the metrics listed at the bottom.
/*
* FURTHUR - A distributed peer-to-peer file sharing system.
* Copyright (C) 2001-2002 Jamie M. Addessi, Furthur Network
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.furthurnet.xmlparser;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.Vector;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.TableColumnModelEvent;
import javax.swing.event.TableColumnModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import org.furthurnet.datastructures.SortedTable;
import org.furthurnet.datastructures.supporting.ColumnInfo;
import org.furthurnet.datastructures.supporting.Common;
import org.furthurnet.datastructures.supporting.DownloadTracker;
import org.furthurnet.furi.MainFrame;
import org.furthurnet.furi.MaintainResultListSelections;
import org.furthurnet.furi.RemoteFile;
import org.furthurnet.furi.Res;
import org.furthurnet.furi.ServiceManager;
public class QueryResultList implements TableColumnModelListener, ActionListener, KeyListener
{
public static final int MAX_RESULTS = 255;
public static final int NORMAL = 0;
public static final int PARTIALS = 1;
public static final int BACKGROUND = 2;
public Vector resultList; // Vector of QueryResultItem
private JPanel tablePanel;
private SortedTable tableView = null;
private QueryResultTableModel tableModel = null;
private JPanel viewport = null;
private JScrollPane scrollpane = null;
private int updateCount = 0;
private int type;
private JPanel detailsPanel = null;
private JPanel[] detailsRow = null;
private String networkType;
private NetworkSpec ns;
private TableColumnModel columnInfo = null;
private PopupProviderResult popupPro;
private boolean autoChooseVersions;
private boolean suppressMatches;
private MaintainResultListSelections mrls = null;
private MainFrame mainFrame;
private QueryResultList() {}
public QueryResultList(NetworkSpec _ns, JLabel noResultsLabel,
boolean sizeable, int _type,
PopupProviderResult _popupPro) throws XmlException
{
tablePanel = new JPanel();
tablePanel.setLayout(new BorderLayout());
resultList = new Vector();
ns = _ns;
networkType = ns.getNetworkType();
type = _type;
popupPro = _popupPro;
mainFrame = ServiceManager.getManager().getMainFrame();
if (type != BACKGROUND)
generateTable(ns, noResultsLabel, sizeable, type);
if (type == PARTIALS)
{
tablePanel.removeAll();
tablePanel.add(scrollpane, BorderLayout.CENTER);
tablePanel.validate();
}
autoChooseVersions = ServiceManager.getCfg().mAutoChooseVersions;
suppressMatches = ServiceManager.getCfg().mSuppressDups;
}
private void generateTable(NetworkSpec ns, JLabel noResultsLabel, boolean sizeable, int type)
{
tableModel = new QueryResultTableModel(resultList, ns, type);
tableView = new SortedTable(tableModel);
tableView.addMouseListener(new MyMouseAdapter());
tableView.getTableHeader().addMouseListener(new TableHeaderListener());
tableView.setLayout(new BorderLayout());
tableView.setRowHeight(18);
tableView.getTableHeader().setReorderingAllowed(true);
tableView.getColumnModel().addColumnModelListener(this);
tableView.setShowHorizontalLines(true);
tableView.setShowVerticalLines(true);
tableView.setIntercellSpacing(new Dimension(1, 1));
tableView.setCellSelectionEnabled(false);
tableView.setColumnSelectionAllowed(false);
tableView.setRowSelectionAllowed(true);
tableView.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
mrls = new MaintainResultListSelections(tableView, tableModel);
tableView.getSelectionModel().addListSelectionListener(mrls);
tableView.getModel().addTableModelListener(mrls);
tableView.addKeyListener(this);
setHiddenCols();
if (type == NORMAL)
tableView.getColumnModel().getColumn(0).setCellRenderer(new SearchIconRenderer());
else if (type == PARTIALS)
tableView.getColumnModel().getColumn(1).setCellRenderer(new PartialsIconRenderer());
if (columnInfo == null)
{
columnInfo = tableView.getColumnModel();
try
{
ColumnInfo prefs = mainFrame.getEncodedColumnInfo(networkType, type);
decodeColumnPositions(prefs);
decodeColumnWidths(prefs);
}
catch (Exception e)
{}
}
//tableView.setBackground(Color.lightGray);
// viewport = new JPanel(new BorderLayout());
// resizeList();
// viewport.add(tableView, BorderLayout.CENTER);
// viewport.add(tableView.getTableHeader(), BorderLayout.NORTH);
scrollpane = new JScrollPane(tableView);
scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
tablePanel.add(noResultsLabel, BorderLayout.CENTER);
updateCount = 0;
}
public synchronized void addResult(QueryResultItem qri, boolean searchResults)
{
try
{
//String selected = getSelected();
if (qri.attributes != null)
{
if (mainFrame.validationList != null)
if (mainFrame.validationList.findMd5(qri.id))
return;
if (!qri.attributes.validateAttributes(ns))
return;
}
int prevSize = resultList.size();
if (searchResults)
{
QueryResultItem match = alreadyContains(qri);
if (match != null)
{
match.additionalSourceFound(qri);
if (type != BACKGROUND)
tableModel.fireTableDataChanged();
return;
}
QueryResultItem differentVersion = null;
if (autoChooseVersions)
differentVersion = matchesName(qri);
else
differentVersion = matchesNameAndAttributes(qri);
if (differentVersion != null)
{
QueryResultItem better = differentVersion.additionalVersionFoundIsBetter(qri);
// note that better does not equal qri, it is the root host for qri's file set
if (better != null)
reorganizeHosts(differentVersion, better);
if (type != BACKGROUND)
tableModel.fireTableDataChanged();
return;
}
}
resultList.addElement(qri);
if (type != BACKGROUND)
{
tableModel.fireTableRowsInserted(prevSize, resultList.size()-1);
if ((prevSize == 0) && (resultList.size() > 0))
{
tablePanel.removeAll();
tablePanel.add(scrollpane, BorderLayout.CENTER);
tablePanel.validate();
}
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
public synchronized void removeResult(String id)
{
try
{
for (int i=0; i<resultList.size(); i++)
if (((QueryResultItem)resultList.elementAt(i)).id.equals(id)) {
resultList.removeElementAt(i);
tableModel.fireTableRowsDeleted(i,i);
}
}
catch (Exception e)
{}
}
public synchronized void setResultDownloading(String id)
{
try
{
for (int i=0; i<resultList.size(); i++) {
if (((QueryResultItem)resultList.elementAt(i)).id.equals(id)) {
((QueryResultItem)resultList.elementAt(i)).localMatches =
QueryResultItem.ALREADY_DOWNLOADING;
tableModel.fireTableRowsUpdated(i,i);
}
}
}
catch (Exception e)
{}
}
public synchronized Vector removeSelectedRowsAndReturnSaveNames()
{
Vector removed = new Vector(); // Strings
try
{
int[] selected = tableView.getSelectedRows();
for (int i=selected.length-1; i>=0; i--)
{
if (((QueryResultItem)resultList.elementAt(selected[i])).status.equals("Stopped"))
if (!DownloadTracker.isCurrentlyDownloading(((QueryResultItem)resultList.elementAt(selected[i])).id))
removed.add(((QueryResultItem)resultList.remove(selected[i])).getSaveName());
}
}
catch (Exception e)
{
}
if (removed.size() > 0)
{
tableModel.fireTableDataChanged();
tableView.validate();
}
return removed;
}
public synchronized void removeSelectedRows()
{
try
{
int[] selected = tableView.getSelectedRows();
for (int i=selected.length-1; i>=0; i--)
tableModel.removeRow(selected[i]);
}
catch (Exception e)
{
}
tableModel.fireTableDataChanged();
tableView.validate();
//tableView.resort();
}
public synchronized QueryResultItem getSelectedRow() throws Exception {
int[] selected = tableView.getSelectedRows();
if (selected.length < 1) {
return null;
}
return (QueryResultItem)resultList.elementAt(selected[0]);
}
public synchronized QueryResultItem[] getSelectedRows() throws Exception
{
int[] selected = tableView.getSelectedRows();
QueryResultItem qris[] = new QueryResultItem[selected.length];
for (int i=0;i<selected.length;i++) {
qris[i] = (QueryResultItem)resultList.elementAt(selected[i]);
}
return qris;
}
public synchronized void addResults(Vector newList)
{
try
{
updateCount++;
int prevSize = resultList.size();
synchronized(resultList)
{
for (int i=0; i< newList.size(); i++)
{
try
{
QueryResultItem next = new QueryResultItem((XmlObject)XmlObject.parse(((RemoteFile)newList.elementAt(i)).getFilename()).elementAt(0), networkType);
boolean nameExists = mainFrame.matchExisting(networkType, next.size, next.id, next.getName());
boolean idExists = mainFrame.matchExisting(networkType, next.size, next.id, null);
if (!idExists)
idExists = mainFrame.matchAmbiguousExisting(networkType, next.size, next.getName());
next.localMatches = QueryResultItem.NO_MATCH;
if (idExists)
{
if (mainFrame.matchAmbiguousPartial(networkType, next.size, next.getName()))
next.localMatches = QueryResultItem.ALREADY_DOWNLOADING;
else
next.localMatches = QueryResultItem.ALREADY_HAVE_SHARED;
}
boolean skipMatch = false;
if ((suppressMatches) && (type == NORMAL))
{
if (autoChooseVersions)
skipMatch = nameExists;
else
skipMatch = idExists;
}
if (!skipMatch)
{
if ((next.remoteVer != null) && (next.remoteVer.compareTo("1.5.4") >= 0)) // only show results from clients higher than 1.5.4
{
if (next.id != null)
addResult(next, true);
}
}
}
catch (Exception e)
{}
}
}
if (type != BACKGROUND)
{
if ((prevSize > 0) && (prevSize == resultList.size())) return;
if ((prevSize == 0) && (resultList.size() > 0)) {
tablePanel.removeAll();
tablePanel.add(scrollpane, BorderLayout.CENTER);
tablePanel.validate();
//tableModel.fireTableDataChanged();
} else if ((updateCount == 40) && (resultList.size() == 0)) {
JLabel unsuccessfulSearch = new JLabel("", JLabel.CENTER);
unsuccessfulSearch.setText("Search complete. No results found.");
tablePanel.removeAll();
tablePanel.add(unsuccessfulSearch, BorderLayout.CENTER);
tablePanel.validate();
}
tableModel.fireTableRowsInserted(prevSize, resultList.size()-1);
updateDetails();
}
}
catch (Exception e)
{}
}
private synchronized QueryResultItem alreadyContains(QueryResultItem target)
{
// base on md5 id
for (int i=0; i<resultList.size(); i++)
if (((QueryResultItem)resultList.elementAt(i)).id.equalsIgnoreCase(target.id))
return ((QueryResultItem)resultList.elementAt(i));
return null;
}
private synchronized QueryResultItem matchesName(QueryResultItem target)
{
for (int i=0; i<resultList.size(); i++)
if (((QueryResultItem)resultList.elementAt(i)).getName().equalsIgnoreCase(target.getName()))
return ((QueryResultItem)resultList.elementAt(i));
return null;
}
private synchronized QueryResultItem matchesNameAndAttributes(QueryResultItem target)
{
for (int i=0; i<resultList.size(); i++)
if ((((QueryResultItem)resultList.elementAt(i)).getName().equalsIgnoreCase(target.getName()))
&& (((QueryResultItem)resultList.elementAt(i)).attributes.getXml().equalsIgnoreCase(target.attributes.getXml())))
return ((QueryResultItem)resultList.elementAt(i));
return null;
}
public JPanel getTable()
{
return tablePanel;
}
public void showDetails()
{
int r = tableView.getSelectedRow();
String details = new String("");
if (r == -1)
return;
QueryResultItem qri = ((QueryResultItem)resultList.elementAt(r));
for (int i=0; i<tableModel.getColumnCount(); i++)
{
String value = formatString((String)tableModel.getValueAt(r, i), true);
if (!Common.equalStrings(value, "Unknown"))
details += tableModel.getColumnName(i) + " : " + value + "\n";
}
JOptionPane.showMessageDialog(mainFrame, details, "Details for " + qri.getName(), JOptionPane.PLAIN_MESSAGE);
}
public void updateDetails()
{
int r = tableView.getSelectedRow();
if (detailsPanel == null)
{
detailsPanel = new JPanel(new FlowLayout());
detailsPanel.setPreferredSize(new Dimension(550, 400));
detailsRow = new JPanel[tableModel.getColumnCount()];
for (int i=0; i<tableModel.getColumnCount(); i++)
{
detailsRow[i] = new JPanel(new BorderLayout());
detailsPanel.add(detailsRow[i]);
}
}
if (r == -1)
return;
QueryResultItem qri = ((QueryResultItem)resultList.elementAt(r));
for (int i=0; i<tableModel.getColumnCount(); i++)
{
String value = formatString((String)tableModel.getValueAt(r, i), true);
detailsRow[i].removeAll();
if ((value != null) && (value.trim().length() > 0) && (!Common.equalStrings(value, "Unknown")))
{
detailsRow[i].add(new JLabel(tableModel.getColumnName(i) + " : "), BorderLayout.WEST);
JTextArea val = new JTextArea(" " + value + " ");
val.setEditable(false);
val.setBackground(detailsRow[i].getBackground());
val.setBorder(BorderFactory.createLineBorder(Color.lightGray));
detailsRow[i].add(val, BorderLayout.CENTER);
}
}
detailsPanel.validate();
}
public JPanel getSelectedItemDetails()
{
updateDetails();
return detailsPanel;
}
private String formatString(String orig, boolean breakLines)
{
if (orig == null)
return new String("");
if (!breakLines)
return orig;
String temp = new String(orig);
String res = new String("");
int len = 80;
while (temp.length() > len)
{
int i=len-1;
for (; i>len-20;i--)
if (temp.charAt(i) == ' ')
break;
if (temp.charAt(i) != ' ')
i = len-1;
res += temp.substring(0, i+1) + "\n";
temp = temp.substring(i+1);
}
res += temp;
return res;
}
class MyMouseAdapter extends MouseAdapter
{
public void displayPopup(MouseEvent e) {
Point p = e.getPoint();
int row = tableView.rowAtPoint(p);
tableView.getSelectionModel().setSelectionInterval(row,row);
popupPro.getPopup(((QueryResultItem)resultList.elementAt(row))).show(e.getComponent(), e.getX(), e.getY());
}
public void mousePressed(MouseEvent e)
{
if (e.getClickCount() == 2)
{
Point p = e.getPoint();
int row = tableView.rowAtPoint(p);
tableView.getSelectionModel().setSelectionInterval(row,row);
int r = tableView.getSelectedRow();
Rectangle rect = tableView.getCellRect(r, 0, true);
if (p.y > rect.y && p.y < rect.y + rect.height)
{
popupPro.doubleClick();
}
}
else if (e.isPopupTrigger())
displayPopup(e);
}
public void mouseReleased(MouseEvent e)
{
updateDetails();
if (e.isPopupTrigger())
displayPopup(e);
}
}
class TableHeaderListener extends MouseAdapter
{
public void mouseReleased(MouseEvent e)
{
updateColumnInfo();
}
}
private void updateColumnInfo()
{
ColumnInfo info = new ColumnInfo(networkType, type);
int count = columnInfo.getColumnCount();
info.columnName = new String[count];
info.columnWidth = new int[count];
for (int i=0; i<count; i++)
{
info.columnName[i] = (String)columnInfo.getColumn(i).getHeaderValue();
info.columnWidth[i] = columnInfo.getColumn(i).getWidth();
}
mainFrame.updateColumnInfo(info);
}
public synchronized void update() {
for (int i=0;i<resultList.size();i++) {
tableModel.fireTableRowsUpdated(i,i);
}
}
public synchronized void removeItemAndNameMatches(QueryResultItem qri)
{
for (int i=resultList.size()-1; i>=0; i--)
{
QueryResultItem next = ((QueryResultItem)resultList.elementAt(i));
try
{
if ((next.getName().equals(qri.getName())) || (next.id.equals(qri.id)))
resultList.remove(next);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
public synchronized QueryResultItem getNextAutoRetry(int timeout)
{
long currentTime = System.currentTimeMillis();
for (int i=0; i<resultList.size(); i++)
{
QueryResultItem next = ((QueryResultItem)resultList.elementAt(i));
if ((next.status.equals("Stopped")) && (!DownloadTracker.isCurrentlyDownloading(next.id)))
if (currentTime - next.lastAutoRetry > timeout)
{
next.lastAutoRetry = currentTime;
return next;
}
}
return null;
}
public void setDownloadStopTime(String id)
{
long currentTime = System.currentTimeMillis();
for (int i=0; i<resultList.size(); i++)
{
QueryResultItem next = ((QueryResultItem)resultList.elementAt(i));
if (next.id.equalsIgnoreCase(id))
next.lastAutoRetry = currentTime;
}
}
/**
* For correctly updating selections when the table data changes
*
*
**/
// private String getSelected() {
// try
// {
// return getSelectedRow().name;
// }
// catch (Exception e)
// {}
// return null;
// }
// private void reselect(String name){
// try
// {
// //tableView.resort();
// }
// catch (Exception e)
// {}
// try
// {
// for (int i=0; i<resultList.size(); i++)
// {
// //QueryResultItem next = ((QueryResultItem)resultList.elementAt(tableView.getRowThatAppearsAt(i)));
// QueryResultItem next = ((QueryResultItem)resultList.elementAt(i));
// if (next.name.equalsIgnoreCase(name))
// {
// tableView.setRowSelectionInterval(i, i);
// return;
// }
// }
// }
// catch (Exception e)
// {}
// }
public void columnSelectionChanged(ListSelectionEvent e)
{}
public void columnRemoved(TableColumnModelEvent e)
{}
public void columnMoved(TableColumnModelEvent e)
{
}
public void columnMarginChanged(ChangeEvent e)
{}
public void columnAdded(TableColumnModelEvent e)
{}
private void setHiddenCols()
{
for (int i=0; i<tableModel.getColumnCount(); i++)
if (tableModel.isColumnHidden(i))
{
TableColumnModel model = tableView.getColumnModel();
TableColumn column = model.getColumn(tableView.convertColumnIndexToView(i));
model.removeColumn(column);
}
}
public boolean decodeColumnWidths(String encodedInfo)
{
try
{
String[] list = Common.tokenize(encodedInfo);
int pos = 0;
int numCols = Integer.parseInt(list[pos++]);
for (int i=0; i<numCols; i++)
columnInfo.getColumn(i).setPreferredWidth(Integer.parseInt(list[pos++]));
return true;
}
catch (Exception e)
{}
return false;
}
public void decodeColumnWidths(ColumnInfo prefs)
{
try
{
int[] widths = prefs.columnWidth;
for (int i=0; i<widths.length; i++)
columnInfo.getColumn(i).setPreferredWidth(widths[i]);
}
catch (Exception e)
{}
}
public void decodeColumnPositions(ColumnInfo prefs)
{
try
{
String[] names = prefs.columnName;
for (int i=0; i<names.length; i++)
columnInfo.moveColumn(columnInfo.getColumnIndex(names[i]), i);
}
catch (Exception e)
{}
}
public void actionPerformed(ActionEvent e)
{
showDetails();
}
public int getNumSelectedRows()
{
return tableView.getSelectedRows().length;
}
public void selectPartial(QueryResultItem qri) {
// when a new row is added by a manual download request, it is automatically selected
tableView.clearSelection();
for (int j=0;j<resultList.size();j++)
{
if (qri.equals(resultList.elementAt(j)))
{
tableView.setRowSelectionInterval(j,j);
}
}
}
public boolean matchPartial(String size, String id)
{
for (int i=0; i<resultList.size(); i++)
{
QueryResultItem next = ((QueryResultItem)resultList.elementAt(i));
if (next.id.equalsIgnoreCase(id))
return true;
}
return false;
}
public boolean matchPartialName(String name)
{
for (int i=0; i<resultList.size(); i++)
{
QueryResultItem next = ((QueryResultItem)resultList.elementAt(i));
if (next.getSaveName().equalsIgnoreCase(name))
return true;
}
return false;
}
public boolean matchAmbiguousPartial(String size, String name)
{
for (int i=0; i<resultList.size(); i++)
{
QueryResultItem next = ((QueryResultItem)resultList.elementAt(i));
if ((next.getName().equalsIgnoreCase(name)) && (new Long(next.size).toString().equals(size)))
return true;
}
return false;
}
private synchronized void reorganizeHosts(QueryResultItem orig, QueryResultItem better)
{
// orig is an element of resultList. better is an
// element of the vector orig.additionalVersionHosts that
// has been determined to be a better source than orig.
// we should replace orig with better, remove better from
// the additionalVersionHosts list, move the vector to better,
// and add orig to the additionalVersionHosts of better. -JMA
orig.additionalVersionHosts.remove(better);
better.additionalVersionHosts = orig.additionalVersionHosts;
orig.additionalVersionHosts = new Vector();
better.additionalVersionHosts.add(orig);
resultList.remove(orig);
resultList.add(better);
}
public void addMouseListener(MouseListener l)
{
tableView.addMouseListener(l);
}
public void removeMouseListener(MouseListener l)
{
tableView.removeMouseListener(l);
}
public void keyPressed(KeyEvent e)
{
mrls.valueChangedByKeyboard();
}
public void keyReleased(KeyEvent e)
{
mrls.valueChangedByKeyboard();
updateDetails();
}
public void keyTyped(KeyEvent e)
{
mrls.valueChangedByKeyboard();
}
private class SearchIconRenderer extends DefaultTableCellRenderer
{
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus,
int row, int column)
{
super.getTableCellRendererComponent(table, value, isSelected,
hasFocus, row, column);
if (((QueryResultItem)resultList.elementAt(row)).localMatches == QueryResultItem.ALREADY_DOWNLOADING)
{
setText((String)value);
setIcon(Res.getIcon("AlreadyDownloading.Icon"));
}
else if (((QueryResultItem)resultList.elementAt(row)).localMatches == QueryResultItem.ALREADY_HAVE_SHARED)
{
setText((String)value);
setIcon(Res.getIcon("AlreadyShared.Icon"));
}
else
{
setText((String)value);
this.setIcon(null);
}
return this;
}
}
private class PartialsIconRenderer extends DefaultTableCellRenderer
{
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus,
int row, int column)
{
super.getTableCellRendererComponent(table, value, isSelected,
hasFocus, row, column);
if (((String)value).indexOf("Active") == 0)
{
if (((String)value).length() > 7)
setText(((String)value).substring(7));
else
setText("Active");
if (DownloadTracker.isChained(((QueryResultItem)resultList.elementAt(row)).id))
setIcon(Res.getIcon("InChain.Icon"));
else
setIcon(Res.getIcon("Download.Icon"));
}
else
{
setText((String)value);
this.setIcon(null);
}
return this;
}
}
}
The table below shows all metrics for QueryResultList.java.




