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

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

?? vdu.java

?? java 平臺 telnet 繁體中文版
?? JAVA
字號:
/* * This file is part of "The Java Telnet Application". * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * "The Java Telnet Application" is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING.  If not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */package de.mud.terminal;import java.awt.Component;import java.awt.Graphics;import java.awt.Color;import java.awt.Dimension;import java.awt.Font;import java.awt.FontMetrics;import java.awt.Point;import java.awt.Insets;import java.awt.Event;import java.awt.Label;import java.awt.Frame;import java.awt.Rectangle;import java.awt.Scrollbar;import java.awt.Image;import java.awt.Toolkit;import java.awt.MediaTracker;import java.awt.Graphics2D;import java.awt.KeyboardFocusManager;import java.util.Collections;import java.awt.Graphics;import java.awt.print.Printable;import java.awt.print.PrinterJob;import java.awt.print.PrinterException;import java.awt.print.PageFormat;import java.awt.AWTEvent;import java.awt.AWTEventMulticaster;import java.awt.event.KeyListener;import java.awt.event.KeyEvent;import java.awt.event.AdjustmentListener;import java.awt.event.AdjustmentEvent;import java.awt.event.MouseListener;import java.awt.event.MouseMotionListener;import java.awt.event.MouseEvent;import java.awt.event.FocusListener;import java.awt.event.FocusEvent;import java.io.InputStream;import java.io.UnsupportedEncodingException;import java.util.Timer;import java.util.TimerTask;import component.GraphicFont;/** * Video Display Unit emulation. This class implements all necessary * features of a character display unit, but not the actual terminal emulation. * It can be used as the base for terminal emulations of any kind. * <P> * This is a lightweight component. It will render very badly if used * in standard AWT components without overloaded update() method. The * update() method must call paint() immediately without clearing the * components graphics context or parts of the screen will simply * disappear. * <P> * <B>Maintainer:</B> Matthias L. Jugel * * @version $Id: VDU.java,v 2.38 2001/03/23 20:50:51 leo Exp $ * @author  Matthias L. Jugel, Marcus Mei遪er */public class VDU extends Component  implements MouseListener, MouseMotionListener {  /** The current version id tag */  public final static String ID = "$Id: VDU.java,v 2.38 2001/03/23 20:50:51 leo Exp $";  /** Enable debug messages. */  public final static int debug = 0;  /** lightweight component definitions */  private final static long VDU_EVENTS = AWTEvent.KEY_EVENT_MASK                                       | AWTEvent.FOCUS_EVENT_MASK                                       | AWTEvent.ACTION_EVENT_MASK                                       | AWTEvent.MOUSE_MOTION_EVENT_MASK                                       | AWTEvent.MOUSE_EVENT_MASK;  private Dimension scrSize;                          /* rows and columns */  private Insets insets;                            /* size of the border */  private boolean raised;            /* indicator if the border is raised */  private char charArray[][];                  /* contains the characters */  private int charAttributes[][];             /* contains character attrs */  // private int bufSize, maxBufSize;                        /* buffer sizes */  private int maxBufSize;                        /* buffer sizes */  private int windowBase;                   /* where the start displaying */  private int screenBase;                      /* the actual screen start */  private int topMargin;                             /* top scroll margin */  private int bottomMargin;                       /* bottom scroll margin */  private int xoffset = 0;             /* x offset to the margin for char */  private int yoffset = 0;             /* y offset to the margin for char */  private Font normalFont;                                 /* normal font */  private FontMetrics fm;                         /* current font metrics */  private int charWidth;                       /* current width of a char */  private int charHeight;                     /* current height of a char */  private int charDescent;                           /* base line descent */  private int resizeStrategy;                /* current resizing strategy */  private int cursorX, cursorY;                /* current cursor position */  private boolean showcursor = true;            /* show cursor */  private int scrCursorX, scrCursorY;           /* screen cursor position */  private Point selectBegin, selectEnd;          /* selection coordinates */  private String selection;                 /* contains the selected text */  private Scrollbar scrollBar;  // private SoftFont  sf = new SoftFont();  private GraphicFont gf;       /* use GraphicFont replace SoftFont .CPC. */  private boolean update[];        /* contains the lines that need update */  private boolean colorPrinting = false;        /* print display in color */  // private Image backingStore = null;  private Image backingStore[];                        /* images per line */  private boolean display[];      /* contains the lines that need display */  private boolean blink[];     /* contains the lines that have blink char */  private boolean blinking = true;           /* blink char now is display */  private int mSecond;                   /* millisecond count for display */  private Object semaphore = new Object();  /**   * Create a color representation that is brighter than the standard   * color but not what we would like to use for bold characters.   * @param clr the standard color   * @return the new brighter color   */  private Color brighten(Color clr) {    return new Color(Math.max((int) (clr.getRed() * 0.4), 0),                     Math.max((int) (clr.getGreen() * 0.4), 0),                     Math.max((int) (clr.getBlue() * 0.4), 0));  }  /**   * adjust the color not as bright as pure color.   * @param clr the standard color   * @return the ne color   */  private Color adjust(Color clr, double coefficient) {    return new Color(Math.max((int) (clr.getRed() * coefficient), 0),                     Math.max((int) (clr.getGreen() * coefficient), 0),                     Math.max((int) (clr.getBlue() * coefficient), 0));  }  private final double LOW_LIGHT = 0.5176;  private final double HIGH_LIGHT = 1.0;  /** A list of colors used for representation of the display */  private Color color[] = { adjust(Color.black, LOW_LIGHT),                            adjust(Color.red, LOW_LIGHT),                            adjust(Color.green, LOW_LIGHT),                            adjust(Color.yellow, LOW_LIGHT),                            adjust(Color.blue, LOW_LIGHT),                            adjust(Color.magenta, LOW_LIGHT),                            adjust(Color.cyan, LOW_LIGHT),                            adjust(Color.white, 0.77),                            adjust(Color.white, LOW_LIGHT),                            adjust(Color.red, HIGH_LIGHT),                            adjust(Color.green, HIGH_LIGHT),                            adjust(Color.yellow, HIGH_LIGHT),                            adjust(Color.blue, HIGH_LIGHT),                            adjust(Color.magenta, HIGH_LIGHT),                            adjust(Color.cyan, HIGH_LIGHT),                            adjust(Color.white, HIGH_LIGHT),  };  public final static int COLOR_0 = 0;  public final static int COLOR_1 = 1;  public final static int COLOR_2 = 2;  public final static int COLOR_3 = 3;  public final static int COLOR_4 = 4;  public final static int COLOR_5 = 5;  public final static int COLOR_6 = 6;  public final static int COLOR_7 = 7;  /* definitions of standards for the display unit */  private static int COLOR_FG_STD  = 7;  private static int COLOR_BG_STD  = 0;  private static int COLOR_FG_BOLD = 16;  private final static int COLOR         = 0x7f8;  private final static int COLOR_FG      = 0x78;  private final static int COLOR_BG      = 0x780;  /** User defineable cursor colors */  private Color cursorColorFG = null;  private Color cursorColorBG = null;  private Color scrCursorColorFG = null;  private Color scrCursorColorBG = null;  /** Scroll up when inserting a line. */  public final static boolean SCROLL_UP   = false;  /** Scroll down when inserting a line. */  public final static boolean SCROLL_DOWN = true;  /** Do nothing when the component is resized. */  public final static int RESIZE_NONE  = 0;  /** Resize the width and height of the character screen. */  public final static int RESIZE_SCREEN  = 1;  /** Resize the font to the new screen size. */  public final static int RESIZE_FONT  = 2;  /** Make character normal. */  public final static int NORMAL  = 0x00;  /** Make character bold. */  public final static int BOLD    = 0x01;  /** Underline character. */  public final static int UNDERLINE  = 0x02;  /** Invert character. */  public final static int INVERT  = 0x04;  /** Blink character. */  public final static int BLINK  = 0x800;  private final int FG_MASK = COLOR_FG | BOLD | UNDERLINE | INVERT | BLINK;  private final int BG_MASK = COLOR_BG | BOLD | INVERT;  private TimerTask blinkingChar = new TimerTask() {    public void run() {      mSecond += 100;      if (mSecond == 800) {        blinking = !blinking;        for (int i = 0; i < scrSize.height; i ++) update[i + 1] = blink[i];        mSecond = 0;      }      redraw();      paint();    }  };  private Timer timer = new Timer();  private HostPrint hp = new HostPrint();  /**   * Create a new video display unit with the passed width and height in   * characters using a special font and font size. These features can   * be set independently using the appropriate properties.   * @param width the length of the character lines   * @param height the amount of lines on the screen   * @param font the font to be used (usually Monospaced)   */  public VDU(int width, int height, Font font) {    // lightweight component handling    enableEvents(VDU_EVENTS);    // set the normal font to use    setFont(font);    // set the standard resize strategy    setResizeStrategy(RESIZE_FONT);    // set the display screen size    setScreenSize(width, height);    // setForeground(Color.white);    // setBackground(Color.black);    setForeground(color[COLOR_FG_STD]);    setBackground(color[COLOR_BG_STD]);    cursorColorFG = color[COLOR_FG_STD];    cursorColorBG = color[COLOR_BG_STD];    clearSelection();    addMouseListener(this);    addMouseMotionListener(this);    setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);    setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);    setFocusTraversalKeys(KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, Collections.EMPTY_SET);    selection = null;    // load the GIF font .CPC.    MediaTracker tracker = new MediaTracker(this);    try {      InputStream is = VDU.class.getResourceAsStream("/de/mud/font/Fixedsys.20.gif");      byte[] fb = new byte[is.available()];      int offset = 0;      while (offset < fb.length) {        int bytesread = is.read(fb, offset, fb.length - offset);        if (bytesread == -1) break;        offset += bytesread;      }      Image fontImage = Toolkit.getDefaultToolkit().createImage(fb);      tracker.addImage(fontImage, 0);      tracker.waitForID(0);      gf = new GraphicFont(fontImage, color);    }    catch (Exception e) {      System.err.println("jta: cannot load .gif" + e.getMessage());    }    // timer.schedule(blinkingChar, 0, 800);    timer.schedule(blinkingChar, 0, 100);    hp.start();  }  /**   * Create a display unit with specific size, Font is "Monospaced", size 12.   * @param width the length of the character lines   * @param height the amount of lines on the screen   */  public VDU(int width, int height) {    this(width, height, new Font("Monospaced", Font.PLAIN, 20));    // this(width, height, new Font("穝燦

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91一区二区三区在线播放| 国产精品视频在线看| 国产精品私人影院| 亚洲高清久久久| 国产成人a级片| 69av一区二区三区| 亚洲视频免费看| 国产盗摄一区二区| 日韩欧美一区电影| 无码av免费一区二区三区试看| 国产成人av一区二区三区在线观看| 欧美日韩视频在线第一区| 中文字幕久久午夜不卡| 极品美女销魂一区二区三区免费| 欧美中文字幕一二三区视频| 国产精品色在线| 国产酒店精品激情| 精品免费国产二区三区| 蜜臀久久久99精品久久久久久| 91精彩视频在线| 亚洲色大成网站www久久九九| 国产成人夜色高潮福利影视| 欧美xxxxx牲另类人与| 日韩av电影一区| 欧美日韩高清影院| 性感美女久久精品| 欧美日韩免费电影| 亚瑟在线精品视频| 欧美军同video69gay| 亚洲影视资源网| 欧美这里有精品| 亚洲一区av在线| 欧美日韩五月天| 日本午夜精品一区二区三区电影| 欧美日韩国产小视频| 亚洲成人黄色影院| 欧美精品777| 秋霞av亚洲一区二区三| 日韩视频在线你懂得| 美女视频网站久久| 精品对白一区国产伦| 另类的小说在线视频另类成人小视频在线 | 成人黄色av电影| 久久精品在线免费观看| 高清不卡一区二区| 国产精品久久久久7777按摩| 99精品国产热久久91蜜凸| 日韩码欧中文字| 欧美性猛交xxxxxxxx| 丝袜国产日韩另类美女| 91精品国产综合久久久久| 免费美女久久99| 久久久久久久精| 91在线观看高清| 亚洲国产va精品久久久不卡综合 | 成人av在线影院| 亚洲丝袜另类动漫二区| 欧美亚洲国产怡红院影院| 午夜av区久久| 久久嫩草精品久久久精品| 国产91在线|亚洲| 一区二区三区在线观看视频 | 免费在线观看不卡| 国产欧美日韩不卡免费| 在线精品亚洲一区二区不卡| 日韩精品一二三四| 国产精品你懂的在线| 91国在线观看| 狠狠久久亚洲欧美| 亚洲国产一区二区视频| 精品国产乱码久久久久久久 | 成人黄页在线观看| 午夜一区二区三区视频| 久久久久久一二三区| 在线国产电影不卡| 国产乱国产乱300精品| 亚洲精品老司机| 久久免费电影网| 777久久久精品| 97se亚洲国产综合自在线观| 狠狠色伊人亚洲综合成人| 一区二区三区久久久| 国产亚洲午夜高清国产拍精品| 欧美三级在线视频| 不卡av免费在线观看| 卡一卡二国产精品| 亚洲成人一区在线| 亚洲激情一二三区| 中文幕一区二区三区久久蜜桃| 91麻豆精品国产自产在线 | 一区二区三区欧美久久| 精品福利一区二区三区免费视频| 欧美三级日本三级少妇99| 风间由美一区二区三区在线观看 | 99精品欧美一区二区三区综合在线| 亚洲不卡在线观看| 亚洲免费观看高清完整版在线观看 | 久久久久亚洲蜜桃| 欧美福利电影网| 在线观看亚洲成人| 成人av资源在线观看| 国产福利91精品一区| 蜜乳av一区二区| 日韩精彩视频在线观看| 亚洲韩国一区二区三区| 国产精品美女久久福利网站| 久久婷婷成人综合色| 26uuu亚洲| 欧美videossexotv100| 3751色影院一区二区三区| 欧美色中文字幕| 欧美影院一区二区| 在线免费av一区| 在线中文字幕一区| 欧美午夜片在线看| 欧美三级午夜理伦三级中视频| 日本丶国产丶欧美色综合| 91首页免费视频| 91麻豆蜜桃一区二区三区| 91啪在线观看| 日本久久一区二区| 欧美三级中文字幕在线观看| 欧美日韩一区二区三区不卡| 欧美日韩精品免费观看视频 | 日本一区二区免费在线| 久久久一区二区| 欧美激情综合五月色丁香小说| 久久久久国产一区二区三区四区| 久久精品视频在线免费观看| 久久久99精品免费观看| 中文字幕第一区| 亚洲一区二区四区蜜桃| 蜜臀av一级做a爰片久久| 韩国精品在线观看| 国产东北露脸精品视频| 日本韩国欧美一区| 欧美一卡2卡三卡4卡5免费| 精品黑人一区二区三区久久| 国产欧美视频在线观看| 亚洲另类春色校园小说| 午夜久久电影网| 激情综合网av| 色综合久久综合网97色综合| 欧美日韩国产另类一区| 精品福利一区二区三区 | 国产精品沙发午睡系列990531| 亚洲美女在线国产| 免费久久精品视频| 高清在线成人网| 欧美久久久久久久久久| 久久人人97超碰com| 亚洲午夜电影在线| 国产精品一区二区在线播放| 色婷婷亚洲婷婷| 亚洲精品一区二区精华| 一区二区三区国产豹纹内裤在线| 日本亚洲最大的色成网站www| 丁香婷婷综合激情五月色| 欧美日韩成人综合天天影院 | 精品国产91亚洲一区二区三区婷婷| 欧美韩国日本综合| 视频在线观看国产精品| 99国产精品99久久久久久| 制服丝袜在线91| 亚洲欧美日韩国产综合| 久久99国内精品| 欧美三级视频在线播放| 中文字幕欧美日韩一区| 美女网站视频久久| 91官网在线观看| 国产嫩草影院久久久久| 久久99国产精品久久99| 欧美三级视频在线| 自拍av一区二区三区| 国产一区二区视频在线播放| 欧美日韩一区不卡| 综合久久给合久久狠狠狠97色| 韩国女主播一区二区三区| 91精品国产色综合久久久蜜香臀| 日韩理论片一区二区| 国产精品自在在线| 精品三级av在线| 蜜桃av一区二区在线观看| 欧美在线免费视屏| 亚洲免费观看高清完整版在线| 成人app在线观看| 国产人成亚洲第一网站在线播放| 日韩高清不卡一区二区三区| 欧美影院精品一区| 亚洲一区二区三区精品在线| 波多野结衣中文字幕一区| 国产午夜久久久久| 国产一区二区在线免费观看| 久久综合久久综合亚洲| 六月婷婷色综合| 精品理论电影在线观看| 激情五月播播久久久精品| 欧美mv日韩mv亚洲| 国产精品综合在线视频| 国产欧美一区二区精品性|