appendpositionaction.java

来自「world wind java sdk 源码」· Java 代码 · 共 41 行

JAVA
41
字号
/*Copyright (C) 2001, 2007 United States Governmentas represented by the Administrator of theNational Aeronautics and Space Administration.All Rights Reserved.*/package gov.nasa.worldwind.applications.sar;import javax.swing.*;import java.awt.event.*;/** * @author tag * @version $Id: AppendPositionAction.java 3877 2007-12-11 02:19:06Z tgaskins $ */public class AppendPositionAction extends AbstractAction{    protected final PositionTable table;    public AppendPositionAction(final PositionTable table)    {        this.table = table;        putValue(NAME, "Append New Position to Track");        putValue(LONG_DESCRIPTION, "Add a new position to the end of the Track");    }    public void actionPerformed(ActionEvent e)    {        SARTrack st = table.getSarTrack();        if (st == null)            return;        if (st.size() != 0)            st.appendPosition(st.get(st.size() - 1));        else            st.appendPosition(new SARPosition());        table.getSelectionModel().setSelectionInterval(st.size() - 1, st.size() -1);    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?