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

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

?? simplebeanbox.java

?? openmap java寫(xiě)的開(kāi)源數(shù)字地圖程序. 用applet實(shí)現(xiàn),可以像google map 那樣放大縮小地圖.
?? JAVA
字號(hào):
/* ********************************************************************** *  *    Use, duplication, or disclosure by the Government is subject to *           restricted rights as set forth in the DFARS. *   *                         BBNT Solutions LLC *                             A Part of  *                  Verizon       *                          10 Moulton Street *                         Cambridge, MA 02138 *                          (617) 873-3000 * *    Copyright (C) 2002 by BBNT Solutions, LLC *                 All Rights Reserved. * ********************************************************************** */package com.bbn.openmap.examples.beanbox;import java.awt.*;import java.awt.event.*;import java.beans.*;import java.util.*;import com.bbn.openmap.LatLonPoint;import com.bbn.openmap.omGraphics.OMGraphic;import com.bbn.openmap.omGraphics.OMRasterObject;import com.bbn.openmap.event.MapMouseListener;import com.bbn.openmap.event.SelectMouseMode;import com.bbn.openmap.tools.beanbox.BeanBox;import com.bbn.openmap.tools.beanbox.BeanContainer;/** * SimpleBeanBox is a sample implementation of the * {@link com.bbn.openmap.tools.beanbox.BeanBox}class. SimpleBeanBox * manages beans of type SimpleBeanObject. */public class SimpleBeanBox extends BeanBox implements MapMouseListener {    private SimpleBeanLayer layer;    private static SimpleBeanBox thisBeanBox = null;    public SimpleBeanBox(SimpleBeanLayer l) {        super();        layer = l;        thisBeanBox = this;    }    public static SimpleBeanBox getBeanBox() {        return thisBeanBox;    }    public String[] getMouseModeServiceList() {        return new String[] { SelectMouseMode.modeID };    }    public boolean mousePressed(MouseEvent evt) {        return true;    }    public boolean mouseReleased(MouseEvent evt) {        return true;    }    public boolean mouseClicked(MouseEvent evt) {        return true;    }    public void mouseEntered(MouseEvent evt) {}    public void mouseExited(MouseEvent evt) {}    public boolean mouseDragged(MouseEvent evt) {        return true;    }    public boolean mouseMoved(MouseEvent evt) {        return true;    }    public void mouseMoved() {}    /**     * adds the specified bean to SimpleBeanLayer. This method is     * called by the     * <code>com.bbn.openmap.tools.beanbox.BeanBoxDnDCatcher</code>     * class to add the specified bean to a openmap layer.     *      * @throws an IllegalArgumentException if bean is not of type     *         SimpleBeanObject     */    public void addBean(Object bean) {        //System.out.println("Enter> SimpleBeanBox.addBean");        if (!(bean instanceof SimpleBeanObject))            throw new IllegalArgumentException("not instanceof SimpleBeanObject");        layer.addObject((SimpleBeanObject) bean);        //System.out.println("Exit> SimpleBeanBox.addBean");    }    /**     * removes the specified bean from SimpleBeanLayer. This method is     * called by the     * <code>com.bbn.openmap.tools.beanbox.BeanBoxDnDCatcher</code>     * class to remove the specified bean from a openmap layer.     *      * @throws an IllegalArgumentException if bean is not of type     *         SimpleBeanObject     */    public void removeBean(Object bean) {        //System.out.println("Enter> SimpleBeanBox.removeBean");        if (!(bean instanceof SimpleBeanObject))            throw new IllegalArgumentException("not instanceof SimpleBeanObject");        layer.removeObject(((SimpleBeanObject) bean).getId());        //System.out.println("Exit> SimpleBeanBox.removeBean");    }    /**     * checks if the specified bean is present in SimpleBeanLayer.     * returns true if present, false otherwise.     *      * @throws an IllegalArgumentException if bean is not of type     *         SimpleBeanObject     */    public boolean containsBean(Object bean) {        //System.out.println("Called> SimpleBeanBox.containsBean");        if (!(bean instanceof SimpleBeanObject))            throw new IllegalArgumentException("not instanceof SimpleBeanObject "                    + bean);        return (layer.getObject(((SimpleBeanObject) bean).getId()) != null);    }    /**     * Sets the image associated with the bean using the image present     * in the BeanInfo. Also sets the bean's location. This method is     * called by the     * <code>com.bbn.openmap.tools.beanbox.BeanBoxDnDCatcher</code>     * class to set the bean's properties before it is displayed in a     * property sheet prior to adding to an openmap layer.     *      * @throws an IllegalArgumentException if bean is not of type     *         SimpleBeanObject     */    public void setBeanProperties(Object bean, BeanInfo beanInfo, Point location) {        //System.out.println("Enter>        // SimpleBeanBox.setBeanProperties");        if (!(bean instanceof SimpleBeanObject))            throw new IllegalArgumentException("not instanceof SimpleBeanObject "                    + bean);        SimpleBeanObject obj = (SimpleBeanObject) bean;        Image img = beanInfo.getIcon(BeanInfo.ICON_COLOR_32x32);        obj.setGraphicImage(img);        LatLonPoint llp = layer.getProjection().inverse(location.x, location.y);        obj.setLatitude(llp.getLatitude());        obj.setLongitude(llp.getLongitude());        //System.out.println("Exit>        // SimpleBeanBox.setBeanProperties");    }    /**     * gets a Vector of beans that implement the     * <code>com.bbn.openmap.tools.beanbox.BeanContainer</code>     * interface.     *      * @return a possibly empty vector of container beans.     */    Vector getAllContainers() {        Vector containers = new Vector();        Vector list = layer.getObjects();        if ((list == null) || (list.size() == 0))            return containers;        for (int i = 0; i < list.size(); i++) {            Object obj = list.get(i);            if (obj instanceof BeanContainer)                containers.add(obj);        }        return containers;    }    /**     * returns a <code>BeanContainer</code> bean that contains the     * specified bean object.     *      * @throws an IllegalArgumentException if bean is not of type     *         SimpleBeanObject     */    public BeanContainer findEnclosingContainer(Object bean) {        //System.out.println("Called>        // SimpleBeanBox.findEnclosingContainer");        if (!(bean instanceof SimpleBeanObject))            throw new IllegalArgumentException("not instanceof SimpleBeanObject "                    + bean);        SimpleBeanObject obj = (SimpleBeanObject) bean;        float objLat = obj.getLatitude();        float objLon = obj.getLongitude();        LatLonPoint llp = new LatLonPoint(objLat, objLon);        return findEnclosingContainer(llp);    }    /**     * returns a SimpleBeanContainer bean that contains the specified     * <code>LatLonPoint</code> on the map.     */    public SimpleBeanContainer findEnclosingContainer(LatLonPoint llp) {        Vector containers = getAllContainers();        for (int i = 0; i < containers.size(); i++) {            SimpleBeanContainer container = (SimpleBeanContainer) containers.get(i);            if (encloses(container, llp))                return container;        }        return null;    }    /**     * helper method returns true if the specified     * <code>LatLonPoint</code> is contained within the specified     * <code>SimpleBeanContainer</code>.     */    boolean encloses(SimpleBeanContainer container, LatLonPoint llp) {        float topLat = container.getTopLatitude();        float leftLon = container.getLeftLongitude();        float botLat = container.getBottomLatitude();        float rightLon = container.getRightLongitude();        float lat = llp.getLatitude();        float lon = llp.getLongitude();        if ((lon > rightLon) || (lon < leftLon))            return false;        if ((lat > topLat) || (lat < botLat))            return false;        return true;    }    /**     * finds a bean of type     * <code>com.bbn.openmap.tools.beanbox.BeanContainer</code> that     * encloses the specified (x,y) point. In case more than one     * container encloses the specified point the first one found is     * returned. Returns null if none is found.     */    BeanContainer findContainerBean(Point pointOnMap) {        if (layer != null && layer.getProjection() != null) {            LatLonPoint llp = layer.getProjection().inverse(pointOnMap.x,                    pointOnMap.y);            return findEnclosingContainer(llp);        } else {            return null;        }    }    /**     * returns a bean that does NOT implement     * <code>com.bbn.openmap.tools.beanbox.BeanContainer</code> and     * which lies closest to and within 10 pixels of the specified     * (x,y) point. Returns null if no such object is found.     */    SimpleBeanObject findNonContainerBean(Point pointOnMap) {        Vector list = layer.getObjects();        double minSep = Double.MAX_VALUE;        SimpleBeanObject closest = null;        for (int i = 0; i < list.size(); i++) {            Object o = list.get(i);            SimpleBeanObject obj = (SimpleBeanObject) o;            if (obj instanceof SimpleBeanContainer)                continue;            Point p2 = layer.getProjection()                    .forward(new LatLonPoint(obj.getLatitude(), obj.getLongitude()));            double sep = almostEquals(pointOnMap, p2, 20);            if (sep < minSep) {                minSep = sep;                closest = obj;            }        }        return closest;    }    /**     * return bean at specified location giving preference to     * non-container beans over container beans. If neither type of     * bean is found to be close enough to the specified location, a     * null is returned.     */    public Object getBeanAtLocation(Point pointOnMap) {        //System.out.println("Called>        // SimpleBeanBox.getBeanAtLocation");        SimpleBeanObject obj = findNonContainerBean(pointOnMap);        if (obj != null)            return obj;        BeanContainer container = findContainerBean(pointOnMap);        if (container != null)            return container;        return null;    }    /**     * returns the straight line seperation in pixels between the     * specified points if separation is equal to or less than the     * specified tolerance amount, else returns Double.MAX_VALUE     */    double almostEquals(Point p1, Point p2, double tol) {        int sepX = p1.x - p2.x;        int sepY = p1.y - p2.y;        double sep = Math.sqrt(sepX * sepX + sepY * sepY);        if (sep <= tol)            return sep;        else            return Double.MAX_VALUE;    }    /**     * relocates the specified bean to the new location. This method     * is called by the     * <code>com.bbn.openmap.tools.beanbox.BeanBoxDnDCatcher</code>     * whenever the user moves a bean on the map within the same     * openmap layer.     *      * @throws IllegalArgumentException is specified bean is not of     *         type SimpleBeanObject.     */    public void relocateBean(Object bean, BeanInfo beanInfo, Point newLocation) {        //System.out.println("Enter> SimpleBeanBox.relocateBean");        if (!(bean instanceof SimpleBeanObject))            throw new IllegalArgumentException("not instanceof SimpleBeanObject "                    + bean);        SimpleBeanObject obj = (SimpleBeanObject) bean;        LatLonPoint llp = layer.getProjection().inverse(newLocation.x,                newLocation.y);        relocateSimpleBeanObject(obj, llp);        layer.updateGraphics();        //System.out.println("Exit> SimpleBeanBox.relocateBean");    }    /** relocates the specified SimpleBeanObject to the new location. */    void relocateSimpleBeanObject(SimpleBeanObject obj, LatLonPoint newllp) {        SimpleBeanContainer oldContainer = null;        // no support yet for containers within containers because        // of unresolved issues regarding partially over-lapping        // containers.        if (!(obj instanceof SimpleBeanContainer))            oldContainer = (SimpleBeanContainer) findEnclosingContainer(obj);        if (oldContainer != null)            oldContainer.remove(obj);        obj.setLatitude(newllp.getLatitude());        obj.setLongitude(newllp.getLongitude());        if (obj instanceof SimpleBeanContainer)            ((SimpleBeanContainer) obj).validate();        SimpleBeanContainer newContainer = null;        if (!(obj instanceof SimpleBeanContainer))            newContainer = (SimpleBeanContainer) findEnclosingContainer(obj);        if (newContainer != null)            newContainer.add(obj);    }    /**     * this method is a callback method that is called by a     * <code>com.bbn.openmap.tools.beanbox.GenericPropertySheet</code>     * when the user closes the property sheet.     */    public void beanChanged(Object bean, String changedPropertyName) {        //System.out.println("Enter> SimpleBeanBox.beanChanged");        if (!(bean instanceof SimpleBeanObject))            throw new IllegalArgumentException("not instanceof SimpleBeanObject "                    + bean);        SimpleBeanObject obj = (SimpleBeanObject) bean;        layer.updateObject(obj);        //System.out.println("Exit> SimpleBeanBox.beanChanged");    }    /**     * returns the image that the cursor is set to when the specified     * bean is dragged on the map.     */    protected Image getDragImage(Object bean) {        //System.out.println("Called> SimpleBeanBox.getDragImage");        if (!(bean instanceof SimpleBeanObject))            throw new IllegalArgumentException("not instanceof SimpleBeanObject "                    + bean);        SimpleBeanObject obj = (SimpleBeanObject) bean;        OMGraphic graphic = layer.getGraphic(obj.getId());        if (graphic instanceof OMRasterObject) {            return ((OMRasterObject) graphic).getImage();        } else            return super.getDragImage(bean);    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线观看污| 国产精品色哟哟| 国产亚洲精品资源在线26u| 亚洲同性gay激情无套| 偷拍与自拍一区| 国产成人av电影在线播放| 欧美麻豆精品久久久久久| 中文字幕不卡一区| 国产在线精品一区二区三区不卡| 91丨porny丨中文| 久久亚区不卡日本| 日韩av中文字幕一区二区三区| av一二三不卡影片| 久久久久久久电影| 奇米影视一区二区三区| 欧美日韩精品一二三区| 亚洲免费av高清| 99久久免费国产| 欧美高清在线精品一区| 国产精品99久久久久久似苏梦涵 | 国产福利91精品一区二区三区| 91精品久久久久久久99蜜桃| 亚洲色图视频免费播放| 国产a久久麻豆| 国产偷v国产偷v亚洲高清| 精品在线你懂的| 欧美电影精品一区二区| 日本欧美一区二区三区| 91精品国产免费| 日本免费在线视频不卡一不卡二| 欧美在线你懂的| 夜夜精品视频一区二区| 91传媒视频在线播放| 一区二区三区日韩欧美| 欧美在线观看一二区| 亚洲三级在线免费观看| 色久优优欧美色久优优| 亚洲综合色区另类av| 欧美日韩免费电影| 国产成人免费在线观看| 国产亚洲欧洲997久久综合 | 久久精品夜色噜噜亚洲aⅴ| 国产在线精品免费| 久久婷婷国产综合国色天香| 国产精品88888| 中文字幕一区二区三区精华液 | 欧美高清视频在线高清观看mv色露露十八 | 视频一区二区三区在线| 欧美一区二区三级| 国产传媒一区在线| 亚洲视频1区2区| 欧美精品丝袜中出| 国产专区综合网| 亚洲日本一区二区| 欧美日韩国产片| 美国毛片一区二区| 国产精品久久久久aaaa| 色综合一个色综合亚洲| 日韩国产在线一| 欧美激情在线一区二区三区| 亚洲精品一区二区在线观看| 国产经典欧美精品| 一区二区三区国产豹纹内裤在线| 欧美精品在线观看播放| 国产综合久久久久久鬼色| 椎名由奈av一区二区三区| 欧美日韩国产综合视频在线观看| 久久99久久精品| 成人欧美一区二区三区| 日韩一区二区在线看片| 成人综合在线视频| 丝袜诱惑亚洲看片| 久久久亚洲午夜电影| 欧美色视频在线| 国产盗摄精品一区二区三区在线| 亚洲精品视频在线观看免费| 久久久不卡网国产精品二区| 欧美性猛片xxxx免费看久爱| 极品瑜伽女神91| 亚洲成人av中文| 久久九九99视频| 日韩一级免费观看| 一本大道久久a久久综合| 国产一区二区久久| 美女任你摸久久| 亚洲永久精品大片| 亚洲品质自拍视频| 国产日韩精品一区二区三区| 日韩三级视频在线观看| 在线区一区二视频| eeuss鲁一区二区三区| 国内精品视频一区二区三区八戒| 日日夜夜精品视频免费| 亚洲欧美二区三区| 国产精品全国免费观看高清| 日韩女优电影在线观看| 欧美日韩一本到| 成人福利在线看| 国产伦精品一区二区三区免费迷| 亚洲大尺度视频在线观看| 亚洲人成电影网站色mp4| 国产嫩草影院久久久久| 精品国产凹凸成av人网站| 欧美色图免费看| 色综合 综合色| 99久久精品费精品国产一区二区| 国产·精品毛片| 国产91高潮流白浆在线麻豆| 国产伦精品一区二区三区免费 | 日韩欧美国产一二三区| 69久久99精品久久久久婷婷| 26uuu另类欧美| 欧美成人精品福利| 91精品欧美久久久久久动漫| 欧美精三区欧美精三区| 欧美美女一区二区三区| 欧美日韩视频在线第一区| 欧美吞精做爰啪啪高潮| 欧美亚洲综合一区| 欧美日韩日日夜夜| 欧美日韩国产片| 91精品国产丝袜白色高跟鞋| 在线不卡一区二区| 制服丝袜亚洲色图| 日韩精品在线一区| 久久精品亚洲乱码伦伦中文| 国产人成一区二区三区影院| 欧美国产丝袜视频| 亚洲精品日产精品乱码不卡| 亚洲电影在线播放| 日产国产欧美视频一区精品| 蜜臀av国产精品久久久久| 国模无码大尺度一区二区三区 | 日本亚洲一区二区| 久久成人麻豆午夜电影| 国产乱国产乱300精品| 丁香亚洲综合激情啪啪综合| 97se狠狠狠综合亚洲狠狠| 91麻豆精品视频| 欧洲人成人精品| 欧美mv日韩mv国产网站| 国产欧美精品日韩区二区麻豆天美| 国产精品超碰97尤物18| 亚洲国产美女搞黄色| 免费亚洲电影在线| 春色校园综合激情亚洲| 欧美体内she精视频| 精品剧情在线观看| 亚洲欧美成人一区二区三区| 免费成人av在线| 福利电影一区二区| 欧美日韩美少妇| 国产视频亚洲色图| 亚洲福利电影网| 成人免费电影视频| 这里只有精品99re| 国产欧美视频一区二区三区| 伊人性伊人情综合网| 99精品国产热久久91蜜凸| 欧美二区乱c少妇| 国产亚洲一区二区三区四区| 亚洲第一激情av| 东方aⅴ免费观看久久av| 欧美精品乱码久久久久久按摩 | 69av一区二区三区| 中文字幕乱码久久午夜不卡 | 亚洲综合免费观看高清在线观看| 蜜桃久久久久久久| 色综合网站在线| 国产日韩精品一区二区三区| 三级久久三级久久久| 成人黄页在线观看| 久久这里只有精品6| 午夜精品久久久久| 99视频精品全部免费在线| 精品国产凹凸成av人网站| 亚洲大尺度视频在线观看| 丁香一区二区三区| 久久日韩精品一区二区五区| 亚洲图片欧美色图| 91原创在线视频| 久久精品欧美一区二区三区不卡| 偷窥国产亚洲免费视频| 91麻豆蜜桃一区二区三区| 日本一区二区久久| 国产一区欧美日韩| 日韩欧美一区二区视频| 日韩高清欧美激情| 欧美日韩精品免费观看视频| 亚洲精品国产一区二区三区四区在线| 国产福利视频一区二区三区| 久久午夜老司机| 日韩不卡一二三区| 宅男噜噜噜66一区二区66| 亚洲一区二区三区精品在线| 一本色道久久综合亚洲aⅴ蜜桃| 国产精品久久久久精k8| 成人在线一区二区三区| 国产欧美日韩三级| 处破女av一区二区|