googlesearchable.java.svn-base
来自「开源项目openfire的完整源程序」· SVN-BASE 代码 · 共 51 行
SVN-BASE
51 行
/**
* $RCSfile: ,v $
* $Revision: 1.0 $
* $Date: 2005/05/25 04:20:03 $
*
* Copyright (C) 1999-2005 Jive Software. All rights reserved.
*
* This software is the proprietary information of Jive Software. Use is
subject to license terms.
*/
package org.jivesoftware.spark.plugin;
import org.jivesoftware.spark.search.Searchable;
import java.net.URL;
import java.util.Collection;
import javax.swing.Icon;
import javax.swing.ImageIcon;
public class GoogleSearchable implements Searchable {
public Icon getIcon() {
ClassLoader cl = getClass().getClassLoader();
URL url = cl.getResource("images/google.gif");
return new ImageIcon(url);
}
public String getName() {
return "Google";
}
public String getDefaultText() {
return "Find Documents on your computer.";
}
public String getToolTip() {
return "Search for documents on your computer using Google Desktop.";
}
public void search(String query) {
GoogleSearch search = new GoogleSearch();
Collection list = search.searchDocuments(query);
GoogleFileViewer viewer = new GoogleFileViewer();
viewer.viewFiles(list, true);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?