亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? regexfilterwrapper.java

?? HTMLParser開源代碼附解析程序。
?? JAVA
字號:
// HTMLParser Library $Name: v1_6 $ - A java-based parser for HTML// http://sourceforge.org/projects/htmlparser// Copyright (C) 2005 Derrick Oswald//// Revision Control Information//// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/wrappers/RegexFilterWrapper.java,v $// $Author: derrickoswald $// $Date: 2005/04/12 11:27:42 $// $Revision: 1.2 $//// This library is free software; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public// License as published by the Free Software Foundation; either// version 2.1 of the License, or (at your option) any later version.//// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser General Public// License along with this library; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//package org.htmlparser.parserapplications.filterbuilder.wrappers;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JComboBox;import javax.swing.JTextArea;import javax.swing.border.BevelBorder;import javax.swing.event.DocumentEvent;import javax.swing.event.DocumentListener;import javax.swing.text.BadLocationException;import javax.swing.text.Document;import org.htmlparser.Node;import org.htmlparser.NodeFilter;import org.htmlparser.Parser;import org.htmlparser.filters.RegexFilter;import org.htmlparser.parserapplications.filterbuilder.Filter;/** * Wrapper for RegexFilters. */public class RegexFilterWrapper    extends        Filter    implements        ActionListener,        DocumentListener{    /**     * Mapping for RegexFilter constants to strings.     */    public static Object[][] mMap;    static    {        mMap = new Object[3][];        mMap[0] = new Object[2];        mMap[0][0] = "MATCH";        mMap[0][1] = new Integer (RegexFilter.MATCH);        mMap[1] = new Object[2];        mMap[1][0] = "LOOKINGAT";        mMap[1][1] = new Integer (RegexFilter.LOOKINGAT);        mMap[2] = new Object[2];        mMap[2][0] = "FIND";        mMap[2][1] = new Integer (RegexFilter.FIND);    }    /**     * The underlying filter.     */    protected RegexFilter mFilter;    /**     * Text to check for     */    protected JTextArea mPattern;    /**     * Combo box for strategy.     */    protected JComboBox mStrategy;    /**     * Create a wrapper over a new RegexFilter.     */     public RegexFilterWrapper ()    {        mFilter = new RegexFilter ();        // add the text pattern        mPattern = new JTextArea (2, 20);        mPattern.setBorder (new BevelBorder (BevelBorder.LOWERED));        add (mPattern);        mPattern.getDocument ().addDocumentListener (this);        mPattern.setText (mFilter.getPattern ());        // add the strategy choice        mStrategy = new JComboBox ();        mStrategy.addItem ("MATCH");        mStrategy.addItem ("LOOKINGAT");        mStrategy.addItem ("FIND");        add (mStrategy);        mStrategy.addActionListener (this);        mStrategy.setSelectedIndex (strategyToIndex (mFilter.getStrategy ()));    }    //    // Filter overrides and concrete implementations    //    /**     * Get the name of the filter.     * @return A descriptive name for the filter.     */    public String getDescription ()    {        return ("Nodes containing regex");    }    /**     * Get the resource name for the icon.     * @return The icon resource specification.     */    public String getIconSpec ()    {        return ("images/RegexFilter.gif");    }    /**     * Get the underlying node filter object.     * @return The node filter object suitable for serialization.     */    public NodeFilter getNodeFilter ()    {        RegexFilter ret;                ret = new RegexFilter ();        ret.setStrategy (mFilter.getStrategy ());        ret.setPattern (mFilter.getPattern ());                    return (ret);    }    /**     * Assign the underlying node filter for this wrapper.     * @param filter The filter to wrap.     * @param context The parser to use for conditioning this filter.     * Some filters need contextual information to provide to the user,     * i.e. for tag names or attribute names or values,     * so the Parser context is provided.      */    public void setNodeFilter (NodeFilter filter, Parser context)    {        mFilter = (RegexFilter)filter;        mPattern.setText (mFilter.getPattern ());        mStrategy.setSelectedIndex (strategyToIndex (mFilter.getStrategy ()));    }    /**     * Get the underlying node filter's subordinate filters.     * @return The node filter object's contained filters.     */    public NodeFilter[] getSubNodeFilters ()    {        return (new NodeFilter[0]);    }    /**     * Assign the underlying node filter's subordinate filters.     * @param filters The filters to insert into the underlying node filter.     */    public void setSubNodeFilters (NodeFilter[] filters)    {        // should we complain?    }    /**     * Convert this filter into Java code.     * Output whatever text necessary and return the variable name.     * @param out The output buffer.     * @param context Three integers as follows:     * <li>indent level - the number of spaces to insert at the beginning of each line</li>     * <li>filter number - the next available filter number</li>     * <li>filter array number - the next available array of filters number</li>     * @return The variable name to use when referencing this filter (usually "filter" + context[1]++)      */    public String toJavaCode (StringBuffer out, int[] context)    {        String ret;        ret = "filter" + context[1]++;        spaces (out, context[0]);        out.append ("RegexFilter ");        out.append (ret);        out.append (" = new RegexFilter ();");        newline (out);        spaces (out, context[0]);        out.append (ret);        out.append (".setStrategy (RegexFilter.");        out.append (strategyToString (mFilter.getStrategy ()));        out.append (");");        newline (out);        spaces (out, context[0]);        out.append (ret);        out.append (".setPattern (\"");        out.append (mFilter.getPattern ());        out.append ("\");");        newline (out);                return (ret);    }    /**     * Convert the regex strategy to a string.     * @param strategy The regex strategy.     * @return A string for display in the GUI or in the Java program.     */    public String strategyToString (int strategy)    {        for (int i =0; i < mMap.length; i++)            if (strategy == ((Integer)mMap[i][1]).intValue ())                return ((String)mMap[i][0]);        throw new IllegalArgumentException ("unknown strategy constant - " + strategy);    }    /**     * Convert a string to a regex strategy.     * @param strategy The string equivalent of a regex strategy.     * @return The regex strategy to use in executing the regular expression.     */    public int stringToStrategy (String strategy)    {        for (int i =0; i < mMap.length; i++)            if (strategy.equalsIgnoreCase ((String)mMap[i][0]))                return (((Integer)mMap[i][1]).intValue ());        throw new IllegalArgumentException ("unknown strategy constant - " + strategy);    }    /**     * Convert the regex strategy to an index into the map.     * @param strategy The regex strategy.     * @return The index of the regex strategy in the map.     */    public int strategyToIndex (int strategy)    {        for (int i =0; i < mMap.length; i++)            if (strategy == ((Integer)mMap[i][1]).intValue ())                return (i);        throw new IllegalArgumentException ("unknown strategy constant - " + strategy);    }    /**     * Convert an index into a regex strategy.     * @param index The index of the regex strategy in the map.     * @return The regex strategy at that inxdex.     */    public int indexToStrategy (int index)    {        return (((Integer)mMap[index][1]).intValue ());    }    //    // NodeFilter interface    //    /**     * Predicate to determine whether or not to keep the given node.     * The behaviour based on this outcome is determined by the context     * in which it is called. It may lead to the node being added to a list     * or printed out. See the calling routine for details.     * @return <code>true</code> if the node is to be kept, <code>false</code>     * if it is to be discarded.     * @param node The node to test.     */    public boolean accept (Node node)    {        return (mFilter.accept (node));    }    //    // ActionListener interface    //    /**     * Invoked when an action occurs on the combo box.     * @param event Details about the action event.     */    public void actionPerformed (ActionEvent event)    {        Object source;        source = event.getSource ();        if (source == mStrategy)            mFilter.setStrategy (indexToStrategy (mStrategy.getSelectedIndex ()));    }    //    // DocumentListener interface    //    /**     * Handle an insert update event.     * @param e Details about the insert event.     */    public void insertUpdate (DocumentEvent e)    {        Document doc;                doc = e.getDocument ();        try        {            mFilter.setPattern (doc.getText (0, doc.getLength ()));        }        catch (BadLocationException ble)        {            ble.printStackTrace ();        }    }    /**     * Handle a remove update event.     * @param e Details about the remove event.     */    public void removeUpdate (DocumentEvent e)    {        Document doc;                doc = e.getDocument ();        try        {            mFilter.setPattern (doc.getText (0, doc.getLength ()));        }        catch (BadLocationException ble)        {            ble.printStackTrace ();        }    }    /**     * Handle a change update event.     * @param e Details about the change event.     */    public void changedUpdate (DocumentEvent e)    {        // plain text components don't fire these events    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
《视频一区视频二区| 91在线观看一区二区| 欧美一卡在线观看| 国产主播一区二区| 中文字幕亚洲一区二区av在线 | 亚洲图片欧美激情| 91精品在线观看入口| 国产麻豆欧美日韩一区| 亚洲精品国产无天堂网2021| 91精品国产综合久久精品麻豆| 激情图片小说一区| 亚洲精品伦理在线| www国产精品av| 欧美在线免费视屏| 国产成人av一区二区三区在线| 亚洲一区二区三区四区在线 | 久久久国产精品午夜一区ai换脸 | 日韩伦理av电影| 欧美r级电影在线观看| 91在线porny国产在线看| 美国欧美日韩国产在线播放| 综合网在线视频| 久久亚洲二区三区| 欧美日韩高清一区二区不卡| 风间由美一区二区av101| 爽好久久久欧美精品| 中文字幕一区二区三区四区不卡 | 91丝袜国产在线播放| 国产资源在线一区| 日韩和欧美一区二区| 亚洲综合自拍偷拍| 国产精品毛片大码女人| 久久夜色精品国产欧美乱极品| 欧美视频日韩视频在线观看| 一本大道久久精品懂色aⅴ| 国产.欧美.日韩| 国产精品综合久久| 国内精品伊人久久久久av影院 | 精品乱人伦小说| 5566中文字幕一区二区电影| 在线观看亚洲成人| 色悠悠久久综合| 91麻豆自制传媒国产之光| 成人国产亚洲欧美成人综合网| 国产高清亚洲一区| 岛国一区二区三区| 成年人网站91| 99免费精品视频| 91香蕉视频黄| 欧美三级午夜理伦三级中视频| 欧洲av一区二区嗯嗯嗯啊| 色婷婷亚洲综合| 欧美性一二三区| 69久久99精品久久久久婷婷| 3atv一区二区三区| 欧美成人a视频| 久久这里只精品最新地址| 欧美tickling挠脚心丨vk| 欧美成人精品1314www| 久久亚洲私人国产精品va媚药| 国产日产欧美一区二区视频| 亚洲国产精品成人综合色在线婷婷 | 五月激情综合婷婷| 看片的网站亚洲| 国产福利一区二区三区视频| av网站一区二区三区| 欧洲人成人精品| 这里只有精品免费| 26uuu色噜噜精品一区| 国产精品美女久久久久久久网站| 国产精品美日韩| 亚洲成人免费视| 寂寞少妇一区二区三区| 国产suv精品一区二区883| 一本色道久久加勒比精品| 欧美一级艳片视频免费观看| 国产亚洲1区2区3区| 亚洲伦在线观看| 免费欧美日韩国产三级电影| 大尺度一区二区| 欧美日韩精品二区第二页| 精品国产伦一区二区三区观看体验 | 91麻豆精品国产91久久久资源速度 | 国产一区二区在线看| 99精品视频在线观看免费| 欧美一区二区三区在线电影| 亚洲国产精品99久久久久久久久| 亚洲六月丁香色婷婷综合久久| 日日摸夜夜添夜夜添精品视频| 国产精品2024| 欧美一级理论片| 亚洲免费观看高清完整版在线观看| 毛片av一区二区| 欧美这里有精品| 国产精品久久久久影院色老大| 视频一区免费在线观看| 99re热这里只有精品视频| 欧美电影免费观看完整版| 一区二区激情视频| 成人av影院在线| 久久精品水蜜桃av综合天堂| 日韩国产欧美在线观看| 色偷偷久久人人79超碰人人澡| 国产日韩欧美精品综合| 韩国成人在线视频| 在线不卡免费av| 一区二区日韩电影| 97精品国产露脸对白| 国产欧美精品一区二区色综合朱莉 | 日本不卡不码高清免费观看| 色一区在线观看| 国产欧美久久久精品影院 | 欧美国产1区2区| 精品一区二区三区欧美| 91精品在线观看入口| 亚洲成人av一区二区三区| 色婷婷综合久久久中文字幕| 综合网在线视频| 99久久99久久免费精品蜜臀| 国产色综合一区| 国产成人综合亚洲网站| 国产亚洲成aⅴ人片在线观看| 国产伦精一区二区三区| 久久久久久免费| 国产精品1区2区| 欧美国产日韩亚洲一区| 成人国产电影网| 亚洲天堂网中文字| 在线亚洲精品福利网址导航| 亚洲一区二区精品久久av| 欧美色中文字幕| 日韩黄色小视频| 日韩精品专区在线| 韩国理伦片一区二区三区在线播放| 精品国产电影一区二区 | 国产精品剧情在线亚洲| aaa亚洲精品| 亚洲制服丝袜av| 制服视频三区第一页精品| 精品一区二区影视| 中文字幕在线不卡一区| 欧美在线视频不卡| 久久精品99国产国产精| 国产欧美久久久精品影院| 色婷婷综合在线| 秋霞电影网一区二区| 久久久久久免费网| 在线精品视频小说1| 日韩精品一级二级 | 欧美视频日韩视频| 九一久久久久久| 国产精品乱码人人做人人爱 | 国产精品久久二区二区| 色老头久久综合| 久久激情五月激情| 国产精品不卡在线| 欧美三级欧美一级| 国产成人综合亚洲网站| 亚洲一二三级电影| 久久综合久久久久88| 色悠悠久久综合| 国产一区二区三区不卡在线观看| 最新欧美精品一区二区三区| 欧美日韩在线亚洲一区蜜芽| 精品伊人久久久久7777人| 中文字幕在线观看一区| 欧美刺激脚交jootjob| 91国偷自产一区二区三区成为亚洲经典 | 日韩欧美高清在线| 波多野结衣的一区二区三区| 久久国产麻豆精品| 一区二区国产盗摄色噜噜| 欧美国产在线观看| 日韩欧美国产综合| 欧亚洲嫩模精品一区三区| 成人自拍视频在线| 狂野欧美性猛交blacked| 一区二区三区四区乱视频| 久久久久久久久久久久久女国产乱 | av在线不卡免费看| 精品一区二区三区欧美| 午夜精品久久久久影视| 亚洲色欲色欲www在线观看| 久久久久久久久久久久久夜| 欧美一二三区在线| 欧美色图片你懂的| 色综合天天综合网国产成人综合天| 黄一区二区三区| 蜜桃久久久久久| 天天色图综合网| 五月天精品一区二区三区| 亚洲午夜羞羞片| 亚洲自拍偷拍av| 亚洲一区二区三区激情| 亚洲欧美日韩国产手机在线| 国产精品久久久久久久久免费樱桃 | www.日韩av| 99亚偷拍自图区亚洲| 不卡的av网站| 91捆绑美女网站|