?? actionprintxy.java
字號:
package com.zhtelecom.common.topograph.example.menuaction;
import javax.swing.AbstractAction;
import com.zhtelecom.common.topograph.TopoGraphView;
import java.awt.event.ActionEvent;
import com.zhtelecom.common.topograph.TopoNode;
public class ActionPrintXY extends AbstractAction
{
public void actionPerformed(ActionEvent e)
{
//之前已被賦值,這里獲取該拓撲對象。也可以通過TopoGraphView.getContextGraphView()快速獲取唯一實例。
TopoGraphView topoView = (TopoGraphView) getValue("topoGraphView");
java.util.Vector rs= topoView.getTopoDataSource().getAllTopoNode();
for(int i=0;i<rs.size();i++)
{
TopoNode node=(TopoNode) rs.get(i);
System.out.println(""+node+":X="+node.getX()+", Y="+node.getY());
}
}
public ActionPrintXY()
{
super("打印所有節(jié)點坐標");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -