?? customgraphic.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 + -