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

📄 editablelabeledomspline.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
字号:
package com.bbn.openmap.omGraphics.labeled;

import com.bbn.openmap.omGraphics.EditableOMSpline;
import com.bbn.openmap.omGraphics.GraphicAttributes;
import com.bbn.openmap.omGraphics.OMGraphic;
import com.bbn.openmap.omGraphics.OMSpline;

/**
 * The EditableLabeledOMSpline encompasses an LabeledOMSpline,
 * providing methods for modifying or creating it. Nothing created,
 * code adapted from EditableLabeledOMPoly We just need to edit the
 * generating points as an OMSpline
 * 
 * @author Eric LEPICIER
 * @version 22 juil. 2002
 */
public class EditableLabeledOMSpline extends EditableOMSpline {

    /**
     * Create the EditableLabeledOMSpline, setting the state machine
     * to create the poly off of the gestures.
     * 
     * @see com.bbn.openmap.omGraphics.EditableOMPoly#EditableOMPoly()
     */
    public EditableLabeledOMSpline() {
        super();
    }

    /**
     * Create an EditableLabeledOMSpline with the polyType and
     * renderType parameters in the GraphicAttributes object.
     * 
     * @param ga
     * @see com.bbn.openmap.omGraphics.EditableOMPoly#EditableOMPoly(GraphicAttributes)
     */
    public EditableLabeledOMSpline(GraphicAttributes ga) {
        super(ga);
    }

    /**
     * Create the EditableLabeledOMSpline with a LabeledOMSpline
     * already defined, ready for editing.
     * 
     * @param omls LabeledOMSpline that should be edited.
     * @see com.bbn.openmap.omGraphics.EditableOMPoly#EditableOMPoly(GraphicAttributes)
     */
    public EditableLabeledOMSpline(LabeledOMSpline omls) {
        super(omls);
    }

    /**
     * Extendable method to create specific subclasses of OMSplines.
     * 
     * @see com.bbn.openmap.omGraphics.EditableOMPoly#createGraphic(int,
     *      int)
     */
    public OMGraphic createGraphic(int renderType, int lineType) {
        OMGraphic g = null;
        switch (renderType) {
        case (OMGraphic.RENDERTYPE_LATLON):
            g = new LabeledOMSpline(new float[0], OMGraphic.RADIANS, lineType);
            break;
        case (OMGraphic.RENDERTYPE_OFFSET):
            g = new LabeledOMSpline(90f, -180f, new int[0], OMSpline.COORDMODE_ORIGIN);
            break;
        default:
            g = new LabeledOMSpline(new int[0]);
        }
        ((LabeledOMSpline) g).setDoShapes(true);
        return g;
    }

    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 + -