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

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

?? editableompoly.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
// **********************************************************************// // <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/omGraphics/EditableOMPoly.java,v $// $RCSfile: EditableOMPoly.java,v $// $Revision: 1.9.2.4 $// $Date: 2006/01/05 15:20:42 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.omGraphics;import java.awt.Component;import java.awt.Point;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.MouseEvent;import java.net.URL;import java.util.ArrayList;import java.util.Iterator;import javax.swing.ImageIcon;import javax.swing.JButton;import javax.swing.JComponent;import javax.swing.JMenu;import javax.swing.JToggleButton;import javax.swing.JToolBar;import com.bbn.openmap.LatLonPoint;import com.bbn.openmap.gui.GridBagToolBar;import com.bbn.openmap.layer.util.stateMachine.State;import com.bbn.openmap.omGraphics.editable.GraphicEditState;import com.bbn.openmap.omGraphics.editable.GraphicSelectedState;import com.bbn.openmap.omGraphics.editable.PolyAddNodeState;import com.bbn.openmap.omGraphics.editable.PolyDeleteNodeState;import com.bbn.openmap.omGraphics.editable.PolyStateMachine;import com.bbn.openmap.omGraphics.editable.PolyUndefinedState;import com.bbn.openmap.proj.Projection;import com.bbn.openmap.util.Debug;/** * The EditableOMPoly encompasses an OMPoly, providing methods for * modifying or creating it. */public class EditableOMPoly extends EditableOMAbstractLine {    protected ArrayList polyGrabPoints;    protected OffsetGrabPoint gpo; // offset    protected OffsetGrabPoint gpm; // for grabbing the poly and    // moving    // it.    protected OMPoly poly;    /**     * Whether the poly is a polygon, as opposed to a polyline. If the     * poly color is not clear (OMColor.clear) then it will be a     * polygon. If it is clear, then it can be set as a polygon - it's     * otherwise assumed to be a polyline.     */    protected boolean manualEnclosed = false;    // We'll have to handle this differently...    public static int OFFSET_POINT_INDEX = -1;    /**     * Create the EditableOMPoly, setting the state machine to create     * the poly off of the gestures.     */    public EditableOMPoly() {        createGraphic(null);    }    /**     * Create an EditableOMPoly with the polyType and renderType     * parameters in the GraphicAttributes object.     */    public EditableOMPoly(GraphicAttributes ga) {        createGraphic(ga);    }    /**     * Create the EditableOMPoly with an OMPoly already defined, ready     * for editing.     *      * @param omp OMPoly that should be edited.     */    public EditableOMPoly(OMPoly omp) {        setGraphic(omp);    }    /**     * Create and initialize the state machine that interprets the     *      * modifying gestures/commands, as well as ititialize the grab     * points. Also allocates the grab point array needed by the     * EditableOMPoly.     */    public void init() {        Debug.message("eomg", "EditableOMPoly.init()");        setStateMachine(new PolyStateMachine(this));        gPoints = new GrabPoint[1];    }    /**     * Set the graphic within the state machine. If the graphic is     * null, then one shall be created, and located off screen until     * the gestures driving the state machine place it on the map.     */    public void setGraphic(OMGraphic graphic) {        init();        if (graphic instanceof OMPoly) {            poly = (OMPoly) graphic;            poly.setDoShapes(true);            stateMachine.setSelected();            setGrabPoints(poly);        } else {            createGraphic(null);        }    }    /**     * Method checks if the polygon should be enclosed, and then adds     * an addition point to the end of the polygon, setting the end     * point on top of the beginning point. The two points are     * OffsetGrabPoints that are tied to each other's position.     */    public boolean evaluateEnclosed() {        deletePoint();        boolean enclosed = false;        if (isEnclosed()) {            enclose(true);            enclosed = true;        }        return enclosed;    }    /**     * Method connects the last point to the first point. Make sure     * they are both OffsetGrabPoints. Return true if the points cover     * the same pixel and if they were successfully joined.     */    protected boolean syncEnclosed() {        try {            OffsetGrabPoint gb0 = (OffsetGrabPoint) polyGrabPoints.get(0);            OffsetGrabPoint ogb = (OffsetGrabPoint) polyGrabPoints.get(polyGrabPoints.size() - 1);            // Check to see if they are over the same point.            if (gb0.getX() == ogb.getX() && gb0.getY() == ogb.getY()) {                // Cross connect them...                gb0.addGrabPoint(ogb);                ogb.addGrabPoint(gb0);                return true;            }        } catch (ClassCastException cce) {        } catch (IndexOutOfBoundsException ioobe) {        }        return false;    }    /**     * Method disconnects the last point from the first point. Make     * sure they are both OffsetGrabPoints.     */    protected boolean unsyncEnclosed() {        try {            OffsetGrabPoint gb0 = (OffsetGrabPoint) polyGrabPoints.get(0);            OffsetGrabPoint ogb = (OffsetGrabPoint) polyGrabPoints.get(polyGrabPoints.size() - 1);            // disconnect them...            if (gb0.getX() == ogb.getX() && gb0.getY() == ogb.getY()) {                gb0.removeGrabPoint(ogb);                ogb.removeGrabPoint(gb0);                return true;            }        } catch (ClassCastException cce) {        } catch (ArrayIndexOutOfBoundsException aioobe) {        }        return false;    }    public void enclose(boolean e) {        setEnclosed(e);        if (polyGrabPoints == null) {            return;        }        OffsetGrabPoint gb0 = (OffsetGrabPoint) polyGrabPoints.get(0);        OffsetGrabPoint ogb;        if (e) {            // If they should be enclosed...            if (!syncEnclosed()) {                // And they are not already, then add a point, joined                // to the beginning.                ogb = new OffsetGrabPoint(gb0.getX(), gb0.getY());                // Add the new point to end of the poly                addPoint(ogb);                syncEnclosed();                repaint();            } // Else nothing to do...        } else {            // They shouldn't be hooked up, so check to see if they            // are, and disconnect if necessary.            if (unsyncEnclosed()) {                deletePoint(); // Delete attached duplicate point                repaint();            } // else nothing to do.        }    }    /**     * Set the flag to make the polygon enclosed, which automatically     * connects the last point with the first point.     */    public void setEnclosed(boolean set) {        manualEnclosed = set;    }    /**     * Returns whether the graphic will be a polygon, instead of a     * polyline.     */    public boolean isEnclosed() {        return manualEnclosed;    }    /**     * Create and set the graphic within the state machine. The     * GraphicAttributes describe the type of poly to create.     */    public void createGraphic(GraphicAttributes ga) {        init();        stateMachine.setUndefined();        int renderType = OMGraphic.RENDERTYPE_LATLON;        int lineType = OMGraphic.LINETYPE_GREATCIRCLE;        if (ga != null) {            renderType = ga.getRenderType();            lineType = ga.getLineType();        }        if (Debug.debugging("eomg")) {            Debug.output("EditableOMPoly.createGraphic(): rendertype = "                    + renderType);        }        if (lineType == OMGraphic.LINETYPE_UNKNOWN) {            lineType = OMGraphic.LINETYPE_GREATCIRCLE;            ga.setLineType(OMGraphic.LINETYPE_GREATCIRCLE);        }        this.poly = (OMPoly) createGraphic(renderType, lineType);        if (ga != null) {            ga.setRenderType(poly.getRenderType());            ga.setTo(poly);        }    }    /**     * Extendable method to create specific subclasses of OMPolys.     */    public OMGraphic createGraphic(int renderType, int lineType) {        OMGraphic g = null;        switch (renderType) {        case (OMGraphic.RENDERTYPE_LATLON):            g = new OMPoly(new float[0], OMGraphic.RADIANS, lineType);            break;        case (OMGraphic.RENDERTYPE_OFFSET):            g = new OMPoly(90f, -180f, new int[0], OMPoly.COORDMODE_ORIGIN);            break;        default:            g = new OMPoly(new int[0]);        }        ((OMPoly) g).setDoShapes(true);        return g;    }    /**     * Get the OMGraphic being created/modified by the EditableOMPoly.     */    public OMGraphic getGraphic() {        return poly;    }    /**     * Attach to the Moving OffsetGrabPoint so if it moves, it will     * move this EditableOMGraphic with it. EditableOMGraphic version     * doesn't do anything, each subclass has to decide which of its     * OffsetGrabPoints should be attached to it.     */    public void attachToMovingGrabPoint(OffsetGrabPoint gp) {        gp.addGrabPoint(gpo);    }    /**     * Detach from a Moving OffsetGrabPoint. The EditableOMGraphic     * version doesn't do anything, each subclass should remove     * whatever GrabPoint it would have attached to an     * OffsetGrabPoint.     */    public void detachFromMovingGrabPoint(OffsetGrabPoint gp) {        gp.removeGrabPoint(gpo);    }    /**     * Set the GrabPoint that is in the middle of being modified, as a     * result of a mouseDragged event, or other selection process.     */    public void setMovingPoint(GrabPoint gp) {        super.setMovingPoint(gp);        gpm = null;    }    /**     * Given a MouseEvent, find a GrabPoint that it is touching, and     * set the moving point to that GrabPoint. Called when a     * MouseEvent happens, and you want to find out if a GrabPoint     * should be used to make modifications to the graphic or its     * position.     *      * @param e MouseEvent     * @return GrabPoint that is touched by the MouseEvent, null if     *         none are.     */    public GrabPoint getMovingPoint(MouseEvent e) {        GrabPoint gb = super.getMovingPoint(e);        // Since there may be an extra point enclosing the polygon, we        // want to make sure that the start of the polygon is

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲电影中文字幕在线观看| 日韩欧美第一区| 欧美男同性恋视频网站| 欧美成va人片在线观看| 国产精品免费aⅴ片在线观看| 中文字幕一区二| 天天色综合成人网| 国产精品伊人色| 在线免费精品视频| 久久日一线二线三线suv| 亚洲日本在线视频观看| 日本大胆欧美人术艺术动态| 国产精品69毛片高清亚洲| 91丨九色丨蝌蚪丨老版| 欧美一区午夜视频在线观看 | 亚洲成va人在线观看| 强制捆绑调教一区二区| av在线不卡观看免费观看| 欧美老肥妇做.爰bbww视频| 国产午夜精品久久| 天天av天天翘天天综合网色鬼国产 | 国产精品99久久久久| 欧美日韩中文字幕精品| 久久久久久亚洲综合| 一区二区不卡在线播放 | 欧美一区二区三区在线观看 | 99re66热这里只有精品3直播| 欧美男人的天堂一二区| 国产精品毛片久久久久久久| 日韩精品一级二级| 99国产欧美另类久久久精品 | 成人免费电影视频| 91精品国产欧美一区二区18 | 在线一区二区三区四区| 久久久一区二区三区| 五月天国产精品| 成人av在线电影| 精品欧美一区二区久久| 亚洲国产精品久久不卡毛片| 国产成人超碰人人澡人人澡| 欧美福利一区二区| 亚洲三级视频在线观看| 国产91精品一区二区麻豆亚洲| 欧美日韩国产另类不卡| 成人欧美一区二区三区在线播放| 美女脱光内衣内裤视频久久网站| 色94色欧美sute亚洲线路一ni| 精品国产凹凸成av人导航| 亚洲成人中文在线| 91在线小视频| 国产欧美日韩在线| 捆绑调教一区二区三区| 51精品国自产在线| 一区二区三区成人在线视频| 成a人片亚洲日本久久| 久久综合999| 麻豆精品视频在线观看免费 | 精品一区二区三区在线播放视频 | 激情小说亚洲一区| 欧美一区二区精品在线| 国产不卡一区视频| 日韩丝袜情趣美女图片| 亚洲成人av一区二区三区| 欧美在线你懂得| 亚洲男人都懂的| 99久久综合狠狠综合久久| 国产亚洲欧洲一区高清在线观看| 久久99精品久久久久久国产越南| 欧美一二区视频| 轻轻草成人在线| 日韩一区二区影院| 青青青伊人色综合久久| 日韩欧美黄色影院| 日本伊人午夜精品| 日韩欧美国产三级电影视频| 免费看黄色91| 日韩精品一区国产麻豆| 麻豆中文一区二区| 久久美女高清视频| 国产精品亚洲成人| 国产精品麻豆一区二区| 99久久国产免费看| 国产精品久久久久久久午夜片 | 欧美精品一区二区三区很污很色的 | 波多野结衣一区二区三区| 亚洲国产精品av| 成人美女视频在线看| 国产精品私人自拍| 色哟哟一区二区三区| 亚洲精品国产无天堂网2021| 欧美亚洲一区三区| 日韩av一区二区在线影视| 欧美一级二级三级蜜桃| 极品少妇xxxx精品少妇偷拍| 久久久久亚洲蜜桃| 99免费精品视频| 亚洲bt欧美bt精品| 日韩欧美一级二级| 日韩欧美在线不卡| 极品少妇xxxx精品少妇偷拍| 中文字幕av在线一区二区三区| av中文一区二区三区| 亚洲大尺度视频在线观看| 日韩欧美另类在线| 国产69精品久久99不卡| 亚洲少妇屁股交4| 91精品国产91久久综合桃花| 国产一区二区在线免费观看| 国产精品久久久久久久浪潮网站| 色婷婷综合久久久| 久久国产免费看| 中文字幕在线免费不卡| 欧美日韩日日骚| 国产综合一区二区| 亚洲综合成人网| 精品理论电影在线观看| www.日韩精品| 日本视频免费一区| 国产精品网站在线| 制服丝袜国产精品| 成人91在线观看| 日韩福利视频导航| 中文字幕一区二区三区不卡在线| 欧美在线观看18| 极品美女销魂一区二区三区免费| 亚洲柠檬福利资源导航| 日韩欧美二区三区| 在线观看视频欧美| 国产一区二区不卡在线| 亚洲激情欧美激情| 精品国产91久久久久久久妲己 | 亚洲人精品午夜| 欧美成人精品二区三区99精品| 成人精品在线视频观看| 日韩va欧美va亚洲va久久| 日韩理论片在线| 欧美xxxx老人做受| 在线视频国内自拍亚洲视频| 国产精品影音先锋| 日本强好片久久久久久aaa| 中文字幕字幕中文在线中不卡视频| 欧美日韩精品专区| 成人性生交大合| 日韩福利电影在线观看| 亚洲精品老司机| 国产欧美一区二区精品性| 91精品国产综合久久小美女| 99久久精品国产一区二区三区| 九九久久精品视频| 石原莉奈一区二区三区在线观看 | 99国产精品99久久久久久| 精品亚洲成av人在线观看| 亚洲小少妇裸体bbw| 国产精品初高中害羞小美女文| 精品国产一区二区三区av性色| 欧美调教femdomvk| 99久久精品免费看国产| 激情综合色丁香一区二区| 亚洲国产欧美一区二区三区丁香婷| 欧美激情一区不卡| 久久这里只有精品6| 欧美一区二区三区精品| 欧美熟乱第一页| 91一区二区三区在线观看| 国产电影一区二区三区| 毛片av一区二区| 日本人妖一区二区| 五月综合激情婷婷六月色窝| 一区二区三区四区激情| 亚洲欧美在线aaa| 国产精品久久久久久亚洲毛片| 久久久久久**毛片大全| 精品久久久久99| 日韩欧美亚洲国产另类| 91精品国产乱| 在线播放91灌醉迷j高跟美女 | 依依成人综合视频| 一区二区三区日韩在线观看| ...av二区三区久久精品| 国产精品私人自拍| 中文字幕免费在线观看视频一区| 国产欧美一区二区三区网站| 国产色综合久久| 国产三级欧美三级日产三级99| 精品欧美黑人一区二区三区| 精品国精品国产| 精品国产青草久久久久福利| 精品久久久久久久久久久久包黑料 | 国产精品理伦片| 国产精品美女一区二区在线观看| 欧美激情综合五月色丁香| 国产色婷婷亚洲99精品小说| 国产精品免费人成网站| 中文字幕精品一区| 国产精品美女久久久久久久| 亚洲欧美日韩一区二区| 亚洲综合无码一区二区| 日韩经典一区二区| 精品一区二区av| 成人美女视频在线看|