📄 abstractcomplexsearchframe.java
字号:
/* * File: AbstractComplexSearchFrame.java * Project: MPI Linguistic Application * Date: 02 May 2007 * * Copyright (C) 2001-2007 Max Planck Institute for Psycholinguistics * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */package mpi.search.content.viewer;import mpi.search.SearchLocale;import mpi.util.gui.SimpleHtmlViewer;import java.awt.event.ActionEvent;import java.awt.event.WindowAdapter;import java.awt.event.WindowEvent;import javax.swing.AbstractAction;import javax.swing.Action;import javax.swing.JDialog;import javax.swing.JFrame;import javax.swing.JMenu;import javax.swing.JMenuBar;/** * DOCUMENT ME! * $Id: jalopy_gnu_src_dist.xml,v 1.3 2007/02/06 13:30:33 hasloe Exp $ * @author $Author: hasloe $ * @version $Revision: 1.3 $ */public class AbstractComplexSearchFrame extends JFrame { private Action helpAction; /** Holds value of property DOCUMENT ME! */ protected final AbstractComplexSearchPanel searchPanel; /** Holds value of property DOCUMENT ME! */ public AbstractComplexSearchFrame(AbstractComplexSearchPanel searchPanel) { super(SearchLocale.getString("SearchDialog.Title")); this.searchPanel = searchPanel; getContentPane().add(searchPanel); createMenuBar(); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent event) { AbstractComplexSearchFrame.this.searchPanel.stopSearch(); } }); } private void createMenuBar() { helpAction = new AbstractAction(SearchLocale.getString("Action.Help")) { public void actionPerformed(ActionEvent e) { showInfoDialog(); } }; helpAction.putValue(Action.SHORT_DESCRIPTION, SearchLocale.getString("Action.Tooltip.Help")); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu(SearchLocale.getString("SearchDialog.File")); fileMenu.add(searchPanel.closeAction); menuBar.add(fileMenu); JMenu queryMenu = new JMenu(SearchLocale.getString("SearchDialog.Query")); queryMenu.add(searchPanel.startAction); queryMenu.add(searchPanel.zoomAction); queryMenu.addSeparator(); queryMenu.add(searchPanel.saveAction); queryMenu.add(searchPanel.readAction); queryMenu.add(searchPanel.exportAction); menuBar.add(queryMenu); JMenu helpMenu = new JMenu(SearchLocale.getString("SearchDialog.Help")); helpMenu.add(helpAction); menuBar.add(helpMenu); setJMenuBar(menuBar); } private void showInfoDialog() { JDialog infoDialog = new SimpleHtmlViewer(this, "Search Info", false, "/mpi/eudico/client/annotator/resources/SearchHelp.html"); infoDialog.pack(); infoDialog.setSize(600, 400); infoDialog.setVisible(true); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -