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

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

?? editableomline.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像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/omGraphics/EditableOMLine.java,v $// $RCSfile: EditableOMLine.java,v $// $Revision: 1.5.2.3 $// $Date: 2005/08/10 22:45:13 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.omGraphics;import java.awt.event.MouseEvent;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.LineStateMachine;import com.bbn.openmap.proj.Projection;import com.bbn.openmap.util.Debug;/** * The EditableOMLine encompasses an OMLine, providing methods for * modifying or creating it. */public class EditableOMLine extends EditableOMAbstractLine {    protected GrabPoint gp1;    protected GrabPoint gp2;    protected OffsetGrabPoint gpo; // offset    protected OffsetGrabPoint gpm; // for grabing the line and moving    // it.    protected OMLine line;    public final static int STARTING_POINT_INDEX = 0;    public final static int ENDING_POINT_INDEX = 1;    public final static int OFFSET_POINT_INDEX = 2;    /**     * Create the EditableOMLine, setting the state machine to create     * the line off of the gestures.     */    public EditableOMLine() {        createGraphic(null);    }    /**     * Create an EditableOMLine with the lineType and renderType     * parameters in the GraphicAttributes object.     */    public EditableOMLine(GraphicAttributes ga) {        createGraphic(ga);    }    /**     * Create the EditableOMLine with an OMLine already defined, ready     * for editing.     *      * @param oml OMLine that should be edited.     */    public EditableOMLine(OMLine oml) {        setGraphic(oml);    }    /**     * 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     * EditableOMLine.     */    public void init() {        Debug.message("eomg", "EditableOMLine.init()");        setStateMachine(new LineStateMachine(this));        gPoints = new GrabPoint[3];    }    /**     * 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 OMLine) {            line = (OMLine) graphic;            stateMachine.setSelected();            setGrabPoints(line);        } else {            createGraphic(null);        }    }    /**     * Create and set the graphic within the state machine. The     * GraphicAttributes describe the type of line to create.     */    public void createGraphic(GraphicAttributes ga) {        init();        stateMachine.setUndefined();        int renderType = OMGraphic.RENDERTYPE_UNKNOWN;        int lineType = OMGraphic.LINETYPE_GREATCIRCLE;        if (ga != null) {            renderType = ga.getRenderType();            lineType = ga.getLineType();        }        if (Debug.debugging("eoml")) {            Debug.output("EditableOMLine.createGraphic(): rendertype = "                    + renderType);        }        if (lineType == OMGraphic.LINETYPE_UNKNOWN) {            lineType = OMGraphic.LINETYPE_GREATCIRCLE;            ga.setLineType(OMGraphic.LINETYPE_GREATCIRCLE);        }        switch (renderType) {        case (OMGraphic.RENDERTYPE_LATLON):            line = new OMLine(90f, -180f, 90f, -180f, lineType);            break;        case (OMGraphic.RENDERTYPE_OFFSET):            line = new OMLine(90f, -180f, 0, 0, 0, 0);            break;        default:            line = new OMLine(-1, -1, -1, -1);        }        if (ga != null) {            ga.setTo(line);        }    }    /**     * Get the OMGraphic being created/modified by the EditableOMLine.     */    public OMGraphic getGraphic() {        return line;    }    /**     * 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;    }    /**     * 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);    }    /**     * Check to make sure the grab points are not null. If they are,     * allocate them, and them assign them to the array.     */    public void assertGrabPoints() {        if (gp1 == null) {            gp1 = new GrabPoint(-1, -1);            gPoints[STARTING_POINT_INDEX] = gp1;        }        if (gp2 == null) {            gp2 = new GrabPoint(-1, -1);            gPoints[ENDING_POINT_INDEX] = gp2;        }        if (gpo == null) {            gpo = new OffsetGrabPoint(-1, -1);            gPoints[OFFSET_POINT_INDEX] = gpo;            gpo.addGrabPoint(gp1);            gpo.addGrabPoint(gp2);        }    }    /**     * Set the grab points for the graphic provided, setting them on     * the extents of the graphic. Called when you want to set the     * grab points off the location of the graphic.     */    public void setGrabPoints(OMGraphic graphic) {        if (!(graphic instanceof OMLine)) {            return;        }        assertGrabPoints();        OMLine line = (OMLine) graphic;        boolean ntr = line.getNeedToRegenerate();        int renderType = line.getRenderType();        if (ntr == false) {            if (renderType == OMGraphic.RENDERTYPE_LATLON) {                Debug.message("eomg", "EditableOMLine: modifying lat/lon line");                // Complicated lines!!!! Need to grab the end points                // that are on the map! See, for very large lines                // that go around the earth, they are acutally drawn                // in OpenMap as an array of lines that are clipped as                // they go offscreen. Eventually, one of the points                // should appear on the map somewhere. If they don't,                // then then the end points may not be on the screen.                if (projection != null) {                    float[] ll = line.getLL();                    java.awt.Point p = projection.forward(ll[0], ll[1]);                    gp1.set((int) p.getX(), (int) p.getY());                    projection.forward(ll[2], ll[3], p);                    gp2.set((int) p.getX(), (int) p.getY());                }            } else {                // Grab the projected endpoints                Debug.message("eomg",                        "EditableOMLine: modifying x/y or offset standard line");                gp1.set(line.xpoints[0][0], line.ypoints[0][0]);                int last = line.xpoints[0].length - 1;                gp2.set(line.xpoints[0][last], line.ypoints[0][last]);            }            // Check to see if the line is a offset line, and set the            // offset grab point accordingly.            if (line.getRenderType() == OMGraphic.RENDERTYPE_OFFSET                    && projection != null) {                float[] ll = line.getLL();                java.awt.Point p = projection.forward(ll[0], ll[1]);                gpo.set((int) p.getX(), (int) p.getY());                gpo.updateOffsets();            }        } else {            Debug.message("eomg",                    "EditableOMLine.setGrabPoints: graphic needs to be regenerated");        }    }    /**     * Take the current location of the GrabPoints, and modify the     * location parameters of the OMLine with them. Called when you     * want the graphic to change according to the grab points.     */    public void setGrabPoints() {        int renderType = line.getRenderType();        if (renderType == OMGraphic.RENDERTYPE_LATLON) {            if (projection != null) {                float[] floats = new float[4];                com.bbn.openmap.LatLonPoint llp = projection.inverse(gp1.getX(),                        gp1.getY());                floats[0] = llp.getLatitude();                floats[1] = llp.getLongitude();                projection.inverse(gp2.getX(), gp2.getY(), llp);                floats[2] = llp.getLatitude();                floats[3] = llp.getLongitude();                line.setLL(floats);            } else {                Debug.message("eomg",                        "EditableOMLine.setGrabPoints: projection is null, can't figure out LATLON points for line.");            }        } else if (renderType == OMGraphic.RENDERTYPE_OFFSET) {            // Do the offset point.            if (projection != null) {                float[] floats = new float[4];                com.bbn.openmap.LatLonPoint llp = projection.inverse(gpo.getX(),                        gpo.getY());                floats[0] = llp.getLatitude();                floats[1] = llp.getLongitude();                floats[2] = 0;// not used                floats[3] = 0;// not used                line.setLL(floats);            } else {                Debug.message("eomg",                        "EditableOMLine.setGrabPoints: projection is null, can't figure out LATLON points for line offset.");            }        }        if (renderType == OMGraphic.RENDERTYPE_XY                || renderType == OMGraphic.RENDERTYPE_OFFSET) {            int[] ints = new int[4];            if (renderType == OMGraphic.RENDERTYPE_OFFSET && gpo != null) {                // If offset rendertype, the x-y have to be offset                // distances, not screen pixel locations.                ints[0] = gp1.getX() - gpo.getX();                ints[1] = gp1.getY() - gpo.getY();                ints[2] = gp2.getX() - gpo.getX();                ints[3] = gp2.getY() - gpo.getY();            } else {                ints[0] = gp1.getX();                ints[1] = gp1.getY();                ints[2] = gp2.getX();                ints[3] = gp2.getY();            }            line.setPts(ints);        }    }    /**     * Called to set the OffsetGrabPoint to the current mouse     * location, and update the OffsetGrabPoint with all the other     * GrabPoint locations, so everything can shift smoothly. Should     * also set the OffsetGrabPoint to the movingPoint. Should be     * called only once at the beginning of the general movement, in     * order to set the movingPoint. After that, redraw(e) should just     * be called, and the movingPoint will make the adjustments to the     * graphic that are needed.     */    public void move(MouseEvent e) {        // Need to check to see if the OffsetGrabPoint is currently        // being used. If not, just use it, otherwise, will need to        // create a special one for the move.        if (line.getRenderType() == OMGraphic.RENDERTYPE_OFFSET) {            gpm = new OffsetGrabPoint(e.getX(), e.getY());            gpm.addGrabPoint(gp1);            gpm.addGrabPoint(gp2);        } else {            gpm = gpo;            gpm.set(e.getX(), e.getY());            gpm.updateOffsets();        }        movingPoint = gpm;    }    /**     * Use the current projection to place the graphics on the screen.     * Has to be called to at least assure the graphics that they are     * ready for rendering. Called when the graphic position changes.     *      * @param proj com.bbn.openmap.proj.Projection     * @return true     */    public boolean generate(Projection proj) {        Debug.message("eomg", "EditableOMLine.generate()");        if (line != null)            line.generate(proj);        if (gp1 != null)            gp1.generate(proj);        if (gp2 != null)            gp2.generate(proj);        if (gpo != null) {            gpo.generate(proj);            gpo.updateOffsets();        }        ;        return true;    }    /**     * Given a new projection, the grab points may need to be     * repositioned off the current position of the graphic. Called     * when the projection changes.     */    public void regenerate(Projection proj) {        Debug.message("eomg", "EditableOMLine.regenerate()");        if (line != null)            line.generate(proj);        setGrabPoints(line);        if (gp1 != null)            gp1.generate(proj);        if (gp2 != null)            gp2.generate(proj);        if (gpo != null) {            gpo.generate(proj);            gpo.updateOffsets();        }    }    /**     * Draw the EditableOMLine parts into the java.awt.Graphics     * object. The grab points are only rendered if the line machine     * state is LineSelectedState.LINE_SELECTED.     *      * @param graphics java.awt.Graphics.     */    public void render(java.awt.Graphics graphics) {        Debug.message("eomg", "EditableOMLine.render()");        State state = getStateMachine().getState();        if (line != null) {            line.setVisible(true);            line.render(graphics);            line.setVisible(false);        } else {            Debug.message("eomg", "EditableOMLine.render: null line.");        }        if (state instanceof GraphicSelectedState) {            if (gp1 != null) {                gp1.setVisible(true);                gp1.render(graphics);                gp1.setVisible(false);            }            if (gp2 != null) {                gp2.setVisible(true);                gp2.render(graphics);                gp2.setVisible(false);            }        }        if (state instanceof GraphicSelectedState                || state instanceof GraphicEditState /*                                                         * || state                                                         * instanceof                                                         * LineSetOffsetState                                                         */) {            if (gpo != null                    && line.getRenderType() == OMGraphic.RENDERTYPE_OFFSET) {                gpo.setVisible(true);                gpo.render(graphics);                gpo.setVisible(false);            }        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本二三区不卡| 91美女在线视频| 精品少妇一区二区三区免费观看 | 国产亚洲欧美激情| 激情小说欧美图片| 久久久不卡影院| 波多野结衣中文字幕一区| 中文字幕在线不卡一区二区三区| 99久久国产综合精品色伊| 一区二区三区成人| 5858s免费视频成人| 国产揄拍国内精品对白| 国产精品国产成人国产三级| 欧美亚洲尤物久久| 国内精品写真在线观看| 中文字幕一区二区不卡| 欧美日韩精品二区第二页| 狠狠色丁香久久婷婷综合丁香| 国产欧美日本一区视频| 欧美色图在线观看| 久久精品国产99久久6| 国产精品久久毛片| 欧美理论在线播放| 国产精品1区2区3区| 亚洲一二三四在线观看| 欧美xxxxx裸体时装秀| 色综合色狠狠综合色| 美国十次综合导航| 亚洲免费观看高清完整版在线观看熊 | 欧美国产激情一区二区三区蜜月| 色综合一个色综合| 久久不见久久见中文字幕免费| 国产精品区一区二区三区| 国产精品久久久久天堂| 欧美日韩三级在线| 成人听书哪个软件好| 午夜av一区二区| 中文久久乱码一区二区| 日韩一级在线观看| 欧美专区在线观看一区| 懂色av一区二区三区免费看| 日韩中文欧美在线| 亚洲免费在线视频一区 二区| 精品久久国产字幕高潮| 在线欧美日韩精品| 成人a免费在线看| 九九**精品视频免费播放| 亚洲一区二区美女| 国产精品进线69影院| 久久精品一区蜜桃臀影院| 欧美精品三级在线观看| 99国产精品久久久久久久久久| 精品一区二区免费看| 午夜电影网亚洲视频| 亚洲精品欧美二区三区中文字幕| 日本一区二区三区视频视频| 日韩精品中文字幕在线不卡尤物| 色94色欧美sute亚洲线路二| 盗摄精品av一区二区三区| 久久99久久久久| 蜜桃av噜噜一区二区三区小说| 亚洲一区二区三区自拍| 亚洲女同女同女同女同女同69| 国产精品国产三级国产三级人妇| 精品国产一区二区亚洲人成毛片| 欧美一区二区久久| 欧美一区二区国产| 欧美精品777| 欧美高清视频www夜色资源网| 欧美三级中文字幕在线观看| 欧美性生活久久| 欧美日韩一区二区三区视频| 欧美三级电影一区| 欧美精品久久天天躁| 欧美久久一二区| 678五月天丁香亚洲综合网| 欧美视频一区二区三区| 欧美日韩色综合| 欧美精品久久一区二区三区| 91精品国产欧美一区二区18 | 欧美zozozo| 久久久综合网站| 国产清纯在线一区二区www| 欧美韩国日本不卡| 国产精品―色哟哟| 亚洲欧美日韩中文字幕一区二区三区| 中文字幕在线观看不卡| 亚洲精品网站在线观看| 亚洲一区影音先锋| 日韩一区欧美二区| 国模套图日韩精品一区二区| 国产毛片精品视频| aa级大片欧美| 欧美色图免费看| 欧美一级午夜免费电影| 久久嫩草精品久久久精品一| 国产精品国产三级国产有无不卡 | 国产肉丝袜一区二区| 一区二区中文视频| 亚洲午夜在线电影| 久久精品国产色蜜蜜麻豆| 国产精品456| 91麻豆视频网站| 91精品国产91久久久久久一区二区 | 大美女一区二区三区| 一本久久精品一区二区| 欧美丰满高潮xxxx喷水动漫| 久久综合九色综合欧美98| 中文字幕在线不卡视频| 日韩专区中文字幕一区二区| 国产米奇在线777精品观看| 99re在线精品| 日韩亚洲欧美一区二区三区| 中日韩免费视频中文字幕| 伊人色综合久久天天人手人婷| 石原莉奈在线亚洲三区| 粉嫩一区二区三区在线看| 欧美色老头old∨ideo| 久久综合丝袜日本网| 亚洲一区在线免费观看| 国产成人亚洲综合a∨婷婷图片| 96av麻豆蜜桃一区二区| 日韩精品一区二区三区四区| 亚洲欧洲美洲综合色网| 久久超碰97中文字幕| 欧美在线看片a免费观看| 久久久www成人免费无遮挡大片| 亚洲成人一区二区| 成人一道本在线| 欧美大片拔萝卜| 亚洲一区二区三区中文字幕在线| 国产精品一品二品| 日韩视频在线你懂得| 亚洲精品午夜久久久| 国产久卡久卡久卡久卡视频精品| 欧美色男人天堂| 中文字幕人成不卡一区| 激情综合色综合久久综合| 欧美亚洲免费在线一区| 国产精品视频在线看| 韩国欧美国产一区| 欧美日韩国产高清一区二区三区 | 欧美系列一区二区| 国产精品嫩草99a| 极品美女销魂一区二区三区免费| 欧美色网一区二区| 亚洲三级视频在线观看| 国产99久久久国产精品潘金| 欧美变态tickling挠脚心| 日日欢夜夜爽一区| 欧美日韩在线免费视频| 亚洲激情一二三区| 91美女在线视频| 亚洲色图.com| aaa欧美大片| 国产精品久久三| 成人黄页在线观看| 国产人成亚洲第一网站在线播放 | 国产精品一二三四五| 日韩一区二区三| 日韩国产高清在线| 欧美高清视频在线高清观看mv色露露十八| 亚洲精品综合在线| 欧美伊人精品成人久久综合97| 亚洲天堂中文字幕| 91在线播放网址| 亚洲欧美偷拍卡通变态| 91成人在线精品| 亚洲一区二区精品3399| 欧美三级乱人伦电影| 首页亚洲欧美制服丝腿| 日韩亚洲欧美中文三级| 精品一区二区三区av| 久久精品一区二区三区不卡| 成人综合婷婷国产精品久久免费| 2021国产精品久久精品 | av激情成人网| 有码一区二区三区| 欧美视频一区二区在线观看| 亚洲h精品动漫在线观看| 日韩午夜在线观看| 国产乱理伦片在线观看夜一区| 久久久777精品电影网影网| 本田岬高潮一区二区三区| 亚洲精品乱码久久久久久黑人| 在线中文字幕一区| 日本亚洲一区二区| 久久先锋影音av| 99久久er热在这里只有精品15 | 国产婷婷色一区二区三区四区| 波多野结衣中文字幕一区二区三区| 日韩毛片在线免费观看| 欧美性一二三区| 久久99国产精品免费| 成人免费在线视频观看| 欧美无人高清视频在线观看| 麻豆专区一区二区三区四区五区| 国产日韩欧美不卡| 欧美日精品一区视频| 国产乱码精品1区2区3区|