KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SnowMailClient > model > SearchResults


1 package SnowMailClient.model;
2
3 import SnowMailClient.Language.Language;
4 import javax.swing.tree.*;
5 import javax.swing.*;
6 import java.util.*;
7
8 public final class SearchResults extends DefaultTreeModel
9 {
10   final private DefaultMutableTreeNode root;
11
12   public SearchResults()
13   {
14      super(new DefaultMutableTreeNode(
15         Language.translate("Search (right-click in a folder)")));
16
17      this.root = (DefaultMutableTreeNode) this.getRoot();
18   }
19
20   public void addHit(final SearchHit hit)
21   {
22      this.insertNodeInto(new DefaultMutableTreeNode(hit), root, root.getChildCount());
23   }
24
25 }
Popular Tags