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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? textpanel.java

?? 該資料含有常用的計(jì)算機(jī)算法資料
?? 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;    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产清纯美女被跳蛋高潮一区二区久久w | 有码一区二区三区| 精品国产亚洲一区二区三区在线观看| 久久黄色级2电影| 中文字幕字幕中文在线中不卡视频| 日韩一区二区三区四区| 色天使色偷偷av一区二区| 国产麻豆精品久久一二三| 五月综合激情网| 亚洲一区电影777| 亚洲精品美国一| 国产精品理论在线观看| 久久亚洲免费视频| 成人激情综合网站| 亚洲国产精品精华液ab| 亚洲午夜久久久| 午夜成人免费电影| 国产精品女同一区二区三区| 中文字幕亚洲一区二区va在线| 亚洲精品福利视频网站| 激情五月播播久久久精品| 色视频一区二区| 久久久国产精品午夜一区ai换脸| 亚洲午夜激情av| 粉嫩一区二区三区性色av| 欧美一区二区三区啪啪| 久久精品一区二区三区av| 5858s免费视频成人| 制服丝袜中文字幕亚洲| 欧美日韩三级在线| 欧美少妇性性性| 欧美日韩在线三级| 欧美日韩免费观看一区三区| 欧美色区777第一页| 欧美揉bbbbb揉bbbbb| 91精品综合久久久久久| 欧美精品久久天天躁| 日韩精品一区二区三区老鸭窝| 国产三级精品三级在线专区| 欧美一区二区高清| 欧美国产1区2区| 亚洲精品视频免费观看| 亚洲高清视频中文字幕| 老司机精品视频线观看86| 国产美女一区二区三区| a级高清视频欧美日韩| 在线视频中文字幕一区二区| 欧美酷刑日本凌虐凌虐| 久久精品亚洲精品国产欧美| 1区2区3区精品视频| 麻豆国产欧美日韩综合精品二区| 国产精品一线二线三线| 欧美三级电影精品| 国产精品久久久久久久第一福利| 首页国产丝袜综合| 99久久精品情趣| 久久综合色一综合色88| 亚洲尤物在线视频观看| 99国产一区二区三精品乱码| 日本一区二区成人| 激情深爱一区二区| 中文字幕免费不卡在线| 国产精品正在播放| 国产午夜一区二区三区| 国产精品综合av一区二区国产馆| 2014亚洲片线观看视频免费| 国产一区二区在线观看视频| 精品国产免费一区二区三区香蕉 | 在线观看精品一区| 亚洲欧美中日韩| 在线视频观看一区| 久久成人麻豆午夜电影| 久久综合色天天久久综合图片| 精品一区二区三区视频在线观看| 国产拍欧美日韩视频二区| 99国产精品久久久久久久久久 | 色婷婷精品大在线视频| 亚洲成人动漫在线免费观看| 在线观看91av| 九色porny丨国产精品| 久久久久国色av免费看影院| 成人a免费在线看| 日日夜夜精品视频免费| 精品欧美一区二区久久| 成人av网站在线| 亚洲第一av色| 国产精品久99| 欧美v日韩v国产v| 91国模大尺度私拍在线视频| 蜜桃精品视频在线| ㊣最新国产の精品bt伙计久久| 91.xcao| 色诱视频网站一区| 激情综合一区二区三区| 视频一区二区中文字幕| 国产精品美女久久久久aⅴ| 欧美tickling网站挠脚心| 不卡的电影网站| 国产在线精品一区二区不卡了| 欧美一区二区不卡视频| 欧美在线一二三四区| 亚洲女同一区二区| 国产精品国模大尺度视频| 国产精品成人在线观看| 成人福利视频网站| 高清国产一区二区| 在线区一区二视频| 欧美大胆一级视频| 久久久99精品久久| 亚洲色图视频免费播放| 日本欧美一区二区| 久久99久久99小草精品免视看| 亚洲一区二区三区四区在线免费观看| 国产精品卡一卡二| 国产精品久久久久久久久果冻传媒 | 91精品国产综合久久精品图片| 在线观看一区不卡| 欧美影片第一页| 91天堂素人约啪| 色综合久久久网| 欧美亚洲综合在线| 欧美精品三级日韩久久| 日韩一级在线观看| 精品国精品自拍自在线| 国产亚洲成aⅴ人片在线观看 | 欧美成人性战久久| 久久欧美中文字幕| 亚洲天堂成人在线观看| 天天综合日日夜夜精品| 日韩高清电影一区| 精品一区二区三区欧美| 国产精品亚洲综合一区在线观看| 盗摄精品av一区二区三区| 欧美亚日韩国产aⅴ精品中极品| 欧美男男青年gay1069videost| 日本一区二区三级电影在线观看 | 一区二区三区国产精华| 天天色综合成人网| 国产一区二区不卡| 欧美精品在线观看一区二区| 久久免费国产精品| 日本中文字幕一区二区视频| 不卡av电影在线播放| 日韩一级免费一区| 一区二区三区成人在线视频| 久久丁香综合五月国产三级网站| 欧美综合一区二区三区| 欧美极品另类videosde| 极品少妇xxxx精品少妇| 成人激情动漫在线观看| 精品国产123| 免费成人性网站| 91精品久久久久久久久99蜜臂| √…a在线天堂一区| 波多野结衣欧美| 国产农村妇女毛片精品久久麻豆 | 欧美性一二三区| 自拍偷拍亚洲综合| 成人国产精品免费观看动漫| 日韩三级视频中文字幕| 日韩**一区毛片| 欧美日韩国产乱码电影| 午夜国产不卡在线观看视频| 成人av高清在线| 亚洲男女一区二区三区| 色哟哟精品一区| 午夜成人在线视频| 欧美一区二区三区在线观看视频| 日本在线不卡视频一二三区| 日韩三级精品电影久久久| 免费在线欧美视频| 久久久久久久综合色一本| 国产高清成人在线| 亚洲天堂久久久久久久| 色国产综合视频| 日韩国产在线观看一区| 欧美精品一区二区精品网| 国产精品18久久久| 午夜欧美视频在线观看| 精品国产一区二区三区忘忧草| 成人激情文学综合网| 一区二区视频在线| 日韩精品一区二区三区在线观看| 高清在线观看日韩| 肉色丝袜一区二区| 欧美韩国日本不卡| 日韩免费视频一区二区| 91在线一区二区| 精品亚洲欧美一区| 亚洲一二三四在线观看| 国产欧美一区在线| 91麻豆精品国产91久久久使用方法 | 欧美色区777第一页| 国产成人h网站| 久久国产精品第一页| 亚洲一区二区三区自拍| 中文字幕精品一区| 日韩一级二级三级精品视频| 色婷婷久久久亚洲一区二区三区| 国产激情精品久久久第一区二区 |