📄 p2pviewer.java
字号:
package net.sf.p2pim.jxta;
import java.util.logging.Level;
import net.jxta.myjxta.Main;
import net.jxta.myjxta.MyJXTA;
import net.jxta.myjxta.View;
import net.jxta.myjxta.ViewFactory;
import net.jxta.myjxta.Viewer;
/**
* @author levin
* @since 2007-11-1
*/
public class P2PViewer implements Viewer {
public static int viewID=1; //视图的id
private View view = null;
private static P2PViewer instance=null;
public P2PViewer() {
instance=this;
}
public View getView(MyJXTA myjxta) {
if(view == null)
view=new P2PView(myjxta);
return view;
}
public static void main(String[] args) {
Thread.currentThread().setName(Main.class.getName() + ".main()");
if (System.getProperty("net.jxta.logging.Logging") == null)
System.setProperty("net.jxta.logging.Logging", Level.SEVERE.getName());
System.setProperty("net.jxta.myjxta", Level.SEVERE.getName());
ViewFactory.setViewerClass(P2PViewer.class);
MyJXTA.startMyJxta();
}
public static P2PViewer getInstance() {
return instance;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -