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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? textpanel.java

?? Java里的hash類的用法
?? JAVA
字號:
/* TextPanel class */import java.util.StringTokenizer;import java.awt.*;import java.io.*;import java.net.*;/** * Text panel to display the source code of the animation algorithm. * This class is initialized in the <code>TextFrame</code> class * construction during the main frame initialization. * Each line of the source code starting with <code>/*-</code> will be ignored. * The line after <code>/*-------</code> is considered as the first line of * text being displayed. * The line before <code>//-</code> is the last line of source code being * displayed. The text after this line will no longer be parsed. * See also <A href="AlgThread.html"><code>AlgThread</code></A> for special * symbol used in displaying source code in text panel. * @see TextFrame * @see AlgAnimFrame */public class TextPanel extends Panel {    String file_name;    String[] lines;    /**     * The number of lines of source code to be displayed on the text frame.     */    public int n_lines;    int highlight;    int width = 300;    int height = 400;    int delay = 400;    int max_lines = 1000;    Dimension offscreensize = null;    Image offscreen = null;    Graphics offGraphics = null;    static final int dx = 2;    Font font;    /**     * The number of pixels allocated for each line of text.     */    public int line_space = 14;    int font_size = 10;    /**     * This attribute is used to couple the text panel to a vertical scrollbar     * in the TextFrame. It indicates the first line of source code that     * will be displayed.     */    public int start;    static final String ignore_trigger = "/*-";    static final String start_sign = "/*-------";    static final String end_sign = "//-";    private StringBuffer trim(String s) {        int pos;        StringBuffer sb;        pos = s.indexOf(ignore_trigger);        if (pos >= 0) {            sb = new StringBuffer(s.substring(0,pos)); //sb.setLength(pos);        } else             sb = new StringBuffer( s );        return sb;    }                    private String expandtabs( StringBuffer sb ) {        int i, len;        len = sb.length();        i = 0;        while( i < len ) {            if ( sb.charAt( i ) == '\t' ) {	      for (int k = 0; k < 8; k++) {                sb.setCharAt(i,' ');                sb.insert(i,' ');                len++;	      }            }            i++;        }        return sb.toString();            }    private void SetFont( Graphics g ) {        FontMetrics fm;        this.setBackground( Color.white );        font = new Font( "Dialog", Font.PLAIN, font_size );        fm = g.getFontMetrics( font );        line_space = fm.getHeight() + 1;        g.setFont( font );    }    private int ReadSource( DataInputStream ds ) {        int cnt = 0;        StringBuffer sb;                        try {            while( true ) {                String s;                if ( (s = ds.readLine()) != null ) {                    if ( s.startsWith( start_sign ) ) {                        n_lines = 0;                        cnt = 0;                    } else if (s.trim().startsWith(ignore_trigger)) {                        continue;                    } else if (s.startsWith(end_sign)) {                        break;                    } else {                        sb = trim( s );                        /* Copy the buffer into a string */                        lines[cnt++] = expandtabs( sb );                    }                 } else                    break;            }        } catch( IOException e ) {}        return cnt;    }    /**     * Creates a text panel based on the source file specified in the String     * passed in as the parameter.     * @param fn Filename of the source code     */    public TextPanel( String fn ) {        FileInputStream instream;        file_name = fn;        File source = new File( file_name );                if ( source.exists() && source.isFile() ) {            try {                lines = new String[ max_lines ];                instream = new FileInputStream( source );            } catch( IOException e ) {}            /* Read the file */        } else            System.out.println("Cant access [" + file_name + "]");    }            /**     * Creates a text frame based on the URL specified by     * the parameter.     * @param sourceURL URL of the source code     * @see URL     */    public TextPanel( URL sourceURL) {        InputStream source = null;        StringBuffer sb;        n_lines = 0;	start = 0;        file_name = sourceURL.toString();	try {	    source = sourceURL.openStream();	} catch( IOException e ) {        }        if ( source != null ) {            lines = new String[ max_lines ];            /* Read the file */            DataInputStream ds = new DataInputStream( source );            n_lines = ReadSource( ds );        }                                 highlight = -1;            }    /**     * Highlight a certain line of the source code. The highlighted line     * is displayed in RED while the other normal lines are displayed     * in BLACK. The first line of the source has a line index of <b>0</b>.     * @param h The line to be highlighted     */    public void Highlight( int h ) {        highlight = h;        this.repaint();    }    /**     * Returns the initial dimension of the text panel. This method     * will be called by the layout manager during the corresponding     * frame initialization.     */    public Dimension getPreferredSize() {        int h = line_space * (n_lines + 1) - start * line_space;        return new Dimension( width, h );    }        /**     * Return the minimum allowed dimension of the text panel.     */    public Dimension getMinimumSize() {        int h = line_space * (n_lines + 1) - start * line_space;        return new Dimension( width, h );    }        /**     * This method is invoked when the <code>repaint()</code> method of the     * parent class is called. This method eliminates flashing during animation.     */    public void update(Graphics g) {        Dimension d = size();        if (d.width < 1 || d.height < 1)            return;        if ((offscreen == null) || (d.width != offscreensize.width) ||                (d.height != offscreensize.height)) {            offscreen = createImage(d.width, d.height);            offscreensize = d;            offGraphics = offscreen.getGraphics();        }        offGraphics.setColor(Color.white);        offGraphics.fillRect(0, 0, d.width, d.height);        paint(offGraphics);        g.drawImage(offscreen, 0, 0, null);    }        /**     * Set the first line to display.     * @param start First line to display     * @see TextPanel#start     */    public void setStart(int start) {	this.start = start;    }    /**     * This method print the source code starting from the first line specified     * by <code>setStart(int)</code> on the text panel.     * @param g Graphical context of the text panel.     */    public void paint( Graphics g ) {        int i, x, y;        SetFont( g );        x = dx; y = line_space;        g.setColor( Color.black );        for (i=start;i<n_lines;i++) {            if( i == highlight ) {                g.setColor( Color.red );            }            g.drawString( lines[i], x, y );            g.setColor( Color.black );            y += line_space;                        }        //g.drawString("EOF",x,y);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美自拍偷拍一区| 五月综合激情网| 国产精品国产精品国产专区不蜜 | 香蕉加勒比综合久久| 亚洲综合丁香婷婷六月香| 日本一区二区免费在线| 久久毛片高清国产| 国产精品久久看| 亚洲婷婷综合久久一本伊一区| 亚洲人成精品久久久久久| 亚洲综合精品久久| 婷婷综合另类小说色区| 日本在线不卡一区| 精品综合久久久久久8888| 国产69精品一区二区亚洲孕妇| 国产福利一区在线观看| 99久久99久久精品免费观看| 在线中文字幕一区二区| 制服丝袜成人动漫| 久久在线观看免费| 国产精品久久三| 午夜欧美在线一二页| 国产一区二区三区久久久| av电影天堂一区二区在线| 欧美日韩中字一区| 精品福利在线导航| 亚洲欧洲日产国码二区| 天堂成人国产精品一区| 粉嫩13p一区二区三区| 欧美三区在线观看| 久久精品亚洲乱码伦伦中文| 一区二区日韩av| 国产麻豆一精品一av一免费 | 国产另类ts人妖一区二区| 成人不卡免费av| 欧美一卡2卡三卡4卡5免费| 国产日韩欧美麻豆| 亚洲国产精品久久久男人的天堂 | 99国产精品99久久久久久| 91麻豆精品国产91久久久使用方法| 精品奇米国产一区二区三区| 国产精品传媒入口麻豆| 日韩精品成人一区二区三区| 岛国一区二区三区| 在线亚洲一区观看| 国产视频亚洲色图| 日韩在线一区二区三区| 91麻豆免费视频| 久久只精品国产| 亚洲成av人影院| 99精品偷自拍| 精品国产三级电影在线观看| 亚洲综合无码一区二区| 国产·精品毛片| 日韩一区二区三区精品视频| 亚洲精品一二三区| 麻豆中文一区二区| 欧美做爰猛烈大尺度电影无法无天| 久久久不卡网国产精品二区| 亚洲一区二区三区中文字幕| 国产在线一区二区综合免费视频| 精品视频一区二区三区免费| 中文字幕在线观看不卡| 国产一区二区三区久久久| 91.com视频| 亚洲一区精品在线| 91亚洲午夜精品久久久久久| 国产欧美一区二区精品性| 日韩精品91亚洲二区在线观看| 91福利精品第一导航| 国产日韩欧美精品一区| 国内精品国产三级国产a久久| 欧美性猛交一区二区三区精品| 中文欧美字幕免费| 激情图片小说一区| 日韩免费高清av| 日韩电影在线观看网站| 欧美日韩精品一区二区三区| 中文幕一区二区三区久久蜜桃| 国产一区二区美女| 欧美成人免费网站| 蜜桃一区二区三区在线| 欧美一区三区二区| 亚洲444eee在线观看| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 国产麻豆9l精品三级站| 久久精品视频在线免费观看| 福利一区在线观看| 中文字幕中文字幕一区| 色综合天天综合狠狠| 亚洲黄网站在线观看| 欧美美女bb生活片| 毛片不卡一区二区| 国产视频一区二区在线| 99久久伊人网影院| 一区二区三区在线观看欧美| 欧美日韩国产片| 蜜桃视频在线观看一区二区| 久久精品夜色噜噜亚洲a∨| 99国产精品久久久久| 亚洲成人免费视| 26uuu国产一区二区三区| 国产91精品在线观看| 国产一区二区在线观看视频| 国产精品视频一区二区三区不卡| 99精品在线观看视频| 丝袜诱惑制服诱惑色一区在线观看 | 337p日本欧洲亚洲大胆精品| 成人黄色一级视频| 亚洲成人动漫在线观看| 精品福利一区二区三区免费视频| av成人动漫在线观看| 午夜激情综合网| 久久精品视频免费| 欧美最猛黑人xxxxx猛交| 激情综合一区二区三区| 国产精品成人网| 欧美一区欧美二区| www.成人在线| 免费看日韩a级影片| 中文字幕在线观看一区| 欧美一区日韩一区| www.日韩在线| 蜜桃视频在线观看一区| 亚洲欧美日韩中文播放| 欧美成人女星排名| 在线视频亚洲一区| 国产精品一二三在| 亚洲一区二区欧美激情| 国产欧美一区二区三区鸳鸯浴 | 亚洲一区二区三区四区五区中文 | www.欧美.com| 日本欧美一区二区三区乱码| 国产精品黄色在线观看| 日韩三级在线观看| 99v久久综合狠狠综合久久| 久久成人久久鬼色| 一区二区三区免费在线观看| 久久久久久一二三区| 在线不卡a资源高清| 成人免费观看视频| 久久精品国产一区二区三| 亚洲综合在线视频| 国产三级精品三级在线专区| 日韩一二在线观看| 欧美主播一区二区三区| 成人激情动漫在线观看| 激情深爱一区二区| 日韩一区精品字幕| 亚洲精品成人少妇| 中文字幕精品一区二区三区精品| 欧美日韩精品欧美日韩精品一| 不卡视频免费播放| 国产米奇在线777精品观看| 天堂在线亚洲视频| 一区二区三区.www| 中文字幕一区二区三区不卡| 久久久国产精品不卡| 日韩欧美中文字幕精品| 欧美日韩一卡二卡三卡 | 一区二区三区四区中文字幕| 中文字幕免费不卡| 久久久久久久免费视频了| 欧美一区二区视频观看视频| 欧美喷潮久久久xxxxx| 91福利视频久久久久| 色综合天天综合色综合av| 白白色 亚洲乱淫| 成人伦理片在线| 成人天堂资源www在线| 国产福利一区在线| 国产福利不卡视频| 国产精品一二三| 国产精品99久久久久久久vr| 国内成人免费视频| 韩国三级中文字幕hd久久精品| 久久精品国产99| 九一九一国产精品| 国产真实乱子伦精品视频| 激情久久五月天| 国产一区视频网站| 国产精品一区专区| 国产精品一区二区久激情瑜伽| 国产一区二区三区四区五区美女 | 国产欧美一区二区精品性色| 国产人成亚洲第一网站在线播放 | 99在线精品一区二区三区| 白白色 亚洲乱淫| 91视视频在线直接观看在线看网页在线看| 国产成人av一区二区| 国产成都精品91一区二区三| 懂色av一区二区在线播放| 国产99久久久久久免费看农村| 国产不卡免费视频| jizz一区二区| 在线日韩av片| 欧美精品123区| 日韩欧美不卡一区| 久久婷婷国产综合精品青草| 久久久亚洲午夜电影|