filepropertiesaction.java
来自「具有不同语法高亮的编辑器实例」· Java 代码 · 共 69 行
JAVA
69 行
/*
* 12/08/2004
*
* FilePropertiesAction.java - Action to display the information on the
* current text area.
*/
package org.fife.rtext;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import javax.swing.KeyStroke;
import org.fife.ui.TextFilePropertiesDialog;
/**
* Action to display information on the current text area.
*
* @author Robert Futrell
* @version 1.0
*/
class FilePropertiesAction extends AbstractAction {
private RText rtext;
/*****************************************************************************/
/**
* Creates a new <code>FilePropertiesAction</code>.
*
* @param text The text associated with the action.
* @param icon The icon associated with the action.
* @param desc The description of the action (used in tooltips???).
* @param mnemonic The mnemonic for the action.
* @param accelerator The accelerator key for the action.
* @param rtext The <code>RText</code> that is displaying help.
*/
public FilePropertiesAction(String text, ImageIcon icon, String desc,
Integer mnemonic, KeyStroke accelerator, RText rtext) {
super(text, icon);
putValue(ACCELERATOR_KEY, accelerator);
putValue(SHORT_DESCRIPTION, desc);
putValue(MNEMONIC_KEY, mnemonic);
this.rtext = rtext;
}
/*****************************************************************************/
/**
* Callback routine called when user uses this component.
*
* @param e The action event.
*/
public void actionPerformed(ActionEvent e) {
TextFilePropertiesDialog dialog = new TextFilePropertiesDialog(
rtext, rtext.getMainView().currentTextArea);
dialog.setVisible(true);
dialog = null;
}
/*****************************************************************************/
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?