⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customgraphic.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
字号:
/* ********************************************************************** *  *    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 com.bbn.openmap.omGraphics.OMGraphic;import com.bbn.openmap.omGraphics.OMGraphicList;/** * A custom graphic class for representing SimpleBeanObject beans on * the map. See * {@link com.bbn.openmap.examples.beanbox.ContainerGraphic}for an * example implementation. */public abstract class CustomGraphic extends OMGraphicList {    protected OMGraphic graphic;    /**     * Create a graphical representation of the object. The     * constructor calls the abstract createGraphic method of this     * class to create the custom graphic which is then added to the     * OMGraphicList. This method also sets the SimpleBeanObject's id     * as the appObject associated with the created graphic.     */    public CustomGraphic(SimpleBeanObject object) {        super(1);        setTraverseMode(OMGraphicList.LAST_ADDED_ON_TOP);        graphic = createGraphic(object);        super.add(graphic);        setAppObject(new Long(object.getId()));    }    /**     * Override this method to create and return the object's graphic     * representation.     */    public abstract OMGraphic createGraphic(SimpleBeanObject object);    /**     * Change the graphic to reflect the current state of the object.     * Default implementation does nothing. This method is called by     * the SimpleBeanLayer to update a graphic in response to a user     * action such as moving the object on the map.     */    public void updateGraphic(SimpleBeanObject object) {}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -