home *** CD-ROM | disk | FTP | other *** search
- import hhapplet.ContentsTree;
- import hhapplet.SiteMapParserToContents;
- import hhapplet.URLFileHandler;
- import java.awt.Window;
- import sitemap.SiteMapParser;
- import treeview.SiblingChildTree;
- import treeview.TreeView;
- import treeview.TreeViewNode;
-
- class DoSync extends Thread {
- Window m_winToShow;
- SiteMapParser m_smpContents;
- String m_strContentItem;
-
- public DoSync(SiteMapParser var1, String var2, String var3) {
- super(var3);
- this.m_smpContents = var1;
- this.m_strContentItem = var2.replace('\\', '/');
- }
-
- public void run() {
- try {
- while(!this.m_smpContents.IsFinish()) {
- System.out.println("Wait in DoSync");
- Thread.sleep(100L);
- }
- } catch (InterruptedException var7) {
- ((Throwable)var7).printStackTrace();
- }
-
- TreeView var1 = ((SiteMapParserToContents)this.m_smpContents.getOutput()).getTree();
- TreeViewNode var2 = var1.getCurrentSelection();
- String var3 = URLFileHandler.GetNormalizedLocal2(this.m_strContentItem);
- boolean var4 = false;
- if (var2 != null) {
- String var5 = ((ContentsTree)var2).local;
- if (var5 != null) {
- var5 = var5.replace('\\', '/');
- if (var3.equalsIgnoreCase(URLFileHandler.GetNormalizedLocal2(var5))) {
- var4 = true;
- }
- }
- }
-
- if (!var4) {
- TreeViewNode var9;
- for(var9 = var1.getRoot(); var9 != null; var9 = (TreeViewNode)((SiblingChildTree)var9).nextNode()) {
- if (var9 instanceof ContentsTree) {
- String var6 = ((ContentsTree)var9).local;
- if (var6 != null) {
- var6 = var6.replace('\\', '/');
- if (var3.equalsIgnoreCase(URLFileHandler.GetNormalizedLocal2(var6))) {
- break;
- }
- }
- }
- }
-
- if (var9 != null) {
- var1.Sync(var9);
- }
- }
-
- }
- }
-