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

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

?? labeledomspline.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
字號:
package com.bbn.openmap.omGraphics.labeled;

import java.awt.Font;
import java.awt.Paint;
import java.awt.Point;

import com.bbn.openmap.omGraphics.OMSpline;
import com.bbn.openmap.omGraphics.OMText;
import com.bbn.openmap.omGraphics.labeled.LabeledOMGraphic;
import com.bbn.openmap.proj.Projection;
import com.bbn.openmap.util.Debug;

/**
 * LabeledOMSpline Copied from LabeledOMPoly, because both OMSpline
 * and LabeledOMPoly inherits from OMPoly
 * 
 * @author Eric LEPICIER
 * @version 15 juil. 2002
 */
public class LabeledOMSpline extends OMSpline implements LabeledOMGraphic {

    protected OMText label;
    protected Point offset;
    protected boolean locateAtCenter = false;
    protected int index = 0;

    /**
     * Default constructor.
     */
    public LabeledOMSpline() {
        super();
    }

    /**
     * Create an LabeledOMSpline from a list of float lat/lon pairs.
     */
    public LabeledOMSpline(float[] llPoints, int units, int lType) {
        super(llPoints, units, lType);
    }

    /**
     * Create an LabeledOMSpline from a list of float lat/lon pairs.
     */
    public LabeledOMSpline(float[] llPoints, int units, int lType, int nsegs) {
        super(llPoints, units, lType, nsegs);
    }

    /**
     * Create an LabeledOMSpline from a list of xy pairs.
     */
    public LabeledOMSpline(int[] xypoints) {
        super(xypoints);
    }

    /**
     * Create an x/y LabeledOMSpline.
     */
    public LabeledOMSpline(int[] xPoints, int[] yPoints) {
        super(xPoints, yPoints);
    }

    /**
     * Create an x/y LabeledOMSpline at an offset from lat/lon.
     */
    public LabeledOMSpline(float latPoint, float lonPoint, int[] xypoints,
            int cMode) {
        super(latPoint, lonPoint, xypoints, cMode);
    }

    /**
     * Create an x/y LabeledOMSpline at an offset from lat/lon.
     */
    public LabeledOMSpline(float latPoint, float lonPoint, int[] xPoints,
            int[] yPoints, int cMode) {
        super(latPoint, lonPoint, xPoints, yPoints, cMode);
    }

    /**
     * Set the String for the label.
     */
    public void setText(String label) {
        getLabel().setData(label);
    }

    /**
     * Get the String for the label.
     */
    public String getText() {
        return getLabel().getData();
    }

    protected OMText getLabel() {
        if (label == null) {
            label = new OMText(-1, -1, "", OMText.JUSTIFY_LEFT);
        }
        return label;
    }

    /**
     * Set the Font for the label.
     */
    public void setFont(Font f) {
        getLabel().setFont(f);
    }

    /**
     * Get the Font for the label.
     */
    public Font getFont() {
        return getLabel().getFont();
    }

    /**
     * Set the justification setting for the label.
     * 
     * @see com.bbn.openmap.omGraphics.OMText#JUSTIFY_LEFT
     * @see com.bbn.openmap.omGraphics.OMText#JUSTIFY_CENTER
     * @see com.bbn.openmap.omGraphics.OMText#JUSTIFY_RIGHT
     */
    public void setJustify(int just) {
        getLabel().setJustify(just);
    }

    /**
     * Get the justification setting for the label.
     * 
     * @see com.bbn.openmap.omGraphics.OMText#JUSTIFY_LEFT
     * @see com.bbn.openmap.omGraphics.OMText#JUSTIFY_CENTER
     * @see com.bbn.openmap.omGraphics.OMText#JUSTIFY_RIGHT
     */
    public int getJustify() {
        return getLabel().getJustify();
    }

    /**
     * Tell the LabeledOMGraphic to calculate the location of the
     * String that would put it in the middle of the OMGraphic.
     */
    public void setLocateAtCenter(boolean set) {
        locateAtCenter = set;
        if (set) {
            setJustify(OMText.JUSTIFY_CENTER);
            getLabel().setFMHeight(OMText.ASCENT);
        }
    }

    /**
     * Get whether the LabeledOMGraphic is placing the label String in
     * the center of the OMGraphic.
     */
    public boolean isLocateAtCenter() {
        return locateAtCenter;
    }

    /**
     * Get the calculated center where the label string is drawn.
     */
    public Point getCenter() {
        return new Point();
    }

    /**
     * Set the index of the OMGraphic coordinates where the drawing
     * point of the label should be attached. The meaning of the point
     * differs between OMGraphic types.
     */
    public void setIndex(int index) {
        this.index = index;
    }

    /**
     * Get the index of the OMGraphic where the String will be
     * rendered. The meaning of the index differs from OMGraphic type
     * to OMGraphic type.
     */
    public int getIndex() {
        return index;
    }

    /**
     * Set the x, y pixel offsets where the String should be rendered,
     * from the location determined from the index point, or from the
     * calculated center point. Point.x is the horizontal offset,
     * Point.y is the vertical offset.
     */
    public void setOffset(Point p) {
        offset = p;
    }

    /**
     * Get the x, y pixel offsets set for the rendering of the point.
     */
    public Point getOffset() {
        if (offset == null) {
            offset = new Point();
        }
        return offset;
    }

    /**
     * Set the angle by which the text is to rotated.
     * 
     * @param angle the number of radians the text is to be rotated.
     *        Measured clockwise from horizontal. Positive numbers
     *        move the positive x axis toward the positive y axis.
     */
    public void setRotationAngle(double angle) {
        getLabel().setRotationAngle(angle);
    }

    /**
     * Get the current rotation of the text.
     * 
     * @return the text rotation.
     */
    public double getRotationAngle() {
        return getLabel().getRotationAngle();
    }

    boolean matchPolyPaint = true;

    /**
     * Set the line paint for the polygon. If the text paint hasn't
     * been explicitly set, then the text paint will be set to this
     * paint, too.
     */
    public void setLinePaint(Paint paint) {
        super.setLinePaint(paint);
        if (matchPolyPaint) {
            getLabel().setLinePaint(paint);
        }
    }

    /**
     * If not set to null, the text will be painted in a different
     * color. If set to null, the text paint will match the poly edge
     * paint.
     * 
     * @param paint the Paint object for the text
     */
    public void setTextPaint(Paint paint) {
        if (paint != null) {
            matchPolyPaint = false;
            getLabel().setLinePaint(paint);
        }
    }

    Point handyPoint = new Point();

    protected Point getTextPoint(Projection proj) {
        int i;
        int avgx = 0;
        int avgy = 0;

        // Assuming that the rendertype is not unknown...
        if (renderType == RENDERTYPE_LATLON) {
            int numPoints = rawllpts.length / 2;
            if (rawllpts.length < 2) {
                // off screen...
                handyPoint.setLocation(-10, -10);
                return handyPoint;
            }
            if (locateAtCenter) {
                for (i = 0; i < rawllpts.length; i += 2) {
                    proj.forward(rawllpts[i], rawllpts[i + 1], handyPoint, true);

                    avgy += handyPoint.getY();
                    avgx += handyPoint.getX();
                }
                avgy = avgy / numPoints;
                avgx = avgx / numPoints;
                handyPoint.setLocation(avgx, avgy);
            } else {
                if (index < 0)
                    index = 0;
                if (index > numPoints)
                    index = numPoints - 1;
                proj.forward(rawllpts[2 * index],
                        rawllpts[2 * index + 1],
                        handyPoint,
                        true);
            }
        } else {
            int[][] x = xpoints;
            int[][] y = ypoints;

            if (x[0].length < 2) {
                // off screen...
                handyPoint.setLocation(-10, -10);
                return handyPoint;
            }

            if (locateAtCenter) {
                for (i = 0; i < x[0].length; i++) {
                    avgx += x[0][i];
                    avgy += y[0][i];
                }
                handyPoint.setLocation(avgx / x[0].length, avgy / x[0].length);
            } else {
                if (index < 0)
                    index = 0;
                if (index >= x[0].length)
                    index = x[0].length - 1;
                handyPoint.setLocation(x[0][index], y[0][index]);
            }
        }
        return handyPoint;
    }

    public boolean generate(Projection proj) {
        boolean ret = super.generate(proj);

        Point p = getTextPoint(proj);
        label.setX((int) (p.getX() + getOffset().getX()));
        label.setY((int) (p.getY() + getOffset().getY()));

        if (Debug.debugging("labeled")) {
            Debug.output("Setting label(" + label.getData() + ") to " + p);
        }

        label.generate(proj);
        return ret;
    }

    public void render(java.awt.Graphics g) {
        super.render(g);
        label.render(g);
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区四区在线| 不卡在线观看av| 国产成人一区在线| 在线观看视频一区二区| 国产偷v国产偷v亚洲高清| 亚洲三级在线看| 国产一区二区三区最好精华液| 成人av集中营| 欧美激情自拍偷拍| 精品一区二区三区在线观看国产| 欧美三日本三级三级在线播放| 国产精品视频免费看| 成人自拍视频在线观看| 日韩精品一区二区三区swag| 性做久久久久久免费观看 | 视频一区免费在线观看| 99久精品国产| 国产精品视频麻豆| 国产一区二区剧情av在线| 欧美一级久久久| 日本不卡123| 欧美一区二区在线播放| 午夜国产精品影院在线观看| 欧美午夜精品一区二区蜜桃| 亚洲日本免费电影| 97se亚洲国产综合自在线| 国产精品久线在线观看| www.日韩在线| 亚洲免费在线播放| 色综合久久久久久久久| 亚洲美女少妇撒尿| 欧美性大战xxxxx久久久| 一区二区三区四区在线| 欧美调教femdomvk| 香港成人在线视频| 在线综合+亚洲+欧美中文字幕| 免费在线成人网| 欧美精品一区二区三区蜜桃| 国产激情91久久精品导航| 国产精品欧美一区喷水| 97aⅴ精品视频一二三区| 亚洲精品中文在线| 欧美色国产精品| 久久99久久精品欧美| 国产午夜精品一区二区三区四区| www.欧美.com| 亚洲综合999| 日韩欧美123| 成人小视频免费在线观看| 亚洲人成网站精品片在线观看| 欧美性猛交xxxxxxxx| 毛片av中文字幕一区二区| 久久久高清一区二区三区| a亚洲天堂av| 天天色天天爱天天射综合| 精品福利视频一区二区三区| 成人ar影院免费观看视频| 亚洲一区二区三区四区五区黄| 欧美一级欧美三级在线观看 | 色综合久久久久久久久久久| 亚洲国产日韩综合久久精品| 精品国产髙清在线看国产毛片| 波多野结衣亚洲| 日韩国产在线观看| 国产婷婷精品av在线| 欧美三级视频在线播放| 国产在线播放一区| 洋洋成人永久网站入口| 久久亚洲影视婷婷| 91久久精品国产91性色tv| 激情图区综合网| 一区二区三区中文字幕精品精品 | 韩国一区二区三区| 成人欧美一区二区三区| 欧美一区二区三区免费大片| 风间由美中文字幕在线看视频国产欧美| 亚洲乱码国产乱码精品精可以看| 日韩免费高清电影| 一本久久a久久精品亚洲| 国产成人丝袜美腿| 天天亚洲美女在线视频| 亚洲欧美日韩中文字幕一区二区三区| 8v天堂国产在线一区二区| av电影在线观看一区| 麻豆国产欧美一区二区三区| 伊人色综合久久天天人手人婷| 精品美女一区二区三区| 欧美日韩国产综合一区二区 | 91精品国产91综合久久蜜臀| 91污在线观看| 高清国产一区二区三区| 久久精品国产精品青草| 亚洲一区二区不卡免费| 国产精品久久久久四虎| 久久亚洲春色中文字幕久久久| 欧美午夜精品久久久久久超碰| 懂色一区二区三区免费观看| 久久99精品国产麻豆婷婷| 视频一区二区国产| 亚洲丰满少妇videoshd| 一区二区三区中文字幕电影| 中文字幕一区二区不卡| 欧美国产精品专区| 国产亚洲欧美日韩在线一区| 日韩欧美高清一区| 日韩欧美黄色影院| 日韩一级免费观看| 91精品国产色综合久久ai换脸| 欧美日韩视频在线第一区| 欧美主播一区二区三区| 色天天综合色天天久久| 99久久精品久久久久久清纯| 成人福利视频网站| 99视频国产精品| 91一区二区三区在线播放| 色综合色综合色综合| 99精品视频在线观看免费| gogo大胆日本视频一区| 99久久久免费精品国产一区二区| 欧美性淫爽ww久久久久无| 97se亚洲国产综合自在线不卡 | 一区二区在线免费| 亚洲一区二区不卡免费| 日韩极品在线观看| 美女www一区二区| 国产一区二区在线观看免费| 高清不卡在线观看| 99精品视频一区二区| 欧美亚洲禁片免费| 91麻豆精品国产91久久久久| 在线成人免费视频| 日韩免费电影一区| 国产日韩精品一区二区浪潮av| 欧美韩国一区二区| 亚洲精品成人少妇| 日韩av不卡一区二区| 久久精品国产在热久久| 国产精品亚洲专一区二区三区 | 丁香六月综合激情| 色综合久久六月婷婷中文字幕| 欧美三级日本三级少妇99| 日韩丝袜美女视频| 欧美激情自拍偷拍| 亚洲成a天堂v人片| 国产精品69毛片高清亚洲| 色婷婷av一区二区三区gif| 日韩一级完整毛片| 国产精品嫩草影院com| 亚洲午夜久久久久久久久电影院| 美女在线视频一区| 色婷婷国产精品| 欧美大片在线观看| 亚洲免费在线播放| 捆绑调教美女网站视频一区| 91免费在线播放| 日韩视频在线观看一区二区| 中文字幕日本乱码精品影院| 五月天中文字幕一区二区| 成人综合婷婷国产精品久久| 欧美男同性恋视频网站| 中文字幕一区二区三区精华液 | 精品国产一区二区三区四区四 | 久久99精品久久久久久国产越南| 成人av第一页| 日韩欧美你懂的| 一区二区三区在线观看动漫| 国产精品主播直播| 在线成人av网站| 亚洲欧洲国产日韩| 国产精品综合久久| 欧美一区二区免费| 亚洲午夜精品在线| 99视频精品全部免费在线| www一区二区| 麻豆国产精品777777在线| 欧美性色综合网| 亚洲视频一区在线| 国产91精品露脸国语对白| 精品国产百合女同互慰| 图片区日韩欧美亚洲| 色偷偷久久人人79超碰人人澡 | 午夜久久久久久久久| 91一区二区三区在线播放| 久久久精品日韩欧美| 免费在线一区观看| 欧美日韩国产免费一区二区| 一区二区三区日韩| 91在线国产福利| 日本一区二区三区在线观看| 日韩—二三区免费观看av| 欧美在线999| 亚洲综合免费观看高清完整版在线 | 91精品国产综合久久精品麻豆| 亚洲色图清纯唯美| 99国内精品久久| 中文字幕亚洲一区二区av在线| 国产 欧美在线| 中文字幕制服丝袜成人av| 成人高清在线视频| 中文字幕中文字幕一区|