home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / samples.z / WebCrawler.wxf < prev    next >
Text File  |  1996-12-08  |  5KB  |  254 lines

  1. Save Format v1.3
  2. @begin Form "WebCrawler"
  3.  Exported 0;
  4.  Abstract 0;
  5.  Interface 0;
  6.  PackageName "";
  7.  
  8.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__Form"
  9.   Font "Dialog-Plain-8";
  10.   ControlScope "Private";
  11.   BackColor "Color.lightGray";
  12.   ForeColor "Color.black";
  13.   Text "";
  14.   Visible "1";
  15.   DataSource "NULL";
  16.   DataColumns "";
  17.   BoundControl "0";
  18.   @begin Event "Create"
  19.    GencodeSrcLine 103;
  20.    FunctionName "WebCrawler_Create";
  21.   @end;
  22.   @begin UserFunction "Form1()"
  23.    Compiler 1;
  24.    GencodeSrcLine 85;
  25.    FunctionName "WebCrawler::Form1()";
  26.   @end;
  27.   @begin UserFunction "addLink(String newURL)"
  28.    GencodeSrcLine 97;
  29.    FunctionName "WebCrawler::addLink(String newURL)";
  30.   @end;
  31.   @begin UserFunction "Prototype for addLink(String newURL)"
  32.    Private 1;
  33.    GencodeSrcLine -1;
  34.    FunctionName "WebCrawler::Prototype for addLink(String newURL)";
  35.   @end;
  36.   ResID 102;
  37.   DesignName WebCrawler;
  38.   TabIndex 0;
  39.   DesignRect 133,180,262,257;
  40.  @end;
  41.  
  42.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__Label"
  43.   Font "<Inherited>";
  44.   BackColor "Color.lightGray";
  45.   ForeColor "Color.black";
  46.   Text "Starting URL:";
  47.   Visible "1";
  48.   DataSource "NULL";
  49.   DataColumns "";
  50.   BoundControl "0";
  51.   ResID 100;
  52.   DesignName label_1;
  53.   TabIndex 0;
  54.   DesignRect 0,10,55,10;
  55.  @end;
  56.  
  57.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__TextBox"
  58.   Font "<Inherited>";
  59.   PasswordCharacter "0";
  60.   BackColor "Color.lightGray";
  61.   ForeColor "Color.black";
  62.   Text "";
  63.   Visible "1";
  64.   DataSource "NULL";
  65.   DataColumns "";
  66.   BoundControl "0";
  67.   ResID 101;
  68.   DesignName textb_startingURL;
  69.   TabIndex 1;
  70.   DesignRect 55,5,145,15;
  71.  @end;
  72.  
  73.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__CommandButton"
  74.   Font "<Inherited>";
  75.   BackColor "Color.lightGray";
  76.   ForeColor "Color.black";
  77.   Text "Crawl";
  78.   Visible "1";
  79.   DataSource "NULL";
  80.   DataColumns "";
  81.   BoundControl "0";
  82.   @begin Event "Click"
  83.    GencodeSrcLine 110;
  84.    FunctionName "cb_crawl_Click";
  85.   @end;
  86.   ResID 102;
  87.   DesignName cb_crawl;
  88.   TabIndex 2;
  89.   DesignRect 210,5,45,15;
  90.  @end;
  91.  
  92.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__ListBox"
  93.   Font "<Inherited>";
  94.   Sort "0";
  95.   DataTrackRow "0";
  96.   DataBindAsLookup "0";
  97.   DataLookupSource "NULL";
  98.   DataLookupColumns "";
  99.   BackColor "Color.lightGray";
  100.   ForeColor "Color.black";
  101.   Text "";
  102.   Visible "1";
  103.   DataSource "NULL";
  104.   DataColumns "";
  105.   BoundControl "0";
  106.   ResID 103;
  107.   DesignName lb_links;
  108.   TabIndex 3;
  109.   DesignRect 0,40,255,175;
  110.  @end;
  111.  
  112.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__Label"
  113.   Font "<Inherited>";
  114.   BackColor "Color.lightGray";
  115.   ForeColor "Color.black";
  116.   Text "Links Found:";
  117.   Visible "1";
  118.   DataSource "NULL";
  119.   DataColumns "";
  120.   BoundControl "0";
  121.   ResID 104;
  122.   DesignName label_2;
  123.   TabIndex 4;
  124.   DesignRect 0,30,60,10;
  125.  @end;
  126.  
  127.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__CommandButton"
  128.   Font "<Inherited>";
  129.   BackColor "Color.lightGray";
  130.   ForeColor "Color.black";
  131.   Text "Clear Links";
  132.   Visible "1";
  133.   DataSource "NULL";
  134.   DataColumns "";
  135.   BoundControl "0";
  136.   @begin Event "Click"
  137.    GencodeSrcLine 119;
  138.    FunctionName "cb_ClearLinks_Click";
  139.   @end;
  140.   ResID 106;
  141.   DesignName cb_ClearLinks;
  142.   TabIndex 5;
  143.   DesignRect 190,220,65,15;
  144.  @end;
  145.  
  146.  @begin HPPPrefixBlock
  147. @begin-code HPPPrefix
  148.  
  149. // add your custom import statements here
  150.  
  151. @end-code;
  152.   GencodeSrcLine 15;
  153.  @end;
  154.  
  155.  @begin CPPPrefixBlock
  156. @begin-code CPPPrefix
  157.  
  158.  
  159. @end-code;
  160.   GencodeSrcLine 15;
  161.  @end;
  162.  
  163.  @begin ClassContentsBlock
  164. @begin-code ClassContents
  165.  
  166.     // add your data members here
  167.     PageSeeker _firstPageSeeker;
  168.  
  169. @end-code;
  170.   GencodeSrcLine 139;
  171.  @end;
  172.  
  173. @begin-code BaseClassList
  174.  
  175. extends powersoft.jcm.ui.Form
  176.  
  177. @end-code;
  178.  
  179. @begin-code GeneratedClassContents
  180.  
  181.         WebCrawler();
  182.  
  183. @end-code;
  184.  
  185. @begin-code Code "WebCrawler::Form1()"
  186.  
  187.  //****************************
  188. /**
  189.  * This class displays the form and components.  It also
  190.  * handles the user generated events. 
  191. */
  192.  
  193.     public @CLASSNAME@()
  194.     //****************************
  195.     {
  196.         super();
  197.     }
  198.  
  199. @end-code;
  200.  
  201. @begin-code Code "WebCrawler::addLink(String newURL)"
  202.  
  203.     public void addLink(String newLink)
  204.     //****************************
  205.     {
  206.         lb_links.add( newLink );        
  207.     }
  208.  
  209. @end-code;
  210.  
  211. @begin-code Code "WebCrawler::Prototype for addLink(String newURL)"
  212.  
  213.     public:
  214.         void addLink(String newURL);
  215.  
  216. @end-code;
  217.  
  218. @begin-code Code "WebCrawler_Create"
  219.  
  220.     public boolean WebCrawler_Create(powersoft.jcm.event.CreateEvent event)
  221.     {
  222.         textb_startingURL.setFocus( true );
  223.         
  224.         return false;
  225.     }
  226.  
  227. @end-code;
  228.  
  229. @begin-code Code "cb_crawl_Click"
  230.  
  231.     public boolean cb_crawl_Click(powersoft.jcm.event.ClickEvent event)
  232.     //****************************
  233.     {
  234.         String startingURL = textb_startingURL.getText();
  235.         _firstPageSeeker = new PageSeeker(this, startingURL);
  236.         
  237.         return false;
  238.     }
  239.  
  240. @end-code;
  241.  
  242. @begin-code Code "cb_ClearLinks_Click"
  243.  
  244.     public boolean cb_ClearLinks_Click(powersoft.jcm.event.ClickEvent event)
  245.     //****************************
  246.     {
  247.         lb_links.deleteAll();
  248.         
  249.         return false;
  250.     }
  251.  
  252. @end-code;
  253. @end;
  254.