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

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

?? textpanel.java

?? 該源碼內(nèi)提供了多種算法的源碼
?? 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. * @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);    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩成人免费电影| 欧美精品一区二区三区在线播放| 99re成人精品视频| 51午夜精品国产| 中文字幕精品一区二区三区精品| 婷婷久久综合九色国产成人 | 久久青草欧美一区二区三区| 亚洲欧美国产三级| 国产suv精品一区二区三区| 成人看片黄a免费看在线| 久久国产免费看| 国产亚洲综合性久久久影院| 日韩免费在线观看| 亚洲午夜精品17c| 91麻豆蜜桃一区二区三区| 国产亚洲欧美中文| 激情都市一区二区| 欧美一区二区三区视频免费播放| 亚洲卡通欧美制服中文| 不卡一区中文字幕| 日韩免费高清视频| 美洲天堂一区二卡三卡四卡视频 | 丝袜诱惑亚洲看片 | 国产高清在线观看免费不卡| 7777精品伊人久久久大香线蕉完整版| 亚洲欧美一区二区三区国产精品| 国产激情视频一区二区三区欧美| 91精品国产免费| 1000部国产精品成人观看| 亚洲欧美成aⅴ人在线观看| 国产精品一区二区男女羞羞无遮挡| 日韩一卡二卡三卡四卡| 日韩专区在线视频| 欧美久久久久中文字幕| 亚洲sss视频在线视频| 欧美在线一二三| 亚洲欧美日韩国产中文在线| 色噜噜狠狠色综合欧洲selulu| 国产精品久久久久影视| 白白色 亚洲乱淫| 一区在线中文字幕| 在线亚洲+欧美+日本专区| 亚洲日本丝袜连裤袜办公室| 色综合久久中文综合久久97| 亚洲影院理伦片| 欧美在线free| 日本免费在线视频不卡一不卡二 | 国产成人综合视频| 久久久精品国产免大香伊 | 欧美丝袜丝nylons| 亚洲最大色网站| 欧美日韩一区二区三区在线看| 粉嫩aⅴ一区二区三区四区五区 | 精品久久一区二区三区| 激情综合网av| 国产精品二三区| 欧美久久久久久久久| 精品一区二区三区视频| 中文字幕一区二| 欧美理论电影在线| 国产不卡在线视频| 亚洲国产精品久久人人爱蜜臀 | 成人精品小蝌蚪| 亚洲免费伊人电影| 欧美一卡在线观看| 成人天堂资源www在线| 亚洲一本大道在线| 久久免费视频色| 在线观看不卡一区| 国产乱人伦偷精品视频不卡| 中文字幕一区在线| 日韩欧美在线不卡| 欧美性猛交xxxxxxxx| 欧美日韩色综合| 美女在线一区二区| 一色屋精品亚洲香蕉网站| 欧美妇女性影城| 97se狠狠狠综合亚洲狠狠| 天天操天天干天天综合网| 国产日韩欧美综合一区| 欧美网站大全在线观看| 国产激情一区二区三区四区 | 亚洲va天堂va国产va久| 久久婷婷一区二区三区| 色系网站成人免费| 国产福利精品一区| 日韩中文字幕91| 亚洲人成网站影音先锋播放| 精品欧美久久久| 欧美精品 日韩| 91久久免费观看| 成人app网站| 黑人巨大精品欧美黑白配亚洲| 午夜一区二区三区视频| 国产精品进线69影院| 亚洲精品一区二区精华| 亚洲欧美视频一区| 精品视频123区在线观看| 亚洲久草在线视频| 国产精品久久午夜夜伦鲁鲁| 精品国产乱子伦一区| 欧美一区在线视频| 欧美色大人视频| 91久久久免费一区二区| 91在线无精精品入口| 成人一道本在线| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧洲一区在线观看| 91老师国产黑色丝袜在线| 国产成人aaa| 丁香婷婷综合色啪| 东方aⅴ免费观看久久av| 激情另类小说区图片区视频区| 蜜桃av一区二区三区| 麻豆精品视频在线| 九色|91porny| 国产麻豆精品95视频| 国产成人在线视频播放| 成人性色生活片免费看爆迷你毛片| 久久99最新地址| 国产在线精品一区二区三区不卡| 久久精品国产成人一区二区三区| 久久精品国内一区二区三区| 免费观看一级欧美片| 韩国三级电影一区二区| 国产成人精品综合在线观看| 成人妖精视频yjsp地址| 91麻豆精品在线观看| 欧美视频日韩视频| 777久久久精品| 久久久精品一品道一区| 国产精品毛片高清在线完整版| 中文字幕一区二区不卡| 亚洲五码中文字幕| 五月激情六月综合| 国产在线视频不卡二| proumb性欧美在线观看| 欧美性色黄大片手机版| 日韩精品在线看片z| 欧美激情一区二区三区在线| 一区精品在线播放| 婷婷亚洲久悠悠色悠在线播放| 免费观看一级欧美片| 成人免费视频app| 欧美日韩国产高清一区| 久久综合九色综合97婷婷女人| 国产精品久久久久一区| 亚洲国产色一区| 国产一区二区三区美女| 91免费在线看| 欧美变态凌虐bdsm| 亚洲特级片在线| 看片的网站亚洲| 欧洲一区二区av| 中文字幕乱码久久午夜不卡| 亚洲一区二区三区四区五区黄 | 一区二区激情视频| 精品综合久久久久久8888| 不卡高清视频专区| 欧美日韩国产123区| 国产精品天干天干在线综合| 日韩极品在线观看| jizzjizzjizz欧美| 日韩欧美国产不卡| 亚洲一区视频在线| 成人免费av资源| 91精品国产综合久久精品性色 | 久久综合久久综合久久| 亚洲自拍欧美精品| 国产成人av电影| 91精品国产欧美一区二区成人| 中文一区二区在线观看| 捆绑调教美女网站视频一区| 欧美亚洲国产一卡| 国产精品传媒入口麻豆| 国产精品资源在线看| 日韩亚洲欧美高清| 亚洲成人免费观看| 色综合色综合色综合色综合色综合 | 国产精品女同互慰在线看| 毛片一区二区三区| 在线播放亚洲一区| 亚洲午夜精品在线| 一本大道久久a久久综合| 久久久不卡网国产精品二区| 秋霞影院一区二区| 欧美日韩高清不卡| 亚洲一区电影777| 欧美日韩精品二区第二页| 最新中文字幕一区二区三区| 国产凹凸在线观看一区二区| 日韩欧美亚洲国产精品字幕久久久| 天堂午夜影视日韩欧美一区二区| 色婷婷综合激情| 一区二区三区中文字幕电影| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 亚洲一二三四区| 日本韩国欧美一区二区三区| 综合激情网...| 亚洲精品欧美在线|