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

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

?? cachelayer.java

?? openmap java寫的開源數(shù)字地圖程序. 用applet實現(xiàn),可以像google map 那樣放大縮小地圖.
?? JAVA
字號:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/layer/CacheLayer.java,v $// $RCSfile: CacheLayer.java,v $// $Revision: 1.2.2.2 $// $Date: 2005/08/09 19:21:27 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.layer;import java.awt.Color;import java.awt.Component;import java.awt.event.ActionListener;import java.awt.event.MouseEvent;import java.io.IOException;import java.net.URL;import java.util.Properties;import javax.swing.Box;import javax.swing.JButton;import javax.swing.JLabel;import javax.swing.JTextField;import com.bbn.openmap.Layer;import com.bbn.openmap.event.MapMouseListener;import com.bbn.openmap.event.ProjectionEvent;import com.bbn.openmap.event.SelectMouseMode;import com.bbn.openmap.omGraphics.OMGraphic;import com.bbn.openmap.omGraphics.OMGraphicList;import com.bbn.openmap.util.Debug;import com.bbn.openmap.util.PropUtils;/** * A Layer that gets it's graphics from a URL containing a serialized * OMGraphicList. This layer does respond to gesturing on the * graphics, but doesn't do anything. You can extend this class to be * more useful to you. It has one property that needs to be set in the * properties file: * <P># CacheLayer property: <BR># The layer should figure out * whether it's a file or URL. <BR> * cachelayer.cacheFile= <url of cachefile> <BR> */public class CacheLayer extends Layer implements ActionListener,        MapMouseListener {    public static final String CacheFileProperty = "cacheFile";    /** Used by the gui */    private static final String READ_DATA_COMMAND = "ReadData";    /**     * URL to read data from. This data will be in the form of a     * serialized stream of OMGraphics.     */    protected URL cacheURL;    /**     * A list of graphics to be painted on the map.     */    protected OMGraphicList omgraphics = new OMGraphicList();    /**     * Construct a default CacheLayer.     */    public CacheLayer() {}    /**     * Read a cache of OMGraphics     */    public void readGraphics() throws java.io.IOException {        if (Debug.debugging("cachelayer")) {            Debug.output("Reading cached graphics");        }        if (omgraphics == null) {            omgraphics = new OMGraphicList();        }        if (cacheURL != null) {            omgraphics.readGraphics(cacheURL);        }    }    /**     * Initializes this layer from the given properties.     *      * @param props the <code>Properties</code> holding settings for     *        this layer     */    public void setProperties(String prefix, Properties props) {        super.setProperties(prefix, props);        prefix = PropUtils.getScopedPropertyPrefix(prefix);        String cacheFile = props.getProperty(prefix + CacheFileProperty);        try {            if (cacheFile != null) {                if (Debug.debugging("cachelayer")) {                    Debug.output("Getting cachefile: " + cacheFile);                }                // First find the resource, if not, then try as a                // file-URL... b                cacheURL = PropUtils.getResourceOrFileOrURL(this, cacheFile);                if (cacheURL != null) {                    readGraphics();                }            }        } catch (java.net.MalformedURLException mue) {            mue.printStackTrace();        } catch (IOException ioe) {            ioe.printStackTrace();        } catch (NullPointerException e) {            e.printStackTrace();        }    }    //----------------------------------------------------------------------    // Layer overrides    //----------------------------------------------------------------------    /**     * Renders the graphics list. It is important to make this routine     * as fast as possible since it is called frequently by Swing, and     * the User Interface blocks while painting is done.     */    public void paint(java.awt.Graphics g) {        omgraphics.render(g);    }    //----------------------------------------------------------------------    // ProjectionListener interface implementation    //----------------------------------------------------------------------    /**     * Handler for <code>ProjectionEvent</code>s. This function is     * invoked when the <code>MapBean</code> projection changes. The     * graphics are reprojected and then the Layer is repainted.     * <p>     *      * @param e the projection event     */    public void projectionChanged(ProjectionEvent e) {        omgraphics.project(e.getProjection(), true);        repaint();    }    //----------------------------------------------------------------------    /**     * Provides the palette widgets to control the options of showing     * maps, or attribute text.     *      * @return Component object representing the palette widgets.     */    public Component getGUI() {        JButton rereadFilesButton = new JButton("ReRead OMGraphics");        rereadFilesButton.setActionCommand(READ_DATA_COMMAND);        rereadFilesButton.addActionListener(this);        JLabel fileLabel = new JLabel("Read from: ");        JTextField pathText = new JTextField(cacheURL.toString());        Box filebox = Box.createHorizontalBox();        filebox.add(fileLabel);        filebox.add(pathText);        Box box = Box.createVerticalBox();        box.add(rereadFilesButton);        box.add(filebox);        return box;    }    //----------------------------------------------------------------------    // ActionListener interface implementation    //----------------------------------------------------------------------    /**     * The Action Listener method, that reacts to the palette widgets     * actions.     */    public void actionPerformed(java.awt.event.ActionEvent e) {        String cmd = e.getActionCommand();        if (cmd == READ_DATA_COMMAND) {            Debug.message("cachelayer",                    "CacheLayer: Reading serialized graphics");            try {                readGraphics();            } catch (java.io.IOException exc) {                exc.printStackTrace();            }        } else {            Debug.error("Unknown action command \"" + cmd                    + "\" in SaveShapeLayer.actionPerformed().");        }    }    //----------------------------------------------------------------------    // MapMouseListener interface implementation    //----------------------------------------------------------------------    private OMGraphic selectedGraphic;    /**     * Indicates which mouse modes should send events to this     * <code>Layer</code>.     *      * @return An array mouse mode names     *      * @see com.bbn.openmap.event.MapMouseListener     * @see com.bbn.openmap.MouseDelegator     */    public String[] getMouseModeServiceList() {        String[] ret = { SelectMouseMode.modeID };        return ret;    }    /**     * Called whenever the mouse is pressed by the user and one of the     * requested mouse modes is active.     *      * @param e the press event     * @return true if event was consumed (handled), false otherwise     * @see #getMouseModeServiceList     */    public boolean mousePressed(MouseEvent e) {        return false;    }    /**     * Called whenever the mouse is released by the user and one of     * the requested mouse modes is active.     *      * @param e the release event     * @return true if event was consumed (handled), false otherwise     * @see #getMouseModeServiceList     */    public boolean mouseReleased(MouseEvent e) {        return false;    }    /**     * Called whenever the mouse is clicked by the user and one of the     * requested mouse modes is active.     *      * @param e the click event     * @return true if event was consumed (handled), false otherwise     * @see #getMouseModeServiceList     */    public boolean mouseClicked(MouseEvent e) {        if (selectedGraphic != null) {            switch (e.getClickCount()) {            case 1:                if (Debug.debugging("cachelayer")) {                    Debug.output("CacheLayer: Show Info: "                            + selectedGraphic.getAppObject());                }                break;            case 2:                if (Debug.debugging("cachelayer")) {                    Debug.output("CacheLayer: Request URL: " + selectedGraphic);                }                break;            default:                break;            }            return true;        } else {            return false;        }    }    /**     * Called whenever the mouse enters this layer and one of the     * requested mouse modes is active.     *      * @param e the enter event     * @see #getMouseModeServiceList     */    public void mouseEntered(MouseEvent e) {}    /**     * Called whenever the mouse exits this layer and one of the     * requested mouse modes is active.     *      * @param e the exit event     * @see #getMouseModeServiceList     */    public void mouseExited(MouseEvent e) {}    /**     * Called whenever the mouse is dragged on this layer and one of     * the requested mouse modes is active.     *      * @param e the drag event     * @return true if event was consumed (handled), false otherwise     * @see #getMouseModeServiceList     */    public boolean mouseDragged(MouseEvent e) {        return false;    }    private Color oldFillColor = java.awt.Color.yellow;    /**     * Called whenever the mouse is moved on this layer and one of the     * requested mouse modes is active.     * <p>     * Tries to locate a graphic near the mouse, and if it is found,     * it is highlighted and the Layer is repainted to show the     * highlighting.     *      * @param e the move event     * @return true if event was consumed (handled), false otherwise     * @see #getMouseModeServiceList     */    public boolean mouseMoved(MouseEvent e) {        OMGraphic newSelectedGraphic = omgraphics.selectClosest(e.getX(),                e.getY(),                2.0f);        if (newSelectedGraphic != selectedGraphic) {            if (selectedGraphic != null)                selectedGraphic.setFillPaint(oldFillColor);            selectedGraphic = newSelectedGraphic;            if (newSelectedGraphic != null) {                oldFillColor = newSelectedGraphic.getFillColor();                newSelectedGraphic.setFillPaint(Color.white);                fireRequestInfoLine(newSelectedGraphic.getAppObject()                        .toString());            }            repaint();        }        return true;    }    /**     * Called whenever the mouse is moved on this layer and one of the     * requested mouse modes is active, and the gesture is consumed by     * another active layer. We need to deselect anything that may be     * selected.     *      * @see #getMouseModeServiceList     */    public void mouseMoved() {        omgraphics.deselectAll();        repaint();    }    /**     * Returns self as the <code>MapMouseListener</code> in order to     * receive <code>MapMouseEvent</code>s. If the implementation     * would prefer to delegate <code>MapMouseEvent</code>s, it     * could return the delegate from this method instead.     *      * @return The object to receive <code>MapMouseEvent</code> s or     *         null if this layer isn't interested in     *         <code>MapMouseEvent</code> s     */    public MapMouseListener getMapMouseListener() {        return this;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩理论片在线| 成人一二三区视频| 亚洲国产va精品久久久不卡综合| 成人欧美一区二区三区1314| 国产午夜精品一区二区三区四区| 精品欧美一区二区久久| 日韩欧美视频一区| 精品国产人成亚洲区| 日韩欧美国产三级电影视频| 欧美刺激午夜性久久久久久久| 日韩一卡二卡三卡| 日韩欧美在线影院| 精品处破学生在线二十三| 精品国产伦一区二区三区观看方式| 欧美精品一区二区在线观看| 欧美精品一区二区三| 国产日韩欧美在线一区| 国产精品午夜免费| 亚洲精品欧美在线| 亚洲成人午夜影院| 免费高清成人在线| 国产福利一区二区三区| 99精品在线免费| 91福利视频在线| 91精品中文字幕一区二区三区| 欧美一区二区三区小说| 欧美v国产在线一区二区三区| 精品少妇一区二区三区在线视频| 国产欧美精品一区| 一区二区三区在线播放| 午夜在线成人av| 精品在线播放免费| 成人久久久精品乱码一区二区三区 | 日韩亚洲电影在线| 久久久久久久久久电影| 最新国产成人在线观看| 午夜影院在线观看欧美| 韩国三级在线一区| 91热门视频在线观看| 欧美日韩高清一区二区不卡 | 中文字幕乱码亚洲精品一区| 一区二区三区欧美视频| 日本亚洲天堂网| 国产成a人亚洲精| 欧美性大战久久久久久久 | 亚洲四区在线观看| 香蕉成人伊视频在线观看| 国产麻豆日韩欧美久久| 在线视频一区二区三| 精品国产乱码久久久久久影片| 亚洲欧美日本韩国| 久久国产免费看| 色先锋资源久久综合| 日韩欧美色综合| 亚洲蜜臀av乱码久久精品蜜桃| 久久99精品久久只有精品| 99视频一区二区| 日韩欧美一区二区免费| 一区二区在线免费| 精品亚洲成a人在线观看| 色伊人久久综合中文字幕| 2023国产精品| 亚洲成人动漫在线免费观看| 国产精品一区二区你懂的| 欧美日韩国产综合一区二区 | 日韩成人av影视| 91视频精品在这里| 久久美女艺术照精彩视频福利播放| 亚洲福利国产精品| 成人黄色小视频| 欧美mv日韩mv亚洲| 亚洲18色成人| 99国产精品久久| 国产日韩视频一区二区三区| 日本最新不卡在线| 在线观看国产日韩| 亚洲品质自拍视频网站| 国产精品白丝jk黑袜喷水| 在线播放91灌醉迷j高跟美女 | 亚洲二区在线视频| 色噜噜狠狠成人网p站| 日本一区二区三区免费乱视频| 日本欧美韩国一区三区| 91精品福利在线| 亚洲丝袜自拍清纯另类| 国产精品一二三四| 精品国产不卡一区二区三区| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲国产欧美一区二区三区丁香婷| 成人少妇影院yyyy| 国产人妖乱国产精品人妖| 精品一区二区免费看| 日韩欧美国产三级电影视频| 婷婷久久综合九色国产成人| 色噜噜狠狠色综合欧洲selulu| 国产精品丝袜在线| 国产xxx精品视频大全| 久久综合99re88久久爱| 老司机午夜精品99久久| 666欧美在线视频| 日本视频在线一区| 欧美另类videos死尸| 亚洲综合激情另类小说区| 一本一本久久a久久精品综合麻豆| 欧美激情资源网| 99麻豆久久久国产精品免费 | 视频一区国产视频| 欧美日韩三级一区二区| 亚洲成人高清在线| 欧美二区在线观看| 青娱乐精品视频| 日韩精品影音先锋| 国产米奇在线777精品观看| 2020日本不卡一区二区视频| 国内精品视频一区二区三区八戒| 久久夜色精品国产欧美乱极品| 狠狠色狠狠色综合系列| 久久精品一区四区| 99久久99精品久久久久久| 一区二区三区视频在线看| 欧美午夜在线一二页| 午夜精品视频在线观看| 91精品国产乱码久久蜜臀| 狠狠色综合色综合网络| 日本一区二区高清| 在线一区二区三区| 免费的国产精品| 亚洲国产精品成人综合色在线婷婷| 不卡一区二区三区四区| 亚洲欧美二区三区| 91麻豆精品国产自产在线| 狠狠色丁香久久婷婷综| 日本一区二区三区国色天香| 99久久精品情趣| 五月婷婷综合激情| 国产亚洲欧美一级| 色综合色综合色综合色综合色综合| 亚洲综合一区二区精品导航| 91精品国产综合久久久蜜臀粉嫩| 国产成人综合网| 有码一区二区三区| 精品国产凹凸成av人网站| 91在线视频播放地址| 石原莉奈在线亚洲三区| 日本一区二区三区国色天香| 在线免费观看日韩欧美| 久久99久国产精品黄毛片色诱| 亚洲欧洲99久久| 日韩欧美国产成人一区二区| 成人视屏免费看| 日本亚洲欧美天堂免费| 国产精品天美传媒| 777久久久精品| 不卡av电影在线播放| 三级久久三级久久久| 国产精品国产三级国产三级人妇 | 色欧美88888久久久久久影院| 蜜臀av性久久久久蜜臀aⅴ| 国产精品入口麻豆原神| 91麻豆精品国产91久久久 | 国产日产精品一区| 在线成人免费视频| 成人av在线播放网站| 日本最新不卡在线| 一区二区三区日韩精品视频| 精品裸体舞一区二区三区| 91久久精品一区二区三| 日韩av中文在线观看| 色爱区综合激月婷婷| 亚洲美女屁股眼交3| 成人午夜在线播放| 精品国产乱码久久久久久蜜臀| 中文字幕日韩精品一区| 亚洲国产精品自拍| 欧美日韩国产另类不卡| 亚洲国产一区二区三区青草影视| 狠狠久久亚洲欧美| 欧美精品自拍偷拍动漫精品| 欧美一区三区四区| 亚洲一区二区中文在线| 欧美日韩一区二区在线视频| 亚洲欧洲国产专区| 92国产精品观看| 亚洲国产精品嫩草影院| 欧美日韩国产首页在线观看| 日韩av电影免费观看高清完整版| 日韩欧美专区在线| 国产自产v一区二区三区c| 国产精品免费视频一区| eeuss鲁一区二区三区| ●精品国产综合乱码久久久久| 99精品国产视频| 午夜视频在线观看一区二区| 色狠狠色噜噜噜综合网| 五月天久久比比资源色| 欧美精品一区二区三区四区| 91丨porny丨国产入口| 国产精品一级片| 亚洲丝袜制服诱惑| 一区二区三区免费在线观看|