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

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

?? textpanel.java

?? 經(jīng) 典 的 數(shù) 據(jù) 結(jié) 構(gòu)
?? JAVA
字號(hào):
/* 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. * <p> * This method should NOT have to be called manually. * @see TextFrame * @see AlgAnimFrame */public class TextPanel extends Panel {    String file_name;    String[] lines;    private int n_lines;    private int highlight;    private int width = 300;    private int height = 400;    private int delay = 400;    private int max_lines = 1000;    private Dimension offscreensize = null;    private Image offscreen = null;    private Graphics offGraphics = null;    private static final int dx = 2;    private Font font;    private int font_size = 10;    private int line_space = 14;    private 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#getStart     */    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);    }    /**     * Get the number of lines of source code to be displayed on the text panel.     * @return The number of lines of source code to be displayed on the      *		text frame.     */    public int getNumLines() {	return n_lines;    }    /**     * Get the number of pixels used by each line of text.     * @return The number of pixels allocated for each line of text.     */    public int getLineSpace() {	return line_space;    }    /**     * Get the first line of the source code that will be displayed.     * This attribute is used to couple the text panel to a vertical scrollbar     * in the TextFrame.      * @return The first line of source code that will be displayed.     *      */    public int getStart() {	return start;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜免费久久看| av一区二区三区黑人| 首页国产丝袜综合| 亚洲一二三四在线| 一级做a爱片久久| 一区二区三区在线观看视频| 亚洲精品v日韩精品| 综合亚洲深深色噜噜狠狠网站| 国产精品视频一二三| 国产精品久久久久久久久动漫 | 国产寡妇亲子伦一区二区| 美国av一区二区| 久久99精品国产麻豆婷婷洗澡| 久久99精品久久久久久动态图| 久久99精品久久久久久动态图| 国产一区 二区 三区一级| 国产精品亚洲第一区在线暖暖韩国 | 亚洲精品在线免费播放| 欧美zozo另类异族| 国产目拍亚洲精品99久久精品| 中文字幕va一区二区三区| 亚洲欧洲无码一区二区三区| 亚洲一区二区三区美女| 日韩精品一二三四| 韩国av一区二区三区四区| 成人aa视频在线观看| 在线观看国产91| 欧美一区二区三区性视频| 久久综合九色欧美综合狠狠| 国产精品私房写真福利视频| 亚洲精品视频在线观看免费| 三级不卡在线观看| 极品少妇xxxx偷拍精品少妇| va亚洲va日韩不卡在线观看| 精品视频999| 精品久久久久99| 1000部国产精品成人观看| 亚洲一区免费视频| 国内一区二区在线| 一本色道亚洲精品aⅴ| 91精品中文字幕一区二区三区| 久久久久久久久久久电影| 亚洲精品国产无天堂网2021| 麻豆精品一区二区综合av| 成人一道本在线| 欧美日韩成人综合在线一区二区| 26uuu精品一区二区在线观看| 亚洲天堂成人网| 青草av.久久免费一区| 成人黄色在线网站| 欧美日本乱大交xxxxx| 欧美韩国一区二区| 亚洲成av人片一区二区三区| 成人综合在线观看| 欧美日韩一区二区三区不卡| 国产欧美一区二区三区沐欲| 亚洲成av人影院在线观看网| 成人精品视频.| 欧美一级欧美三级在线观看| 中文字幕综合网| 久久成人久久爱| 在线亚洲精品福利网址导航| 欧美极品少妇xxxxⅹ高跟鞋| 秋霞成人午夜伦在线观看| 91啪亚洲精品| 国产欧美一区视频| 秋霞电影网一区二区| 色婷婷综合视频在线观看| 久久先锋影音av| 青青草国产成人99久久| 成人美女视频在线观看18| 欧美一级片在线看| 亚洲一区二区不卡免费| 成人午夜又粗又硬又大| 日韩美女一区二区三区| 亚洲一区在线观看免费观看电影高清 | 日本成人中文字幕| 日本乱人伦一区| 国产精品久久久久一区二区三区共| 激情久久五月天| 欧美一区二区成人6969| 中文字幕色av一区二区三区| 国产一区二区0| 欧美刺激午夜性久久久久久久| 亚洲观看高清完整版在线观看| 成人h动漫精品| 国产日本一区二区| 国产主播一区二区三区| 日韩三级视频在线看| 天天操天天干天天综合网| 日本电影欧美片| 亚洲人吸女人奶水| 9久草视频在线视频精品| 国产蜜臀av在线一区二区三区| 激情综合色播五月| 欧美成人一区二区三区片免费 | 狠狠久久亚洲欧美| 欧美大胆人体bbbb| 精品影院一区二区久久久| 日韩区在线观看| 麻豆一区二区99久久久久| 欧美久久免费观看| 视频一区二区欧美| 欧美高清视频不卡网| 五月天亚洲精品| 91麻豆精品国产91久久久资源速度| 亚洲va欧美va人人爽午夜| 欧美日韩精品是欧美日韩精品| 亚洲福利视频一区| 91精品国产欧美一区二区成人| 日日欢夜夜爽一区| 日韩亚洲欧美综合| 久久精品二区亚洲w码| 精品电影一区二区| 国产激情91久久精品导航 | 午夜免费久久看| 日韩一区二区电影在线| 美女网站一区二区| 精品sm捆绑视频| 国产成人精品www牛牛影视| 国产精品久久久久久亚洲毛片| 91美女片黄在线观看| 午夜视频在线观看一区二区| 7777精品伊人久久久大香线蕉的 | 日韩精品久久理论片| 日韩一区二区三区电影在线观看| 毛片不卡一区二区| 国产精品五月天| 在线视频一区二区免费| 丝袜亚洲另类欧美| 久久久久一区二区三区四区| 成人激情图片网| 亚洲午夜精品网| 精品国产一区a| 99久久久无码国产精品| 亚洲成人精品一区| 国产色综合久久| 日本道在线观看一区二区| 美女久久久精品| 国产精品久久久久久一区二区三区 | 亚洲综合图片区| 日韩精品一区二区三区在线观看 | 国产成人av自拍| 亚洲午夜久久久| 国产日韩欧美精品在线| 99久久精品国产一区二区三区| 偷拍一区二区三区四区| 久久久久99精品一区| 一本在线高清不卡dvd| 美腿丝袜亚洲综合| 亚洲视频你懂的| 日韩欧美中文字幕公布| 不卡视频在线观看| 日韩精品一级二级| 国产精品欧美一区喷水| 911精品产国品一二三产区| 国产成人精品免费网站| 亚洲韩国精品一区| 国产欧美日本一区视频| 欧美日韩高清一区| 99久久免费国产| 乱一区二区av| 亚洲在线一区二区三区| 国产欧美视频一区二区三区| 欧美日韩久久久| 成人激情免费视频| 蜜臀av在线播放一区二区三区| 亚洲欧美一区二区三区久本道91| 欧美大度的电影原声| 欧美性生交片4| 成人综合婷婷国产精品久久蜜臀| 日韩精品视频网站| 亚洲激情成人在线| 国产欧美一区二区三区在线看蜜臀 | 99综合影院在线| 国产一区二区三区在线观看精品 | 亚洲你懂的在线视频| 亚洲va天堂va国产va久| 中文字幕在线免费不卡| 精品福利一二区| 欧美一区二区久久久| 日本丶国产丶欧美色综合| 懂色av一区二区夜夜嗨| 久久国产福利国产秒拍| 五月天久久比比资源色| 亚洲免费观看高清在线观看| 国产日韩av一区| 精品国产乱码久久久久久久久| 欧美日韩国产一级二级| 91国偷自产一区二区三区观看 | 国内精品伊人久久久久av影院| 日韩激情中文字幕| 亚洲国产精品久久一线不卡| 国产精品激情偷乱一区二区∴| 久久久精品一品道一区| 日韩免费视频一区| 欧美一区二区黄| 欧美一卡2卡3卡4卡| 在线播放日韩导航| 欧美日韩在线三级|