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

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

?? mapbean.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
// **********************************************************************// // <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/MapBean.java,v $// $RCSfile: MapBean.java,v $// $Revision: 1.11.2.12 $// $Date: 2006/02/02 03:17:49 $// $Author: bmackiew $// // **********************************************************************package com.bbn.openmap;import java.awt.Color;import java.awt.Component;import java.awt.Cursor;import java.awt.Dimension;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.Insets;import java.awt.LayoutManager;import java.awt.Paint;import java.awt.Rectangle;import java.awt.event.ComponentEvent;import java.awt.event.ComponentListener;import java.awt.event.ContainerEvent;import java.awt.event.ContainerListener;import java.awt.event.MouseEvent;import java.beans.PropertyChangeEvent;import java.beans.PropertyChangeListener;import java.util.Vector;import javax.swing.JComponent;import javax.swing.OverlayLayout;import com.bbn.openmap.event.CenterEvent;import com.bbn.openmap.event.CenterListener;import com.bbn.openmap.event.LayerEvent;import com.bbn.openmap.event.LayerListener;import com.bbn.openmap.event.PaintListener;import com.bbn.openmap.event.PaintListenerSupport;import com.bbn.openmap.event.PanEvent;import com.bbn.openmap.event.PanListener;import com.bbn.openmap.event.ProjectionEvent;import com.bbn.openmap.event.ProjectionListener;import com.bbn.openmap.event.ProjectionSupport;import com.bbn.openmap.event.ZoomEvent;import com.bbn.openmap.event.ZoomListener;import com.bbn.openmap.proj.Mercator;import com.bbn.openmap.proj.Proj;import com.bbn.openmap.proj.Projection;import com.bbn.openmap.proj.ProjectionFactory;import com.bbn.openmap.util.Debug;import com.bbn.openmap.LatLonPoint;/** * The MapBean is the main component of the OpenMap Development Kit. * It is a Java Bean that manages and displays a map. A map is * comprised of a projection and a list of layers, and this class has * methods that allow you to control the projection parameters and to * add and remove layers. Layers that are part of the map receive * dynamic notifications of changes to the underlying view and * projection. * <p> * Most of the methods in the MapBean are called from the Java AWT and * Swing code. These methods make the MapBean a good "Swing citizen" * to its parent components, and you should not need to invoke them. * In general there are only two reasons to call MapBean methods: * controlling the projection, and adding or removing layers. * <p> * When controlling the MapBean projection, simply call the method * that applies - setCenter, pan, zoom, etc. NOTE: If you are setting * more than one parameter of the projection, it's more efficient to * getProjection(), directly set the parameters of the projection * object, and then call setProjection() with the modified projection. * That way, each ProjectionListener of the MapBean (each layer) will * only receive one projectionChanged() method call, as opposed to * receiving one for each projection adjustment. * <p> * To add or remove layers, use the add() and remove() methods that * the MapBean inherits from java.awt.Container. The add() method can * be called with an integer that indicates its desired position in * the layer list. * <P> * Changing the default clipping area may cause some Layers to not be * drawn completely, depending on what the clipping area is set to and * when the layer is trying to get itself painted. When manually * adjusting clipping area, make sure that when restricted clipping is * over that a full repaint occurs if there is a chance that another * layer may be trying to paint itself. *  * @see Layer */public class MapBean extends JComponent implements ComponentListener,        ContainerListener, ProjectionListener, PanListener, ZoomListener,        LayerListener, CenterListener, SoloMapComponent {    public static final String LayersProperty = "MapBean.layers";    public static final String CursorProperty = "MapBean.cursor";    public static final String BackgroundProperty = "MapBean.background";    public static final String ProjectionProperty = "MapBean.projection";    /**     * OpenMap title.     */    public static final String title = "OpenMap(tm)";    /**     * OpenMap version.     */    public static final String version = "4.6.3";    /**     * Suppress the copyright message on initialization. But remember,     * the OpenMap License says you can't do this!     */    public static boolean suppressCopyright = false;    private static final boolean DEBUG_TIMESTAMP = false;    private static final boolean DEBUG_THREAD = true;    private static final String copyrightNotice = "OpenMap(tm) Version "            + version + "\r\n"            + "  Copyright (C) BBNT Solutions LLC.  All rights reserved.\r\n"            + "  See http://openmap.bbn.com/ for details.\r\n";    public final static float DEFAULT_CENTER_LAT = 0.0f;    public final static float DEFAULT_CENTER_LON = 0.0f;    //zoomed all the way out    public final static float DEFAULT_SCALE = Float.MAX_VALUE;    public final static int DEFAULT_WIDTH = 640;    public final static int DEFAULT_HEIGHT = 480;    protected int minHeight = 100;    protected int minWidth = 100;    protected Proj projection = new Mercator(new LatLonPoint(DEFAULT_CENTER_LAT, DEFAULT_CENTER_LON), DEFAULT_SCALE, DEFAULT_WIDTH, DEFAULT_HEIGHT);    protected ProjectionSupport projectionSupport;    /**     * Layers that are removed from the MapBean are held until the     * next projection change. When the projection changes, they are     * notified that they have been removed from the map. This list is     * kept so that toggling a layer on and off won't cause them to     * get rid of their resources, in case the user is just creating     * different views of the map.     */    protected Vector removedLayers = new Vector(0);    /**     * Some users may want the layers deleted immediately when they     * are removed from the map. This flag controls that. The default     * behavior is to hold a reference to a layer and actually release     * it when the projection changes (default = true). Set to false     * if you want the MapBean to tell a Layer it has been removed     * immediately when it happens.     */    protected boolean layerRemovalDelayed = true;    /**     * This vector is to let the layers know when they have been added     * to the map.     */    protected Vector addedLayers = new Vector(0);    /**     * The PaintListeners want to know when the map has been     * repainted.     */    protected PaintListenerSupport painters = null;    /**     * The background color for this particular MapBean. If null, the     * setting for the projection, which in turn is set in the     * Environment class, will be used.     */    protected Paint background = null;    /**     * The MapBeanRepaintPolicy to use to handler/filter/pace layer     * repaint() requests. If not set, a StandardMapBeanRepaintPolicy     * will be used, which forwards repaint requests to Swing     * normally.     */    protected MapBeanRepaintPolicy repaintPolicy = null;    public final static Color DEFAULT_BACKGROUND_COLOR = new Color(191, 239, 255);    /**     * Return the OpenMap Copyright message.     *      * @return String Copyright     */    public static String getCopyrightMessage() {        return copyrightNotice;    }    /**     * Construct a MapBean.     */    public MapBean() {        if (Debug.debugging("mapbean")) {            debugmsg("MapBean()");        }        if (!suppressCopyright) {            Debug.output(copyrightNotice);        }        background = DEFAULT_BACKGROUND_COLOR;        // Don't need one for every MapBean, just the first one.        suppressCopyright = true;        super.setLayout(new OverlayLayout(this));        projectionSupport = new ProjectionSupport(this);        addComponentListener(this);        addContainerListener(this);        //----------------------------------------        // In a builder tool it seems that the OverlayLayout        // makes the MapBean fail to resize. And since it has        // no children by default, it has no size. So I add        // a null Layer here to give it a default size.        //----------------------------------------        if (java.beans.Beans.isDesignTime()) {            add(new Layer() {                public void projectionChanged(ProjectionEvent e) {}                public Dimension getPreferredSize() {                    return new Dimension(100, 100);                }            });        }        setPreferredSize(new Dimension(projection.getWidth(), projection.getHeight()));    }    /**     * Return a stringified representation of the MapBean.     *      * @return String     */    public String toString() {        return getClass().getName() + "@" + Integer.toHexString(hashCode());    }    /*----------------------------------------------------------------------     * Window System overrides     *----------------------------------------------------------------------*/    /**     * Adds additional constraints on possible children components.     * The new component must be a Layer. This method included as a     * good container citizen, and should not be called directly. Use     * the add() methods inherited from java.awt.Container instead.     *      * @param comp Component     * @param constraints Object     * @param index int location     */    protected final void addImpl(Component comp, Object constraints, int index) {        if (comp instanceof Layer) {            super.addImpl(comp, constraints, index);        } else {            throw new IllegalArgumentException("only Layers can be added to a MapBean");        }    }    /**     * Prevents changing the LayoutManager. Don't let anyone change     * the LayoutManager! This is called by the parent component and     * should not be called directly.     */    public final void setLayout(LayoutManager mgr) {        throw new IllegalArgumentException("cannot change layout of Map");    }    /**     * Return the minimum size of the MapBean window. Included here to     * be a good citizen.     */    public Dimension getMinimumSize() {        return new Dimension(minWidth, minHeight);    }    /**     * Set the minimum size of the MapBean window. Included here to be     * a good citizen.     */    public void setMinimumSize(Dimension dim) {        minWidth = (int) dim.getWidth();        minHeight = (int) dim.getHeight();    }    /**     * Get the Insets of the MapBean. This returns 0-length Insets.     * <p>     * This makes sure that there will be no +x,+y offset when drawing     * graphics. This is ok since any borders around the MapBean will     * get drawn afterwards on top.     *      * @return Insets 0-length Insets     */    public final Insets getInsets() {        return insets;    }    private final transient static Insets insets = new Insets(0, 0, 0, 0);    /*----------------------------------------------------------------------     * ComponentListener implementation     *----------------------------------------------------------------------*/    /**     * ComponentListener interface method. Should not be called     * directly. Invoked when component has been resized, and kicks     * off a projection change.     *      * @param e ComponentEvent     */    public void componentResized(ComponentEvent e) {        if (Debug.debugging("mapbean")) {            debugmsg("Size changed: " + getWidth() + " x " + getHeight());        }        projection.setWidth(getWidth());        projection.setHeight(getHeight());        fireProjectionChanged();    }    /**     * ComponentListener interface method. Should not be called     * directly. Invoked when component has been moved.     *      * @param e ComponentEvent     */    public void componentMoved(ComponentEvent e) {}    /**     * ComponentListener interface method. Should not be called     * directly. Invoked when component has been shown.     *      * @param e ComponentEvent     */    public void componentShown(ComponentEvent e) {}    /**     * ComponentListener interface method. Should not be called     * directly. Invoked when component has been hidden.     *      * @param e ComponentEvent     */    public void componentHidden(ComponentEvent e) {}    /*----------------------------------------------------------------------     *      *----------------------------------------------------------------------*/    /**     * Add a ProjectionListener to the MapBean. You do not need to     * call this method to add layers as ProjectionListeners. This     * method is called for the layer when it is added to the MapBean.     * Use this method for other objects that you want to know about     * the MapBean's projection.     *      * @param l ProjectionListener     */    public synchronized void addProjectionListener(ProjectionListener l) {        projectionSupport.addProjectionListener(l);        // Assume that it wants the current projection        l.projectionChanged(new ProjectionEvent(this, getProjection()));    }    /**     * Remove a ProjectionListener from the MapBean. You do not need     * to call this method to remove layers that are     * ProjectionListeners. This method is called for the layer when     * it is removed from the MapBean. Use this method for other     * objects that you want to remove from receiving projection

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品一区视频| 一区二区三区影院| 欧美精品久久久久久久久老牛影院| 精品综合久久久久久8888| 中文字幕日本不卡| 26uuu久久综合| 欧美喷水一区二区| 色综合中文字幕国产 | aaa亚洲精品| 男女视频一区二区| 日本视频免费一区| 亚洲一区二区三区美女| 亚洲欧美在线aaa| 亚洲激情第一区| 国产精品理论在线观看| 欧美一级高清片| 精品日韩在线观看| 日韩亚洲欧美高清| 久久久久久一二三区| 欧美成人伊人久久综合网| 欧美日韩激情一区二区| 日韩午夜在线播放| 日韩欧美一级二级三级久久久| 欧美一级日韩一级| 日韩一级高清毛片| 欧美一区二区三区免费在线看| 久久久久久9999| 国产色综合一区| 亚洲国产精品精华液ab| 一区二区成人在线| 亚洲美女屁股眼交3| 日日摸夜夜添夜夜添亚洲女人| 日本va欧美va瓶| 激情综合网av| 日本丶国产丶欧美色综合| 欧美午夜在线一二页| 日韩欧美国产一区二区三区| 久久久久久久综合狠狠综合| 国产亚洲精品aa午夜观看| 亚洲自拍偷拍欧美| 激情伊人五月天久久综合| 视频一区国产视频| 亚洲欧美日韩人成在线播放| 亚洲精品国产成人久久av盗摄 | 精品国产免费视频| 国产精品丝袜在线| 亚洲国产视频网站| 国产999精品久久久久久| 日本韩国一区二区| 9191精品国产综合久久久久久| 国产日韩高清在线| 一区二区免费视频| 亚洲精品免费在线| 国产在线精品视频| 色综合欧美在线视频区| 久久天天做天天爱综合色| 自拍偷拍亚洲综合| 日韩电影在线观看一区| av电影在线观看一区| 欧美精品亚洲一区二区在线播放| 国产香蕉久久精品综合网| 亚洲欧美一区二区久久| 蜜臀久久99精品久久久久久9| 91网上在线视频| 精品久久久久一区二区国产| 日本不卡一区二区三区高清视频| 成人网在线免费视频| 欧美日韩成人在线一区| 一区二区三区高清在线| 国产综合色视频| 欧美岛国在线观看| 亚洲欧美色一区| 国产精品影视网| 一本在线高清不卡dvd| 久久婷婷色综合| 三级久久三级久久| 91福利在线免费观看| 欧美大胆一级视频| 亚洲成av人片一区二区梦乃| www.亚洲免费av| 精品国产伦一区二区三区免费| 亚洲一区二区三区视频在线播放| 粉嫩嫩av羞羞动漫久久久| 26uuu成人网一区二区三区| 午夜视频在线观看一区| 欧美美女黄视频| 亚洲国产精品麻豆| 欧美日韩国产大片| 国产精品系列在线| 欧美一区二区三区系列电影| 久久久亚洲精品石原莉奈| 日韩在线卡一卡二| 国产风韵犹存在线视精品| 日韩视频在线你懂得| 亚洲成人av资源| 欧美色图天堂网| 一个色在线综合| 欧美日韩一级视频| 五月婷婷综合网| 青青草原综合久久大伊人精品优势| 日韩一级免费观看| 久久 天天综合| 一区精品在线播放| 99视频精品全部免费在线| 国产欧美视频一区二区| 懂色中文一区二区在线播放| 国产午夜精品一区二区| 色综合中文字幕| 亚洲国产精品麻豆| 欧美一区二区三区免费视频| 日韩av在线发布| 欧美videos大乳护士334| 国产精品亚洲成人| 中文字幕第一区第二区| 不卡一区二区中文字幕| 午夜精品久久一牛影视| 日韩免费高清av| 亚洲午夜羞羞片| 久久午夜国产精品| 成人精品一区二区三区中文字幕| 亚洲成人福利片| 精品区一区二区| 欧美三级蜜桃2在线观看| 日本少妇一区二区| 精品电影一区二区三区 | 久久成人av少妇免费| 欧美精品一区在线观看| 欧美在线观看一二区| 三级在线观看一区二区 | caoporn国产一区二区| 亚洲在线免费播放| 日本一二三四高清不卡| 欧美日韩三级视频| av成人老司机| 日本sm残虐另类| 亚洲成a人v欧美综合天堂下载| 欧美一卡2卡三卡4卡5免费| 久久国产精品第一页| 亚洲自拍偷拍图区| 中文字幕乱码日本亚洲一区二区| 欧美一区二区三区影视| 99v久久综合狠狠综合久久| 天堂午夜影视日韩欧美一区二区| 国产日韩欧美精品在线| 日本国产一区二区| 91国偷自产一区二区三区成为亚洲经典 | 久久精品视频网| 91精品国产乱| 色综合久久久久综合体| 天天做天天摸天天爽国产一区| 国产精品色婷婷| 2020日本不卡一区二区视频| 日韩欧美电影一区| 欧美在线啊v一区| 久88久久88久久久| 性欧美大战久久久久久久久| 国产精品国产三级国产普通话99| 日韩欧美一区在线观看| 成人性生交大合| 天天综合日日夜夜精品| 欧美高清在线精品一区| 欧美国产一区在线| 欧美不卡激情三级在线观看| 欧美tickling挠脚心丨vk| 56国语精品自产拍在线观看| 欧美日韩国产高清一区二区三区| 日本高清无吗v一区| 99精品国产91久久久久久 | 国产一区二区三区日韩| 轻轻草成人在线| 国产成人综合精品三级| 国产河南妇女毛片精品久久久 | 美女任你摸久久| 国产一区欧美二区| 国内成人免费视频| 国产精品一二三四| 国产成人精品一区二| 日韩av中文字幕一区二区| 国产二区国产一区在线观看| 久久成人免费网站| 成人深夜福利app| 99久久99久久精品免费看蜜桃| 91美女在线视频| 在线观看免费成人| 成人av在线网站| 欧美日韩另类一区| 538在线一区二区精品国产| 久久先锋资源网| 中文字幕一区二区三区四区不卡| 亚洲国产欧美日韩另类综合| 午夜久久久影院| 亚洲综合激情网| 亚洲一区二区在线免费看| 日韩国产欧美在线播放| 午夜精品免费在线| eeuss鲁一区二区三区| 欧美亚洲日本国产| 国产视频一区二区在线观看| 国产精品传媒在线| 日韩1区2区3区|