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

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

?? simulator.java

?? WAP ide 代碼
?? JAVA
?? 第 1 頁 / 共 4 頁
字號(hào):
package sim;import java.util.*;import javax.swing.*;import java.awt.*;import java.awt.event.*;import java.net.*;import java.io.*;/** * A simple WAP Simulator based on the WAP simulator WAPLET.  WAPLEt was designed * as an applet so it overrides certain mehtods to do its painting and updating * of the screen.  It also calls the function init() when first loaded to * handle initializations.  These routines have been maintained and upgraded so that * they can work under a normal Java Application format.  Many of the * routines have been changed to reflect this. For example, in the init() routine * references to the "this" pointer have been replaced with this.getContentPane, since * the JFrame class does not support access to itself directly.  All Graphical controls * must be added to the contentpane.  Routines where added to provide more functions to the * class, shuch as routines for calling up a popup menu, or even routines accessible * by the WAPIDE class to make changes in that class as well as allow the WAPIOE * class access to certain simulator functions. * * Some routines of WAPLET that where maintained where also changed so as to provide * more functionality to the browser.  For example, do links of types "accept" and "unknown" * are now supported and take preference over the anchor tag.  In the future * I hope to add even more functionality to the browser, making it fully compliant with * the specifications laid fown by the WAPForum. * * Skinning support has been added, and skins created by the PhoneDesigner class in the * Designer package can be loaded into the Simulator interactively.  Eventually, menu support * will follow so that the Simulator will be able to mimick any phone on the market. * Copyright: Copyright (c) 2003 * @author Mark Busman * @version 1.0 * Contact Info: cougar@skyinet.net * * This program 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 of the License, or * (at your option) any later version. * * This program 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 program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *//******************* * Modifications made to the original WAPLET class * * Feb 3, 2003 * - Renamed WAPLET class to Simulator class, added dummy MouseListner implementations * - Added a popup menu and hooked it up to the this_mouseClicked listener. * - Changed init() routine to make it comply with the JFrame implementation * - Changed the size of the offscreen buffer and moved its implementation to the constructor. * - Added two constants LEFT_MOUSE_BUTTON and RIGHT_MOUSE_BUTTON * * Feb 4, 2003 * - Added a mainPanel JPanel to the class to act as a container for the background image * - Made changes to the paint and update routines to improve rendering, had problems with *   default rendering behaviour, tests with background image did not render properly -- FIXED * - Made changes to the render() routine, added support for do types "accept" and "unknown" * - Made changes to init() routine, added support for do types "accept" and "unknown" in *   paint() method of _p2 control. * - Added _donext, _donextstring, _doprevstring variables for use with the init(), render() routines *   when rendering do tags.  the -donextstring and _doprevstring store label info. * - Changed the loadContent() routine, removed portions refrencing this.getContentBase() since *   this routine is not supported by the JFrame class * - Changed tje loadContent() routine to allow it to load files from a hard disk *   by name instead pf by URL, url support removed since it is not needed at this point in time * - Added loadDocument() routine to load a disk file and remove white space before passed *   the file contents are passed back to loadContent() along with the 1st card's id if any. * - Added constructor Simulator(String filename) * * Feb 5, 2003 * - Added skinning support through the use of a popup menu -- BUTTONS NOT FUNCTIONAL * - Added loadskin() routine and implemented the popup menu listeners * - Implemented file loading through the use of the popup menu Load File command * - Modified default content * - Changed background loading routine to simplify loading of default background *   image by using getResource() routine and created a simple background image *   and added it to the project. * * Feb 6, 2003 * - Made skin buttons functional through mouse listener routine -- OK, CANCEL, UP, DOWN, # *    supported * - Crude method of getting data for buttons with more than 1 item, i.e [1,2,3] shuch as *   cell phone buttons, implemented -- NEEDS MORE WORK * - Preliminary integration with WAPIDE class using current constructors * - Changed SCREENWIDTH, SCREENHEIGHT, and SCREEN_GREEN from constants to variables, *   renamed ScreenWidth, ScreenHeight, and Screen_Green. * - Added a BUTTONSCREENHEIGHT constant to the class to keep the height of the 2nd panel *   constant, modified effected routines. * * Feb 7, 2003 * - Added _idemenu, idetoolbar variables * - Added a new cosntructor to the class allowing for a filename, skinfile, JMenu, and *   toolbar to be passed in to the class. * - Added several routines to integrate Simulator class with WAPIDE class, namely: *   Back(), Home(), loadFile(), loadLoc(), Refresh(), Reload(), setSkin(), Stop() * - Modified constructors, this_mouseClicked(), init(), loadSkin(), render() for *   interoperability with the WAPIDE.  If constructor (filename, skin, menu, toolbar) is *   used then right clciking on the simulator does not popup the popup menu, instead *   the options of the peopup menu must be selected in the WAPIDE class * * Feb 8, 2003 * - added main() function * - performed tests * * Feb 9, 2003 * - Final integration test -- SUCCESSFUL *******************/public class Simulator extends JFrame implements ActionListener, MouseListener{  private JPopupMenu navPopupMenu = new JPopupMenu();  private JMenuItem navBack = new JMenuItem();  private JMenuItem navHome = new JMenuItem();  private JMenuItem navRefresh = new JMenuItem();  private JMenuItem navReload = new JMenuItem();  private JMenuItem navStop = new JMenuItem();  private JMenuItem navLocation = new JMenuItem();  private JMenuItem navFile = new JMenuItem();  private JMenuItem navSkin = new JMenuItem();  private GridBagLayout gridBagLayout1 = new GridBagLayout();  private JPanel mainPanel = new JPanel();  private JLabel BKGround = new JLabel();  private JMenuItem navSkinDefault = new JMenuItem();  // User Variables  /////////////////////////////////////////////////////////////////////////////  // Original Copyright notice of WAPLET  /////////////////////////////////////////////////////////////////////////////  ///* attention decompilers */  //static String copyright =  //      "this code and all related object, binary and bytecode " +  //	"compilations are copyright (c) 2000 pagea company. ";  /////////////////////////////////////////////////////////////////////////////  /** the page parser class used in rendering pages */  private Parser _parser;  /** a local vector holds the page contents */  private Vector _contents;  /** this vector is used in rendering lines of text to the screen */  private Vector _buffer;  /**   * a hash of links is maintained to support navigation,   * keyed by position index in the document.   */  private Hashtable _links;  /**   * the cookie jar is used to pass cookies back and forth in the   * waplet. this isn't required behavior (I think), but it keeps   * the waplet from generating millions of sessions.   */  private Hashtable _cookiejar = new Hashtable();  /**   * this image is used for page rendering-- content is drawn for   * the whole card, then the display shows a window on this image.   */  private Image _offscreen;  /** panels used to lay out components */  private Panel _p, _p2;  /** this is a local variable for the vertical image offset */  private int _vertical;  /** this flag represents current justification when rendering a page. */  private int _justify;  /** this flag represents underline state when rendering pages. */  private boolean _underline;  /** this flag represents inverted-text state when rendering pages. */  private boolean _invert;  /** If true means a previous event exists */  private boolean _doprev;  /** the link for a do botton other than prev button */  private boolean _donext = false;  /** this field maintains the current text-cursor position */  private Point _cursor;  /** field indicates the current font, used in page rendering */  private int _currentfont;  /** the current link index. links are keyed by position in the document */  private int _currentlinkindex;  /** the current highlighted/selected link. */  private int _highlightlink;  /** the graphics object for the offscreen rendering image. */  private Graphics _offg;  /** the name of the current card, within the current deck. */  private String _currentcard;  /** the current page, as string. */  private String _page;  /** the ling for a back button */  private String _dostring;  /** the cardid that the go event of the do event points to */  private String _donextstring = "";  /** the label text, if any for do's with a type of prev */  private String _dotext = "Back";  /** the label text, if any for do's with a type other than prev */  private String _donexttext = "Next";  /** the background image (skin?) */  private Image _bgimage = null;  /** screen width */  private int ScreenWidth = 124;  /** screen height -- be realistic */  private int ScreenHeight = 83; // was 115  /** the green color used as a screen background. */  private Color Screen_Green = new Color( 0, 234, 0);  /** The Menu used by the WAPIDE */  private JMenu idemenu = null;  /** The Toolbar used by the WAPIDE */  private JToolBar idetoolbar = null;  /** screen-height for one row of text */  private static final int ROWHEIGHT = 16;  /** button screen height */  private static final int BUTTONSCREENHEIGHT = 25;  /** field represents left justification */  private static final int LEFT_JUSTIFY = 0;  /** field represents center justification */  private static final int CENTER_JUSTIFY = 1;  /** field represents right justification */  private static final int RIGHT_JUSTIFY = 2;  /** field represents an undefined font state */  private static final int UNDEFINED = -1;  /** field represents plain text font */  private static final int FONT_PLAIN = 0;  /** field represents bold text font */  private static final int FONT_BOLD = 1;  /** field represents small font */  private static final int FONT_SMALL = 2;  /** field represents italic font */  private static final int FONT_ITALIC = 3;  /**   * this array holds references to font class instances for the   * several fonts used.   */  private static final Font[] FONTS = {    new Font( "Helvetica", Font.PLAIN, 12),    new Font( "Helvetica", Font.BOLD, 12),    new Font( "Helvetica", Font.PLAIN, 10),    new Font( "Helvetica", Font.ITALIC, 12)  };  /** default content, used when a page fails compilation. */  private static String defaultContent =        "<wml>" +        "  <card id=\"init\" newcontext=\"true\">" +        "    <do type=\"accept\" label=\"about\">" +        "      <go href=\"#about\"/></do>" +        "    <p align=\"center\">" +        "    <b>Phone Simulator</b>" +        "    <br/>based on <i>WAPLET</i><br/>Modified by<br/>Mark Busman</p></card>" +        "  <card id=\"about\">" +        "    <do type=\"prev\">" +        "      <go href=\"#init\"/>" +        "    </do>" +        "    <p>WAPLET is released by pagea company." +        " This WAP Phone simulator is based on WAPLET" +        " and was modified for use with " +      " the WAPIDE package." +        "    </p>" +        "  </card>" +        "</wml>"  ;  /** the background image/skin. */  private static String BACKGROUND_IMAGE =      "phonedefault.gif";  /** Left mouse button value */  private static int LEFT_MOUSE_BUTTON = 16;  /** Right mouse button value */  private static int RIGHT_MOUSE_BUTTON = 4;  /** Constructs an empty Simulator object. */  public Simulator() {  }  /**   *  Constructs a Simulator object, displays the simulator, and loads a file for display.   *  @param String filename - the name of the file and its path.   */  public Simulator(String file) {    try {      jbInit();      pack();      show();      // max screen size      _offscreen = getContentPane().createImage(1600, 1600);      _page = file;      init();    }    catch(Exception e) {      e.printStackTrace();    }  }  public Simulator(String file, String skin, JMenu menu, JToolBar tb) {    try {      idemenu = menu;      idetoolbar = tb;      for (int x = 0; x < 2; x++)        idemenu.getItem(x).setEnabled(true);      for (int x = 3; x < 5; x++)        idemenu.getItem(x).setEnabled(true);      for (int x = 8; x < 9; x++)        idemenu.getItem(x).setEnabled(true);      for (int x = 21; x < 25; x++)        idetoolbar.getComponentAtIndex(x).setEnabled(true);      jbInit();      pack();      show();      // max screen size      _offscreen = getContentPane().createImage(1600, 1600);      _page = file;      String str = null;      FileInputStream fis = null;      try {        fis = new FileInputStream (skin);        int size = fis.available();        byte[] bytes = new byte [size];        fis.read (bytes);        str = new String (bytes);        fis.close ();      }      catch (IOException err) {      }      if (str != null) {        loadSkin(str);      }      else        init();    }    catch(Exception e) {      e.printStackTrace();    }  }  public static void main(String[] args) {    String message = "Simulator version 1.0, Copyright (C) 2003 Mark Busman\n";    message = message + "Simulator comes with ABSOLUTELY NO WARRANTY;\nfor details see Copying.txt\n";    message = message + "This is free software, and you are welcome to redistribute it under certain conditions; see Copying.txt for the details.";    System.out.println(message);    Simulator simulator1 = new Simulator("");  }  private void jbInit() throws Exception {    this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);    setIconImage(Toolkit.getDefaultToolkit().createImage(Simulator.class.getResource("icon.gif")));    this.setTitle("WAP Simulator");    this.getContentPane().setLayout(gridBagLayout1);    this.addMouseListener(new java.awt.event.MouseAdapter() {      public void mouseClicked(MouseEvent e) {        this_mouseClicked(e);      }    });    navBack.setEnabled(false);    navBack.setText("Back");    navBack.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        navBack_actionPerformed(e);      }    });    navHome.setText("Home");    navHome.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        navHome_actionPerformed(e);      }    });    navRefresh.setText("Refresh Card");    navRefresh.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        navRefresh_actionPerformed(e);      }    });    navReload.setText("Reload Deck");    navReload.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        navReload_actionPerformed(e);      }    });    navStop.setEnabled(false);    navStop.setText("Stop Loading Deck");    navLocation.setEnabled(false);    navLocation.setText("Load Location");    navFile.setText("Load File");    navFile.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        navFile_actionPerformed(e);      }    });    navSkin.setText("Load Phone Skin");    navSkin.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        navSkin_actionPerformed(e);      }    });    navSkinDefault.setText("Default Skin");    navSkinDefault.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        navSkinDefault_actionPerformed(e);      }    });    navPopupMenu.add(navBack);    navPopupMenu.add(navHome);    navPopupMenu.addSeparator();    navPopupMenu.add(navRefresh);    navPopupMenu.add(navReload);    navPopupMenu.add(navStop);    navPopupMenu.addSeparator();    navPopupMenu.add(navLocation);    navPopupMenu.add(navFile);    navPopupMenu.addSeparator();    navPopupMenu.add(navSkin);    navPopupMenu.add(navSkinDefault);    this.getContentPane().add(mainPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));    mainPanel.add(BKGround, null);  }  /**Overridden so we can exit when window is closed*/  protected void processWindowEvent(WindowEvent e) {    super.processWindowEvent(e);    if (e.getID() == WindowEvent.WINDOW_CLOSING) {      if (idemenu != null) { // disable IDE controls        for (int x = 0; x < 2; x++)          idemenu.getItem(x).setEnabled(false);        for (int x = 3; x < 5; x++)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品一区二区天天拍小说| 最新国产成人在线观看| 欧美精品在线观看播放| 欧日韩精品视频| 欧美亚洲自拍偷拍| 欧美日韩成人综合| 欧美一区二区三区日韩视频| 欧美色综合网站| 制服丝袜亚洲色图| 5566中文字幕一区二区电影| 91精品国产品国语在线不卡| 91精品国产综合久久精品麻豆 | 波多野结衣91| 99国产精品久久久| 欧美亚日韩国产aⅴ精品中极品| 色av成人天堂桃色av| 欧美羞羞免费网站| 日韩欧美在线影院| 久久久综合激的五月天| 国产日本一区二区| 亚洲美女免费视频| 日韩精品一级中文字幕精品视频免费观看| 偷拍一区二区三区| 激情都市一区二区| 不卡的av在线| 色国产综合视频| 91精品久久久久久蜜臀| 久久亚洲精品小早川怜子| 国产精品美女久久久久久久| 亚洲免费资源在线播放| 日本在线观看不卡视频| 国产精品一区一区| 91亚洲精品一区二区乱码| 欧美无人高清视频在线观看| 日韩欧美久久久| 中文字幕一区二区三区在线不卡 | 自拍偷自拍亚洲精品播放| 亚洲伊人色欲综合网| 免费观看在线综合| 国产一区二区三区观看| 99riav一区二区三区| 欧美日韩国产片| 国产日本欧洲亚洲| 日韩中文字幕一区二区三区| 国产酒店精品激情| 色噜噜狠狠成人中文综合| 欧美一区二区女人| 国产精品初高中害羞小美女文| 亚洲电影一级片| 东方欧美亚洲色图在线| 欧美日本国产视频| 国产精品毛片无遮挡高清| 天天av天天翘天天综合网| 风间由美性色一区二区三区| 欧美日韩国产免费| 亚洲欧洲精品成人久久奇米网| 免费在线视频一区| 91在线国产福利| 久久夜色精品一区| 无码av免费一区二区三区试看 | 精品sm捆绑视频| 亚洲主播在线播放| 成人午夜在线视频| 日韩精品综合一本久道在线视频| 国产日韩欧美一区二区三区综合| 婷婷成人激情在线网| 懂色一区二区三区免费观看| 日韩一级视频免费观看在线| 亚洲色图.com| 蜜桃一区二区三区四区| 91成人看片片| 国产精品夫妻自拍| 国产精品一区二区久久精品爱涩| 欧美情侣在线播放| 综合亚洲深深色噜噜狠狠网站| 久久丁香综合五月国产三级网站 | 日韩中文字幕区一区有砖一区 | 欧美日韩国产大片| 亚洲国产成人自拍| 捆绑调教一区二区三区| 欧美日韩在线电影| 亚洲综合清纯丝袜自拍| 99视频精品免费视频| 欧美国产日韩亚洲一区| 国产精品主播直播| 日韩欧美激情在线| 免费成人av资源网| 欧美日韩免费观看一区三区| 综合色天天鬼久久鬼色| 成人福利在线看| 国产人妖乱国产精品人妖| 韩国一区二区三区| 538prom精品视频线放| 国产成人av电影在线| 欧美色区777第一页| 亚洲成人精品影院| 91一区二区在线| 日韩午夜在线观看| 青青草国产精品亚洲专区无| 色婷婷av一区二区三区之一色屋| 亚洲一区二区三区视频在线播放| 色老头久久综合| 美女国产一区二区三区| 国产精品久99| 日韩欧美成人一区| 一本大道久久精品懂色aⅴ| 国产激情精品久久久第一区二区| 亚洲欧美激情在线| 国产精品三级视频| 久久理论电影网| 日韩欧美电影在线| 欧美日韩精品是欧美日韩精品| 91麻豆精东视频| 精品一区二区三区免费播放| 国产欧美日本一区视频| 精品成a人在线观看| 91精品黄色片免费大全| 欧美日本在线播放| 欧美精品vⅰdeose4hd| 91精品国产综合久久香蕉麻豆 | 91免费版在线看| 粉嫩一区二区三区在线看| 中文字幕在线不卡| 国产精品久久久99| 亚洲精品中文字幕在线观看| 亚洲乱码中文字幕| 午夜精品久久久久久不卡8050| 亚洲国产一二三| 久久爱www久久做| 国产精一品亚洲二区在线视频| 国产精品一区二区在线播放| 亚洲一区二区精品视频| 中文一区在线播放| 一区二区三区中文免费| 日产国产欧美视频一区精品| 国产一区 二区| 色欧美乱欧美15图片| 69精品人人人人| 精品日韩99亚洲| 成人欧美一区二区三区小说| 亚洲制服丝袜在线| 亚洲精品视频一区二区| 亚洲伊人色欲综合网| 青草国产精品久久久久久| 国产精品一区二区久久精品爱涩 | 欧美三级乱人伦电影| 精品国产成人在线影院| 中文字幕一区二区日韩精品绯色| 亚洲精品国产成人久久av盗摄| 免费成人深夜小野草| 欧美三级电影精品| 欧美在线观看一二区| 色婷婷av久久久久久久| 成人免费毛片片v| 7777精品伊人久久久大香线蕉超级流畅| 久久综合九色综合97婷婷女人| 亚洲欧美成人一区二区三区| 久久国产尿小便嘘嘘尿| 在线成人av网站| 婷婷综合在线观看| 在线不卡免费欧美| 日日夜夜精品视频天天综合网| 欧美日韩中字一区| 日本最新不卡在线| 欧美熟乱第一页| 国产精品美女久久久久av爽李琼| 国产成人无遮挡在线视频| 国产喷白浆一区二区三区| 成人黄色电影在线| 亚洲一区av在线| 欧美一区二区三区公司| 国产曰批免费观看久久久| 中文字幕av在线一区二区三区| 国产很黄免费观看久久| 一区二区三区国产精华| 欧美男人的天堂一二区| 国产精品亚洲а∨天堂免在线| 亚洲欧洲另类国产综合| 在线观看91精品国产麻豆| 国产一区二区三区蝌蚪| 一区二区三区精密机械公司| 日韩精品中文字幕在线一区| av电影在线观看一区| 麻豆国产欧美日韩综合精品二区 | 亚洲夂夂婷婷色拍ww47| 精品国产网站在线观看| 色老汉一区二区三区| 国产精品乡下勾搭老头1| 国产一区二区精品久久91| 自拍视频在线观看一区二区| 欧美va亚洲va| 欧美日韩高清一区| 91黄色在线观看| 国产成人午夜高潮毛片| 亚洲一区二区三区四区的| 中文字幕+乱码+中文字幕一区| 欧美日韩综合不卡| 99久久婷婷国产综合精品| 激情综合网av| 婷婷久久综合九色国产成人|