home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / samples.z / WebCrawler.wxf < prev    next >
Text File  |  1997-01-28  |  5KB  |  256 lines

  1. Save Format v2.0(1)
  2. @begin Form "WebCrawler"
  3.  Exported 0;
  4.  Abstract 0;
  5.  Interface 0;
  6.  PackageName "";
  7.  
  8.  @begin Object "powersoft.jcm.ui.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 "powersoft.jcm.event.Create"
  19.    GencodeSrcLine 104;
  20.    FunctionName "WebCrawler_Create";
  21.   @end;
  22.   @begin UserFunction "Form1()"
  23.    Compiler 1;
  24.    GencodeSrcLine 86;
  25.    FunctionName "WebCrawler::Form1()";
  26.   @end;
  27.   @begin UserFunction "addLink(String newURL)"
  28.    GencodeSrcLine 98;
  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 "powersoft.jcm.ui.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 "powersoft.jcm.ui.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 "powersoft.jcm.ui.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 "powersoft.jcm.event.Click"
  83.    GencodeSrcLine 111;
  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 "powersoft.jcm.ui.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.   @begin ComponentData "lb_links"
  111.   @end;
  112.  @end;
  113.  
  114.  @begin Object "powersoft.jcm.ui.Label"
  115.   Font "<Inherited>";
  116.   BackColor "Color.lightGray";
  117.   ForeColor "Color.black";
  118.   Text "Links Found:";
  119.   Visible "1";
  120.   DataSource "NULL";
  121.   DataColumns "";
  122.   BoundControl "0";
  123.   ResID 104;
  124.   DesignName label_2;
  125.   TabIndex 4;
  126.   DesignRect 0,30,60,10;
  127.  @end;
  128.  
  129.  @begin Object "powersoft.jcm.ui.CommandButton"
  130.   Font "<Inherited>";
  131.   BackColor "Color.lightGray";
  132.   ForeColor "Color.black";
  133.   Text "Clear Links";
  134.   Visible "1";
  135.   DataSource "NULL";
  136.   DataColumns "";
  137.   BoundControl "0";
  138.   @begin Event "powersoft.jcm.event.Click"
  139.    GencodeSrcLine 120;
  140.    FunctionName "cb_ClearLinks_Click";
  141.   @end;
  142.   ResID 106;
  143.   DesignName cb_ClearLinks;
  144.   TabIndex 5;
  145.   DesignRect 190,220,65,15;
  146.  @end;
  147.  
  148.  @begin HPPPrefixBlock
  149. @begin-code HPPPrefix
  150.  
  151. // add your custom import statements here
  152.  
  153. @end-code;
  154.   GencodeSrcLine 15;
  155.  @end;
  156.  
  157.  @begin CPPPrefixBlock
  158. @begin-code CPPPrefix
  159.  
  160.  
  161. @end-code;
  162.   GencodeSrcLine 15;
  163.  @end;
  164.  
  165.  @begin ClassContentsBlock
  166. @begin-code ClassContents
  167.  
  168.     // add your data members here
  169.     PageSeeker _firstPageSeeker;
  170.  
  171. @end-code;
  172.   GencodeSrcLine 140;
  173.  @end;
  174.  
  175. @begin-code BaseClassList
  176.  
  177. extends powersoft.jcm.ui.Form
  178.  
  179. @end-code;
  180.  
  181. @begin-code GeneratedClassContents
  182.  
  183.         WebCrawler();
  184.  
  185. @end-code;
  186.  
  187. @begin-code Code "WebCrawler::Form1()"
  188.  
  189.  //****************************
  190. /**
  191.  * This class displays the form and components.  It also
  192.  * handles the user generated events. 
  193. */
  194.  
  195.     public @CLASSNAME@()
  196.     //****************************
  197.     {
  198.         super();
  199.     }
  200.  
  201. @end-code;
  202.  
  203. @begin-code Code "WebCrawler::addLink(String newURL)"
  204.  
  205.     public void addLink(String newLink)
  206.     //****************************
  207.     {
  208.         lb_links.add( newLink );        
  209.     }
  210.  
  211. @end-code;
  212.  
  213. @begin-code Code "WebCrawler::Prototype for addLink(String newURL)"
  214.  
  215.     public:
  216.         void addLink(String newURL);
  217.  
  218. @end-code;
  219.  
  220. @begin-code Code "WebCrawler_Create"
  221.  
  222.     public boolean WebCrawler_Create(powersoft.jcm.event.CreateEvent event)
  223.     {
  224.         textb_startingURL.setFocus( true );
  225.  
  226.         return false;
  227.     }
  228.  
  229. @end-code;
  230.  
  231. @begin-code Code "cb_crawl_Click"
  232.  
  233.     public boolean cb_crawl_Click(powersoft.jcm.event.ClickEvent event)
  234.     //****************************
  235.     {
  236.         String startingURL = textb_startingURL.getText();
  237.         _firstPageSeeker = new PageSeeker(this, startingURL);
  238.  
  239.         return false;
  240.     }
  241.  
  242. @end-code;
  243.  
  244. @begin-code Code "cb_ClearLinks_Click"
  245.  
  246.     public boolean cb_ClearLinks_Click(powersoft.jcm.event.ClickEvent event)
  247.     //****************************
  248.     {
  249.         lb_links.deleteAll();
  250.  
  251.         return false;
  252.     }
  253.  
  254. @end-code;
  255. @end;
  256.