📄 editableomspline.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/EditableOMSpline.java,v $//$RCSfile: EditableOMSpline.java,v $//$Revision: 1.4.2.1 $//$Date: 2004/10/14 18:27:25 $//$Author: dietrick $////**********************************************************************package com.bbn.openmap.omGraphics;import com.bbn.openmap.omGraphics.EditableOMPoly;import com.bbn.openmap.omGraphics.GraphicAttributes;import com.bbn.openmap.omGraphics.OMGraphic;/** * EditableOMSpline. Nothing created, code adapted from EditableOMPoly * We just need to edit the generating points as an OMPoly * * @author Eric LEPICIER * @version 22 juil. 2002 */public class EditableOMSpline extends EditableOMPoly { /** * Constructor. */ public EditableOMSpline() { super(); } /** * Constructor. * * @param ga */ public EditableOMSpline(GraphicAttributes ga) { super(ga); } /** * Constructor. * * @param omp */ public EditableOMSpline(OMSpline omp) { super(omp); } /** * 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 OMSpline(new float[0], OMGraphic.RADIANS, lineType); break; case (OMGraphic.RENDERTYPE_OFFSET): g = new OMSpline(90f, -180f, new int[0], OMSpline.COORDMODE_ORIGIN); break; default: g = new OMSpline(new int[0]); } ((OMSpline) g).setDoShapes(true); return g; } /** * Overridden to overcome some repainting unpleasantness that * occurs when a point is added. Slows things down, however. */ public int addMovingPoint(int x, int y) { int position = super.addMovingPoint(x, y); redraw(null, true); return position; } public java.net.URL getImageURL(String imageName) { try { return Class.forName("com.bbn.openmap.omGraphics.EditableOMPoly") .getResource(imageName); } catch (ClassNotFoundException cnfe) { } return null; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -