⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simplecrawlereditor.java

📁 一个Web爬虫(机器人
💻 JAVA
字号:
/* * WebSPHINX web crawling toolkit * Copyright (C) 1998,1999 Carnegie Mellon University  *  * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Library * General Public License as published by the Free Software  * Foundation, version 2. * * WebSPHINX homepage: http://www.cs.cmu.edu/~rcm/websphinx/ */package websphinx.workbench;import websphinx.*;import java.awt.*;import websphinx.util.Constrain;public class SimpleCrawlerEditor extends CrawlerEditor {    Label actionLabel;    ActionEditor actionEditor;    public SimpleCrawlerEditor () {        super ();        // remove all the pieces we don't need        remove (typeLabel);        remove (typeChoice);        remove (depthLabel);        remove (depthField);        remove (depthLabel2);        remove (searchOrderChoice);        // add an action editor        actionLabel = new Label("Action:");        actionEditor = new ActionEditor ();        Constrain.add (this, actionLabel,                        Constrain.labelLike (0, 4));        Constrain.add (this, actionEditor,                        Constrain.areaLike (1, 4, 4));    }    public void setCrawler (Crawler crawler) {        super.setCrawler (crawler);        actionEditor.setAction (crawler.getAction());    }    public Crawler getCrawler () {        crawler.setAction (actionEditor.getAction ());        return super.getCrawler ();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -