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

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

?? terrainlayer.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/layer/terrain/TerrainLayer.java,v $// $RCSfile: TerrainLayer.java,v $// $Revision: 1.6.2.4 $// $Date: 2005/08/09 21:17:47 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.layer.terrain;/*  Java Core  */import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.MouseEvent;import javax.swing.Box;import javax.swing.ButtonGroup;import javax.swing.JButton;import javax.swing.JLabel;import javax.swing.JPanel;import javax.swing.JRadioButton;import javax.swing.JSlider;import javax.swing.event.ChangeEvent;import javax.swing.event.ChangeListener;import com.bbn.openmap.dataAccess.dted.DTEDFrameCache;import com.bbn.openmap.event.MapMouseListener;import com.bbn.openmap.event.SelectMouseMode;import com.bbn.openmap.layer.OMGraphicHandlerLayer;import com.bbn.openmap.omGraphics.OMGraphicList;import com.bbn.openmap.proj.Projection;import com.bbn.openmap.util.Debug;import com.bbn.openmap.util.PaletteHelper;/** * The Terrain Layer is an example of creating a layer that acts as a * tool that defines and area (via user gestures) and presents a * result of the analysis of the data. In this case, Elevation data is * used in two different ways. The Profile tool lets you draw a line * on the map, and then uses DTED data to create a GIF image that * shows the terrain profile along the drawn line. The LOS * (line-of-sight) tool lets you define a circle, and then calculates * the places on the ground that are within sight of the center of the * circle. The result is shown with the visible points being colored * green, and all other points being clear. The LOS tool lets you use * a height slider on its palette to define additional height at the * point, representing a tower, building, or location of an aircraft. *  * <P> * The tools require you to be in the gesture mode of OpenMap. *  * <P> * The TerrainLayer needs a DTEDFrameCache. It can be added to the * layer programmatically, or the layer will find it if the * DTEDFrameCache is added to the MapHandler. To do that in the * OpenMap application, add the DTEDFrameCache to the * openmap.components property in the openmap.properties file. *  * <pre> *  *  #---------------------------------------------------------------------- *  # Properties file for TerrainLayer *  #---------------------------------------------------------------------- *  # The default tool to use for the terrain layer.  Can be PROFILE or *  LOS.  terrain.default.mode=PROFILE *  #---------------------------------------------------------------------- *  # End of properties file for TerrainLayer *  #---------------------------------------------------------------------- *   * </pre> *  * @see com.bbn.openmap.dataAccess.dted.DTEDFrameCache */public class TerrainLayer extends OMGraphicHandlerLayer implements        ActionListener, MapMouseListener {    /** The cache that knows how to handle DTED requests. */    public DTEDFrameCache frameCache;    /** Which tool is being used. */    protected int mode;    /** The code number for the profile tool. */    public final static int PROFILE = 0;    /** The code number for the perspective tool (unimplemented). */    public final static int PERSPECTIVE = 1;    /** The code number for the LOS tool. */    public final static int LOS = 2;    /** The current tool being used. */    public TerrainTool currentTool;    public ProfileGenerator profileTool;    public LOSGenerator LOSTool;    public static final String defaultModeProperty = "default.mode";    public final static String clearCommand = "clearTool";    public final static String createCommand = "createTool";    /**     * The default constructor for the Layer. All of the attributes     * are set to their default values.     */    public TerrainLayer() {        setName("Terrain");        init();    }    /** Creates new tools. */    public void init() {        profileTool = new ProfileGenerator(this);        LOSTool = new LOSGenerator(this);        setProjectionChangePolicy(new com.bbn.openmap.layer.policy.ListResetPCPolicy(this));    }    /**     * Sets the default values for the variables, if the properties     * are not found, or are invalid. Usually not a good idea.     */    protected void setDefaultValues() {        mode = PROFILE;    }    public void setFrameCache(DTEDFrameCache dfc) {        frameCache = dfc;    }    public DTEDFrameCache getFrameCache() {        return frameCache;    }    /**     * Set all the TerrainLayer properties from a proerties object     *      * @param prefix a string that gets set to indiviualize the     *        properties to a specific layer.     * @param properties the proerties object     */    public void setProperties(String prefix, java.util.Properties properties) {        super.setProperties(prefix, properties);        setDefaultValues();        prefix = com.bbn.openmap.util.PropUtils.getScopedPropertyPrefix(prefix);        try {            String defaultModeString = properties.getProperty(prefix                    + defaultModeProperty);            if (defaultModeString.equalsIgnoreCase("LOS"))                setMode(LOS);            //          else if (defaultModeString.equalsIgnoreCase("PROFILE"))            //              defaultMode = PROFILE;            else                setMode(PROFILE);        } catch (NullPointerException e) {            System.err.println("TerrainLayer: Caught NullPointerException loading resources.");            System.err.println("TerrainLayer: Using default resources.");            setDefaultValues();            setMode(mode);        }    }    /**     * Prepares the graphics for the layer. This is where the     * getRectangle() method call is made on the dted.     * <p>     * Occasionally it is necessary to abort a prepare call. When this     * happens, the map will set the cancel bit in the LayerThread,     * (the thread that is running the prepare). If this Layer needs     * to do any cleanups during the abort, it should do so, but     * return out of the prepare asap.     */    public synchronized OMGraphicList prepare() {        if (isCancelled()) {            Debug.message("dted", getName()                    + "|TerrainLayer.prepare(): aborted.");            return null;        }        Projection projection = getProjection();        if (projection == null) {            System.err.println("Terrain Layer needs to be added to the MapBean before it can be used!");            return new OMGraphicList();        }        Debug.message("basic", getName() + "|TerrainLayer.prepare(): doing it");        // Setting the OMGraphicsList for this layer. Remember, the        // OMGraphicList is made up of OMGraphics, which are generated        // (projected) when the graphics are added to the list. So,        // after this call, the list is ready for painting.                profileTool.setScreenParameters(projection);        LOSTool.setScreenParameters(projection);        return currentTool.getGraphics();    }    //----------------------------------------------------------------------    // GUI    //----------------------------------------------------------------------    /** The user interface palette for the Terrain layer. */    protected Box palette = null;    private String profileCommand = "setModeToProfile";    private String losCommand = "setModeToLos";    /** Creates the interface palette. */    public java.awt.Component getGUI() {        if (palette == null) {            if (Debug.debugging("terrain"))                System.out.println("TerrainLayer: creating Terrain Palette.");            palette = Box.createVerticalBox();            //          palette = new JPanel();            //          palette.setLayout(new GridLayout(0, 1));            // The Terrain Level selector            JPanel modePanel = PaletteHelper.createPaletteJPanel("Tool Mode");            ButtonGroup modes = new ButtonGroup();            ActionListener al = new ActionListener() {                public void actionPerformed(ActionEvent e) {                    String ac = e.getActionCommand();                    if (ac.equalsIgnoreCase(losCommand)) {                        setMode(LOS);                    } else {                        setMode(PROFILE);                    }                }            };            JRadioButton profileModeButton = new JRadioButton("Profile");            profileModeButton.addActionListener(al);            profileModeButton.setActionCommand(profileCommand);            JRadioButton losModeButton = new JRadioButton("LOS");            losModeButton.addActionListener(al);            losModeButton.setActionCommand(losCommand);            modes.add(profileModeButton);            modes.add(losModeButton);            switch (mode) {            case LOS:                losModeButton.setSelected(true);                break;            case PROFILE:            default:                profileModeButton.setSelected(true);            }            modePanel.add(profileModeButton);            modePanel.add(losModeButton);            // The LOS Height Adjuster            JPanel centerHeightPanel = PaletteHelper.createPaletteJPanel("LOS Center Object Height");            JSlider centerHeightSlide = new JSlider(JSlider.HORIZONTAL, 0/* min */, 500/* max */, 0/* inital */);            java.util.Hashtable dict = new java.util.Hashtable();            dict.put(new Integer(0), new JLabel("0 ft"));            dict.put(new Integer(500), new JLabel("500 ft"));            centerHeightSlide.setLabelTable(dict);            centerHeightSlide.setPaintLabels(true);            centerHeightSlide.setMajorTickSpacing(50);            centerHeightSlide.setPaintTicks(true);            centerHeightSlide.setSnapToTicks(false);            centerHeightSlide.addChangeListener(new ChangeListener() {                public void stateChanged(ChangeEvent ce) {                    JSlider slider = (JSlider) ce.getSource();                    if (slider.getValueIsAdjusting()) {                        fireRequestInfoLine("TerrainLayer - center height value = "                                + slider.getValue());                        LOSTool.setLOSobjectHeight(slider.getValue());                    }                }            });            centerHeightPanel.add(centerHeightSlide);            JPanel profileControlPanel = PaletteHelper.createPaletteJPanel("Tool Commands");            JButton clearButton = new JButton("Clear/Reset Tool");            clearButton.setActionCommand(clearCommand);            clearButton.addActionListener(this);            JButton createButton = new JButton("Create");            createButton.setActionCommand(createCommand);            createButton.addActionListener(this);            profileControlPanel.add(clearButton);            profileControlPanel.add(createButton);            JButton redraw = new JButton("Redraw Terrain Layer");            redraw.setActionCommand(RedrawCmd);            redraw.addActionListener(this);            palette.add(modePanel);            palette.add(centerHeightPanel);            palette.add(profileControlPanel);            //          palette.add(redraw);        }        return palette;    }    //----------------------------------------------------------------------    // ActionListener interface implementation    //----------------------------------------------------------------------    /**     * The reaction handler for the buttons being pressed on the     * palette.     */    public void actionPerformed(ActionEvent e) {        super.actionPerformed(e);        String ac = e.getActionCommand();        if (ac.equalsIgnoreCase(RedrawCmd)) {            doPrepare();        } else {            currentTool.getState().actionPerformed(e);        }    }    //----------------------------------------------------------------------    // MapMouseListener interface implementation    //----------------------------------------------------------------------    public synchronized MapMouseListener getMapMouseListener() {        return this;    }    /**     * Tells the MouseDelegator which Mouse Modes we're interested in     * receiving events from. In this case, just the "Gestures" mode.     */    public String[] getMouseModeServiceList() {        String[] services = { SelectMouseMode.modeID };        return services;    }    public boolean mousePressed(MouseEvent e) {        return currentTool.getState().mousePressed(e);    }    public boolean mouseReleased(MouseEvent e) {        return currentTool.getState().mouseReleased(e);    }    public boolean mouseClicked(MouseEvent e) {        return currentTool.getState().mouseClicked(e);    }    public void mouseEntered(MouseEvent e) {}    public void mouseExited(MouseEvent e) {}    public boolean mouseDragged(MouseEvent e) {        return currentTool.getState().mouseDragged(e);    }    public boolean mouseMoved(MouseEvent e) {        return false;    }    public void mouseMoved() {}    /**     * Little math utility that both tools use, that just implements     * the pathagorean theorem to do the number of pixels between two     * screen points.     */    public static int numPixelsBetween(int x1, int y1, int x2, int y2) {        return (int) Math.sqrt(Math.pow((double) (x1 - x2), 2.0)                + Math.pow((double) (y1 - y2), 2.0));    }    /** Set the current tool to be used. */    public void setMode(int m) {        mode = m;        if (currentTool != null)            currentTool.reset();        if (m == PROFILE) {            currentTool = profileTool;            //        System.out.println("Changing mode to PROFILE");        }        if (m == LOS) {            currentTool = LOSTool;            //        System.out.println("Changing mode to LOS");        }        if (currentTool != null) {            currentTool.reset();            setList(currentTool.getGraphics());        }    }    public int getMode() {        return mode;    }    public void findAndInit(Object someObj) {        if (someObj instanceof DTEDFrameCache) {            setFrameCache((DTEDFrameCache) someObj);        }    }    public void findAndUndo(Object someObj) {        if (someObj == getFrameCache()) {            setFrameCache(null);        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影一区二区三区| 亚洲婷婷综合色高清在线| 日韩高清不卡一区| 制服丝袜成人动漫| 天天综合色天天综合色h| 日韩欧美中文字幕一区| 精油按摩中文字幕久久| 国产日产亚洲精品系列| 99久久99久久免费精品蜜臀| 亚洲午夜免费视频| 欧美高清性hdvideosex| 精品一区二区三区影院在线午夜| 久久久精品蜜桃| 色网综合在线观看| 欧美aaa在线| 亚洲欧美一区二区视频| 欧美三级电影在线观看| 精品在线免费视频| 国产精品你懂的| 欧美美女视频在线观看| 国内精品国产三级国产a久久| 成人免费在线视频| 91精品国产欧美一区二区18 | 久久精品二区亚洲w码| 欧美国产亚洲另类动漫| 91久久精品一区二区三| 久久 天天综合| 亚洲精品国产成人久久av盗摄| 日韩欧美国产三级电影视频| 成人不卡免费av| 日日骚欧美日韩| 国产精品免费视频一区| 欧美一级久久久久久久大片| 成人av在线一区二区| 热久久免费视频| 亚洲色图制服诱惑 | 欧美性大战xxxxx久久久| 精品一区二区三区免费观看| 亚洲精品乱码久久久久久久久| 欧美电影免费观看完整版| 色噜噜狠狠色综合欧洲selulu| 久久66热偷产精品| 午夜精品福利一区二区蜜股av| 国产精品三级视频| 日韩视频不卡中文| 欧美在线观看一区| 成人av片在线观看| 国产精品资源在线看| 日日嗨av一区二区三区四区| 亚洲欧美综合色| 久久久综合精品| 精品免费国产一区二区三区四区| 欧美影院精品一区| 97se亚洲国产综合自在线不卡| 精品一区二区综合| 日韩中文字幕麻豆| 亚洲一区二区免费视频| 国产成人午夜精品5599| 91久久精品一区二区| 另类欧美日韩国产在线| 婷婷成人激情在线网| 伊人色综合久久天天人手人婷| 久久九九久久九九| 精品国产一区二区精华| 欧美丰满美乳xxx高潮www| 色婷婷av一区二区三区之一色屋| 波多野结衣亚洲| 国产黄人亚洲片| 国产成人免费在线| 国产精品一区二区91| 九九九精品视频| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲va韩国va欧美va| 亚洲线精品一区二区三区 | 久久综合九色综合欧美就去吻| 欧美日韩一级视频| 欧美视频第二页| 欧美日韩亚洲另类| 99久久99久久精品国产片果冻 | 欧美电影免费观看完整版| 宅男噜噜噜66一区二区66| 欧美精选午夜久久久乱码6080| 欧美日韩中文字幕一区| 欧美高清激情brazzers| 欧美一级欧美一级在线播放| 欧美大片免费久久精品三p| 日韩一级大片在线| 亚洲精品一区二区三区影院| 久久精品视频一区| 亚洲欧洲精品一区二区三区| 亚洲女子a中天字幕| 午夜视黄欧洲亚洲| 蜜桃久久久久久| 国产精品中文字幕日韩精品| 成人做爰69片免费看网站| 99精品国产一区二区三区不卡| 91免费观看国产| 欧美日韩一区成人| 日韩欧美亚洲国产另类| 欧美va亚洲va| 136国产福利精品导航| 亚洲国产精品久久不卡毛片| 奇米影视7777精品一区二区| 国内精品国产成人国产三级粉色| 成人性色生活片| 欧美在线短视频| 精品乱人伦一区二区三区| 欧美国产欧美亚州国产日韩mv天天看完整 | 国产精品私房写真福利视频| 亚洲黄色片在线观看| 免费在线观看视频一区| 成人免费毛片嘿嘿连载视频| 欧美三级电影精品| 国产午夜精品福利| 亚洲成人www| 国产一区二区精品在线观看| 色综合久久88色综合天天免费| 欧美伦理电影网| 国产欧美日韩视频一区二区| 亚洲图片一区二区| 国产大陆a不卡| 欧美亚洲国产一区二区三区| 2023国产一二三区日本精品2022| 国产精品动漫网站| 久久国产精品色婷婷| 色综合久久久久综合体桃花网| 日韩精品专区在线影院观看| 亚洲图片你懂的| 蜜臀av一区二区在线观看| 91麻豆国产福利在线观看| 91精品国产一区二区| 亚洲欧美激情小说另类| 国产最新精品精品你懂的| 欧美另类高清zo欧美| 国产精品久久久久久久蜜臀| 秋霞电影网一区二区| 日本韩国欧美一区二区三区| 久久综合一区二区| 日韩高清不卡一区二区三区| 色噜噜狠狠一区二区三区果冻| 国产日韩欧美一区二区三区综合| 日韩精品成人一区二区在线| 色综合久久精品| 欧美国产日韩a欧美在线观看| 久久成人免费电影| 欧美日本国产视频| 亚洲欧美aⅴ...| 99综合影院在线| 国产农村妇女毛片精品久久麻豆| 日韩电影在线免费观看| 欧美日韩一区二区三区视频| 最新中文字幕一区二区三区| 国产不卡在线一区| 精品动漫一区二区三区在线观看| 日韩国产欧美在线观看| 欧美日韩不卡在线| 亚洲午夜羞羞片| 欧美综合一区二区三区| 亚洲午夜精品17c| 91成人免费网站| 亚洲高清免费观看高清完整版在线观看| eeuss影院一区二区三区 | 一区二区视频免费在线观看| 99精品久久99久久久久| 亚洲欧美另类小说| 色婷婷久久久亚洲一区二区三区| 亚洲欧美电影一区二区| 91免费看片在线观看| 亚洲免费伊人电影| 日本韩国精品在线| 亚洲成人av电影| 91精品国产乱码| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩欧美一二三| 国产美女精品人人做人人爽| 欧美激情一区二区三区全黄| 成人精品在线视频观看| 亚洲少妇屁股交4| 欧美色综合影院| 五月婷婷久久综合| 精品国产乱码久久久久久蜜臀 | 亚洲另类春色校园小说| 欧美性大战久久久久久久蜜臀| 天堂久久一区二区三区| 日韩欧美国产三级| 高清不卡在线观看| 一区二区三区四区不卡在线 | 亚洲成人先锋电影| 日韩欧美一区在线观看| 国产成人夜色高潮福利影视| 国产精品女主播在线观看| 欧美性猛交一区二区三区精品| 日韩—二三区免费观看av| 久久久久久久久伊人| 色哟哟日韩精品| 久久精品噜噜噜成人av农村| 国产亚洲成aⅴ人片在线观看| 99视频一区二区| 日韩精品一级中文字幕精品视频免费观看 | www欧美成人18+|