XMImage.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:geomapapp 作者:
public void copy() {
    StringBuffer sb = new StringBuffer();
    sb.append(tempInfo);
    Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
    String tempString = sb.toString();
    tempString = tempString.replaceAll("zoom.+","");
    tempString = tempString.replaceAll("[\\(\\)=,\\w&&[^WESN\\d]]+","");
    String [] result = tempString.split("\\s+");
    tempString = "";
    for ( int i =0; i < result.length; i++ ) {
        if ( result[i].indexOf("\u00B0") != -1 && result[i].indexOf("\u00B4") == -1 ) {
            result[i] = result[i].replaceAll("\\u00B0","");
        }
        if ( i == 2 ) {
            if ( result[i].indexOf("W") != -1 ) {
                result[i] = "-" + result[i];
            }
            result[i] = result[i].replaceAll("[WE]","");
        }
        else if ( i == 3 ) {
            if ( result[i].indexOf("S") != -1 ) {
                result[i] = "-" + result[i];
            }
            result[i] = result[i].replaceAll("[NS]","");
        }
        tempString += result[i] + "\t";
    }
    tempString = tempString.trim();
    tempString = line.getCruiseID().trim() + "\t" + line.getID().trim() + "\t" + currentTime/1000.0 + "\t" + currentCDP + "\t" + tempString;
    StringSelection ss = new StringSelection(tempString + "\n");
    c.setContents(ss, ss);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号