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

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

?? consoletextarea.java

?? 主要的怎么樣結合java 和 javascript!
?? JAVA
字號:
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Rhino JavaScript Debugger code, released * November 21, 2000. * * The Initial Developer of the Original Code is See Beyond Corporation. * Portions created by See Beyond are * Copyright (C) 2000 See Beyond Communications Corporation. All * Rights Reserved. * * Contributor(s): * Christopher Oliver * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the * provisions of the GPL are applicable instead of those above. * If you wish to allow use of your version of this file only * under the terms of the GPL and not to allow others to use your * version of this file under the NPL, indicate your decision by * deleting the provisions above and replace them with the notice * and other provisions required by the GPL.  If you do not delete * the provisions above, a recipient may use your version of this * file under either the NPL or the GPL. */package org.mozilla.javascript.tools.shell;import java.io.*;import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.event.*;import javax.swing.text.Document;import javax.swing.text.Segment;class ConsoleWrite implements Runnable {    private ConsoleTextArea textArea;    private String str;    public ConsoleWrite(ConsoleTextArea textArea, String str) {        this.textArea = textArea;        this.str = str;    }    public void run() {        textArea.write(str);    }};class ConsoleWriter extends java.io.OutputStream {    private ConsoleTextArea textArea;    private StringBuffer buffer;    public ConsoleWriter(ConsoleTextArea textArea) {        this.textArea = textArea;        buffer = new StringBuffer();    }    public synchronized void write(int ch) {        buffer.append((char)ch);        if(ch == '\n') {            flushBuffer();        }    }    public synchronized void write (char[] data, int off, int len) {        for(int i = off; i < len; i++) {            buffer.append(data[i]);            if(data[i] == '\n') {                flushBuffer();            }        }    }    public synchronized void flush() {        if (buffer.length() > 0) {            flushBuffer();        }    }    public void close () {        flush();    }    private void flushBuffer() {        String str = buffer.toString();        buffer.setLength(0);        SwingUtilities.invokeLater(new ConsoleWrite(textArea, str));    }};public class ConsoleTextArea    extends JTextArea implements KeyListener, DocumentListener{    static final long serialVersionUID = 8557083244830872961L;    private ConsoleWriter console1;    private ConsoleWriter console2;    private PrintStream out;    private PrintStream err;    private PrintWriter inPipe;    private PipedInputStream in;    private java.util.Vector history;    private int historyIndex = -1;    private int outputMark = 0;    public void select(int start, int end) {        requestFocus();        super.select(start, end);    }    public ConsoleTextArea(String[] argv) {        super();        history = new java.util.Vector();        console1 = new ConsoleWriter(this);        console2 = new ConsoleWriter(this);        out = new PrintStream(console1);        err = new PrintStream(console2);        PipedOutputStream outPipe = new PipedOutputStream();        inPipe = new PrintWriter(outPipe);        in = new PipedInputStream();        try {            outPipe.connect(in);        } catch(IOException exc) {            exc.printStackTrace();        }        getDocument().addDocumentListener(this);        addKeyListener(this);        setLineWrap(true);        setFont(new Font("Monospaced", 0, 12));    }    synchronized void returnPressed() {        Document doc = getDocument();        int len = doc.getLength();        Segment segment = new Segment();        try {            doc.getText(outputMark, len - outputMark, segment);        } catch(javax.swing.text.BadLocationException ignored) {            ignored.printStackTrace();        }        if(segment.count > 0) {            history.addElement(segment.toString());        }        historyIndex = history.size();        inPipe.write(segment.array, segment.offset, segment.count);        append("\n");        outputMark = doc.getLength();        inPipe.write("\n");        inPipe.flush();        console1.flush();    }    public void eval(String str) {        inPipe.write(str);        inPipe.write("\n");        inPipe.flush();        console1.flush();    }    public void keyPressed(KeyEvent e) {        int code = e.getKeyCode();        if(code == KeyEvent.VK_BACK_SPACE || code == KeyEvent.VK_LEFT) {            if(outputMark == getCaretPosition()) {                e.consume();            }        } else if(code == KeyEvent.VK_HOME) {           int caretPos = getCaretPosition();           if(caretPos == outputMark) {               e.consume();           } else if(caretPos > outputMark) {               if(!e.isControlDown()) {                   if(e.isShiftDown()) {                       moveCaretPosition(outputMark);                   } else {                       setCaretPosition(outputMark);                   }                   e.consume();               }           }        } else if(code == KeyEvent.VK_ENTER) {            returnPressed();            e.consume();        } else if(code == KeyEvent.VK_UP) {            historyIndex--;            if(historyIndex >= 0) {                if(historyIndex >= history.size()) {                    historyIndex = history.size() -1;                }                if(historyIndex >= 0) {                    String str = (String)history.elementAt(historyIndex);                    int len = getDocument().getLength();                    replaceRange(str, outputMark, len);                    int caretPos = outputMark + str.length();                    select(caretPos, caretPos);                } else {                    historyIndex++;                }            } else {                historyIndex++;            }            e.consume();        } else if(code == KeyEvent.VK_DOWN) {            int caretPos = outputMark;            if(history.size() > 0) {                historyIndex++;                if(historyIndex < 0) {historyIndex = 0;}                int len = getDocument().getLength();                if(historyIndex < history.size()) {                    String str = (String)history.elementAt(historyIndex);                    replaceRange(str, outputMark, len);                    caretPos = outputMark + str.length();                } else {                    historyIndex = history.size();                    replaceRange("", outputMark, len);                }            }            select(caretPos, caretPos);            e.consume();        }    }    public void keyTyped(KeyEvent e) {        int keyChar = e.getKeyChar();        if(keyChar == 0x8 /* KeyEvent.VK_BACK_SPACE */) {            if(outputMark == getCaretPosition()) {                e.consume();            }        } else if(getCaretPosition() < outputMark) {            setCaretPosition(outputMark);        }    }    public synchronized void keyReleased(KeyEvent e) {    }    public synchronized void write(String str) {        insert(str, outputMark);        int len = str.length();        outputMark += len;        select(outputMark, outputMark);    }    public synchronized void insertUpdate(DocumentEvent e) {        int len = e.getLength();        int off = e.getOffset();        if(outputMark > off) {            outputMark += len;        }    }    public synchronized void removeUpdate(DocumentEvent e) {        int len = e.getLength();        int off = e.getOffset();        if(outputMark > off) {            if(outputMark >= off + len) {                outputMark -= len;            } else {                outputMark = off;            }        }    }    public synchronized void postUpdateUI() {        // this attempts to cleanup the damage done by updateComponentTreeUI        requestFocus();        setCaret(getCaret());        select(outputMark, outputMark);    }    public synchronized void changedUpdate(DocumentEvent e) {    }    public InputStream getIn() {        return in;    }    public PrintStream getOut() {        return out;    }    public PrintStream getErr() {        return err;    }};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人欧美一区二区三区1314| 欧美日韩亚洲高清一区二区| 久久久激情视频| 免费成人深夜小野草| 欧美日韩一区二区三区四区| 午夜精品久久久| 欧美美女网站色| 日韩专区在线视频| 欧美成人官网二区| 国产成人精品三级麻豆| 国产精品免费人成网站| 大美女一区二区三区| 亚洲视频电影在线| 欧美日本高清视频在线观看| 婷婷夜色潮精品综合在线| 日韩午夜激情电影| 国产精一品亚洲二区在线视频| 久久久久久久久97黄色工厂| 成人一区二区三区在线观看| 亚洲欧美一区二区三区极速播放| 91在线视频官网| 日日夜夜一区二区| 亚洲国产精品二十页| 欧美日韩一区高清| 国产在线视频精品一区| 亚洲欧美色图小说| 欧美一卡在线观看| 99精品国产热久久91蜜凸| 亚洲成人你懂的| 久久久精品国产99久久精品芒果| 91福利国产精品| 国产一区二区三区免费在线观看| 综合电影一区二区三区| 日韩一区二区三区视频在线| 波多野结衣一区二区三区| 丝袜a∨在线一区二区三区不卡| 亚洲精品一区二区三区香蕉| 91福利社在线观看| 国产传媒久久文化传媒| 亚洲福利视频导航| 国产欧美日韩在线视频| 欧美一区二区在线观看| 97成人超碰视| 国产在线不卡一卡二卡三卡四卡| 一区二区三区在线播放| 国产日韩欧美高清| 欧美一区二区三区播放老司机| 99riav一区二区三区| 国产精品538一区二区在线| 午夜精品久久久久久久久久久| 国产精品丝袜在线| 精品国产一区a| 制服丝袜亚洲网站| 91丝袜呻吟高潮美腿白嫩在线观看| 久久9热精品视频| 午夜精品久久久久影视| 日韩理论片中文av| 欧美高清在线视频| 久久色中文字幕| 91精品国产91热久久久做人人| 一本在线高清不卡dvd| 丁香婷婷综合五月| 国产在线精品不卡| 久99久精品视频免费观看| 视频一区二区不卡| 午夜天堂影视香蕉久久| 亚洲精品中文字幕在线观看| 国产精品少妇自拍| 中文字幕精品一区| 国产欧美日韩中文久久| 久久久精品国产免大香伊| 亚洲精品一区二区在线观看| 56国语精品自产拍在线观看| 欧美久久一二区| 欧美一区二区在线播放| 欧美日韩国产精选| 一本到不卡免费一区二区| 91在线播放网址| 日本大香伊一区二区三区| 91色在线porny| 色综合久久天天综合网| 色综合天天综合给合国产| 93久久精品日日躁夜夜躁欧美| 91蜜桃传媒精品久久久一区二区| 不卡一二三区首页| 色婷婷综合久久久中文一区二区| 91亚洲国产成人精品一区二三| 91老师片黄在线观看| 色综合久久88色综合天天6| 欧美在线视频日韩| 91麻豆精品91久久久久同性| 91精品国产综合久久久久久| 欧美一三区三区四区免费在线看| 日韩欧美卡一卡二| 久久亚洲春色中文字幕久久久| 国产欧美精品区一区二区三区| 国产精品青草综合久久久久99| 成人免费在线视频观看| 亚洲国产综合91精品麻豆| 日本vs亚洲vs韩国一区三区| 国产又粗又猛又爽又黄91精品| 懂色av一区二区夜夜嗨| 久久久久国产精品麻豆| 精品处破学生在线二十三| 久久久99久久| 亚洲欧美日韩电影| 日韩影视精彩在线| 麻豆91在线播放免费| 大白屁股一区二区视频| 在线观看日韩一区| 欧美sm美女调教| 亚洲欧洲国产专区| 91麻豆高清视频| 在线成人高清不卡| 久久精品一区蜜桃臀影院| 亚洲精品国产第一综合99久久| 丝瓜av网站精品一区二区| 岛国精品在线播放| 欧美日本韩国一区| 国产精品久久久99| 麻豆国产精品官网| 91香蕉视频在线| 精品国产乱子伦一区| 成人欧美一区二区三区白人| 日韩av不卡在线观看| 不卡视频免费播放| 日韩欧美中文一区二区| 中文字幕亚洲在| 久久精品国产免费| 欧美天堂一区二区三区| 久久精品水蜜桃av综合天堂| 亚洲成av人影院| 大尺度一区二区| 制服丝袜亚洲精品中文字幕| 国产人伦精品一区二区| 日韩av一区二区三区| 91视频观看视频| 中文字幕av资源一区| 蜜桃在线一区二区三区| 91久久人澡人人添人人爽欧美| 久久久国际精品| 麻豆一区二区99久久久久| 99久久99久久免费精品蜜臀| 久久综合九色综合97婷婷女人| 天堂久久一区二区三区| 色综合久久88色综合天天免费| 中文文精品字幕一区二区| 国内久久精品视频| 91精品国产综合久久福利| 亚洲成人av福利| 色94色欧美sute亚洲13| 中文字幕一区二区三区视频| 国产成人亚洲综合a∨猫咪| 精品国产乱码久久| 日韩成人av影视| 欧美精品久久99久久在免费线| 亚洲在线视频网站| 日本黄色一区二区| 亚洲天堂2014| 亚洲精品在线观看网站| 夜夜嗨av一区二区三区网页| 91麻豆精品在线观看| 亚洲欧洲成人自拍| 色综合视频在线观看| 亚洲欧美偷拍另类a∨色屁股| av高清久久久| 亚洲婷婷综合久久一本伊一区 | 亚洲免费观看高清| av影院午夜一区| 亚洲色图制服诱惑 | 欧美亚洲国产一区二区三区va | 亚洲电影一级黄| 欧美性做爰猛烈叫床潮| 亚洲一区在线观看网站| 欧美日韩一区二区三区高清 | 欧美一级理论性理论a| 欧美aⅴ一区二区三区视频| 日韩一区二区影院| 经典一区二区三区| 精品99999| 国产99精品视频| 亚洲免费观看高清在线观看| 欧美影视一区在线| 天堂一区二区在线| 精品国精品国产尤物美女| 久久99精品一区二区三区三区| 91精品国产综合久久久久久漫画| 青青草国产精品97视觉盛宴| 日韩精品中午字幕| 国产九色sp调教91| 亚洲另类春色校园小说| 欧美日韩亚洲高清一区二区| 奇米色一区二区| 3d动漫精品啪啪一区二区竹菊 | 日韩美女久久久| 欧美日韩中文国产| 国模大尺度一区二区三区| 国产精品久久久久久亚洲毛片| 欧美日韩免费电影| 国产一区高清在线|