com.limegroup.gnutella.gui.search
Class TableLine

java.lang.Object
  extended bycom.limegroup.gnutella.gui.search.TableLine

public class TableLine
extends java.lang.Object

The underlying model for one line of a result table. These are also nodes in the JTree backing the JTreeTable. Leaf nodes represent a single result from a single host. Non-leaf nodes represent groups of similar results. A special non-leaf node also exists to represent the root of all searches.

Design note: this class has a minimal set of methods and package access variables. This is intentional. Because ResultTableModel must implement many TreeModel methods like getChild(Object node, int i), it made sense to put all such methods in that class. So if the representation of TableLine changes, the changes will be localized in ResultTableModel.

This class is not thread-safe. A TableLine should only be used by one thread.


Field Summary
 int childName
          If this is not root, then this is the childName'th child of its parent, i.e., parent.getChildAt(childName)==this.
 TableLine parentLine
          If this is not the root, or a child of the root (ie, it is a grandchild), then this is the parent.
 
Method Summary
 java.lang.String[] getMetaText()
          package access, that returns the string of all the metadata
 java.lang.Object getValue(com.limegroup.gnutella.xml.LimeXMLSchema schema, int index)
          Returns the value for this index.
protected  int matchInternal(TableLine o, com.limegroup.gnutella.util.ApproximateMatcher matcher)
           
 com.limegroup.gnutella.RemoteFileDesc toRemoteFileDesc()
          Returns a new RemoteFileDesc with this name, port, etc.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

childName

public int childName
If this is not root, then this is the childName'th child of its parent, i.e., parent.getChildAt(childName)==this.


parentLine

public TableLine parentLine
If this is not the root, or a child of the root (ie, it is a grandchild), then this is the parent.

Method Detail

getValue

public java.lang.Object getValue(com.limegroup.gnutella.xml.LimeXMLSchema schema,
                                 int index)
Returns the value for this index. If the index is not a default value, it looks up that index in the schema provided.


matchInternal

protected int matchInternal(TableLine o,
                            com.limegroup.gnutella.util.ApproximateMatcher matcher)

toRemoteFileDesc

public com.limegroup.gnutella.RemoteFileDesc toRemoteFileDesc()
Returns a new RemoteFileDesc with this name, port, etc.


toString

public java.lang.String toString()

getMetaText

public java.lang.String[] getMetaText()
package access, that returns the string of all the metadata