亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? inputhandler.java

?? jedit中獨立出來的語法高亮組件
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * InputHandler.java - Manages key bindings and executes actions * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */package org.syntax.jedit;import javax.swing.text.*;import javax.swing.JPopupMenu;import java.awt.event.*;import java.awt.Component;import java.util.*;/** * An input handler converts the user's key strokes into concrete actions. * It also takes care of macro recording and action repetition.<p> * * This class provides all the necessary support code for an input * handler, but doesn't actually do any key binding logic. It is up * to the implementations of this class to do so. *  * @author Slava Pestov * @version $Id: InputHandler.java,v 1.14 1999/12/13 03:40:30 sp Exp $ * @see org.syntax.jedit.DefaultInputHandler *  * 08/12/2002	Clipboard actions	(Oliver Henning) */public abstract class InputHandler extends KeyAdapter{	/**	 * If this client property is set to Boolean.TRUE on the text area,	 * the home/end keys will support 'smart' BRIEF-like behaviour	 * (one press = start/end of line, two presses = start/end of	 * viewscreen, three presses = start/end of document). By default,	 * this property is not set.	 */	public static final String SMART_HOME_END_PROPERTY = "InputHandler.homeEnd";	public static final ActionListener BACKSPACE = new backspace();	public static final ActionListener BACKSPACE_WORD = new backspace_word();	public static final ActionListener DELETE = new delete();	public static final ActionListener DELETE_WORD = new delete_word();	public static final ActionListener END = new end(false);	public static final ActionListener DOCUMENT_END = new document_end(false);	public static final ActionListener SELECT_ALL = new select_all();	public static final ActionListener SELECT_END = new end(true);	public static final ActionListener SELECT_DOC_END = new document_end(true);	public static final ActionListener INSERT_BREAK = new insert_break();	public static final ActionListener INSERT_TAB = new insert_tab();	public static final ActionListener HOME = new home(false);	public static final ActionListener DOCUMENT_HOME = new document_home(false);	public static final ActionListener SELECT_HOME = new home(true);	public static final ActionListener SELECT_DOC_HOME = new document_home(true);	public static final ActionListener NEXT_CHAR = new next_char(false);	public static final ActionListener NEXT_LINE = new next_line(false);	public static final ActionListener NEXT_PAGE = new next_page(false);	public static final ActionListener NEXT_WORD = new next_word(false);	public static final ActionListener SELECT_NEXT_CHAR = new next_char(true);	public static final ActionListener SELECT_NEXT_LINE = new next_line(true);	public static final ActionListener SELECT_NEXT_PAGE = new next_page(true);	public static final ActionListener SELECT_NEXT_WORD = new next_word(true);	public static final ActionListener OVERWRITE = new overwrite();	public static final ActionListener PREV_CHAR = new prev_char(false);	public static final ActionListener PREV_LINE = new prev_line(false);	public static final ActionListener PREV_PAGE = new prev_page(false);	public static final ActionListener PREV_WORD = new prev_word(false);	public static final ActionListener SELECT_PREV_CHAR = new prev_char(true);	public static final ActionListener SELECT_PREV_LINE = new prev_line(true);	public static final ActionListener SELECT_PREV_PAGE = new prev_page(true);	public static final ActionListener SELECT_PREV_WORD = new prev_word(true);	public static final ActionListener REPEAT = new repeat();	public static final ActionListener TOGGLE_RECT = new toggle_rect();	// Clipboard	public static final ActionListener CLIP_COPY = new clip_copy();	public static final ActionListener CLIP_PASTE = new clip_paste();	public static final ActionListener CLIP_CUT = new clip_cut();	// Default action	public static final ActionListener INSERT_CHAR = new insert_char();	private static Hashtable actions;	static	{		actions = new Hashtable();		actions.put("backspace",BACKSPACE);		actions.put("backspace-word",BACKSPACE_WORD);		actions.put("delete",DELETE);		actions.put("delete-word",DELETE_WORD);		actions.put("end",END);		actions.put("select-all",SELECT_ALL);		actions.put("select-end",SELECT_END);		actions.put("document-end",DOCUMENT_END);		actions.put("select-doc-end",SELECT_DOC_END);		actions.put("insert-break",INSERT_BREAK);		actions.put("insert-tab",INSERT_TAB);		actions.put("home",HOME);		actions.put("select-home",SELECT_HOME);		actions.put("document-home",DOCUMENT_HOME);		actions.put("select-doc-home",SELECT_DOC_HOME);		actions.put("next-char",NEXT_CHAR);		actions.put("next-line",NEXT_LINE);		actions.put("next-page",NEXT_PAGE);		actions.put("next-word",NEXT_WORD);		actions.put("select-next-char",SELECT_NEXT_CHAR);		actions.put("select-next-line",SELECT_NEXT_LINE);		actions.put("select-next-page",SELECT_NEXT_PAGE);		actions.put("select-next-word",SELECT_NEXT_WORD);		actions.put("overwrite",OVERWRITE);		actions.put("prev-char",PREV_CHAR);		actions.put("prev-line",PREV_LINE);		actions.put("prev-page",PREV_PAGE);		actions.put("prev-word",PREV_WORD);		actions.put("select-prev-char",SELECT_PREV_CHAR);		actions.put("select-prev-line",SELECT_PREV_LINE);		actions.put("select-prev-page",SELECT_PREV_PAGE);		actions.put("select-prev-word",SELECT_PREV_WORD);		actions.put("repeat",REPEAT);		actions.put("toggle-rect",TOGGLE_RECT);		actions.put("insert-char",INSERT_CHAR);		actions.put("clipboard-copy",CLIP_COPY);		actions.put("clipboard-paste",CLIP_PASTE);		actions.put("clipboard-cut",CLIP_CUT);	}	/**	 * Returns a named text area action.	 * @param name The action name	 */	public static ActionListener getAction(String name)	{		return (ActionListener)actions.get(name);	}	/**	 * Returns the name of the specified text area action.	 * @param listener The action	 */	public static String getActionName(ActionListener listener)	{		Enumeration enum = getActions();		while(enum.hasMoreElements())		{			String name = (String)enum.nextElement();			ActionListener _listener = getAction(name);			if(_listener == listener)				return name;		}		return null;	}	/**	 * Returns an enumeration of all available actions.	 */	public static Enumeration getActions()	{		return actions.keys();	}	/**	 * Adds the default key bindings to this input handler.	 * This should not be called in the constructor of this	 * input handler, because applications might load the	 * key bindings from a file, etc.	 */	public abstract void addDefaultKeyBindings();	/**	 * Adds a key binding to this input handler.	 * @param keyBinding The key binding (the format of this is	 * input-handler specific)	 * @param action The action	 */	public abstract void addKeyBinding(String keyBinding, ActionListener action);	/**	 * Removes a key binding from this input handler.	 * @param keyBinding The key binding	 */	public abstract void removeKeyBinding(String keyBinding);	/**	 * Removes all key bindings from this input handler.	 */	public abstract void removeAllKeyBindings();	/**	 * Grabs the next key typed event and invokes the specified	 * action with the key as a the action command.	 * @param action The action	 */	public void grabNextKeyStroke(ActionListener listener)	{		grabAction = listener;	}	/**	 * Returns if repeating is enabled. When repeating is enabled,	 * actions will be executed multiple times. This is usually	 * invoked with a special key stroke in the input handler.	 */	public boolean isRepeatEnabled()	{		return repeat;	}	/**	 * Enables repeating. When repeating is enabled, actions will be	 * executed multiple times. Once repeating is enabled, the input	 * handler should read a number from the keyboard.	 */	public void setRepeatEnabled(boolean repeat)	{		this.repeat = repeat;	}	/**	 * Returns the number of times the next action will be repeated.	 */	public int getRepeatCount()	{		return (repeat ? Math.max(1,repeatCount) : 1);	}	/**	 * Sets the number of times the next action will be repeated.	 * @param repeatCount The repeat count	 */	public void setRepeatCount(int repeatCount)	{		this.repeatCount = repeatCount;	}	/**	 * Returns the macro recorder. If this is non-null, all executed	 * actions should be forwarded to the recorder.	 */	public InputHandler.MacroRecorder getMacroRecorder()	{		return recorder;	}	/**	 * Sets the macro recorder. If this is non-null, all executed	 * actions should be forwarded to the recorder.	 * @param recorder The macro recorder	 */	public void setMacroRecorder(InputHandler.MacroRecorder recorder)	{		this.recorder = recorder;	}	/**	 * Returns a copy of this input handler that shares the same	 * key bindings. Setting key bindings in the copy will also	 * set them in the original.	 */	public abstract InputHandler copy();	/**	 * Executes the specified action, repeating and recording it as	 * necessary.	 * @param listener The action listener	 * @param source The event source	 * @param actionCommand The action command	 */	public void executeAction(ActionListener listener, Object source,		String actionCommand)	{		// create event		ActionEvent evt = new ActionEvent(source,			ActionEvent.ACTION_PERFORMED,			actionCommand);		// don't do anything if the action is a wrapper		// (like EditAction.Wrapper)		if(listener instanceof Wrapper)		{			listener.actionPerformed(evt);			return;		}		// remember old values, in case action changes them		boolean _repeat = repeat;		int _repeatCount = getRepeatCount();		// execute the action		if(listener instanceof InputHandler.NonRepeatable)			listener.actionPerformed(evt);		else		{			for(int i = 0; i < Math.max(1,repeatCount); i++)				listener.actionPerformed(evt);		}		// do recording. Notice that we do no recording whatsoever		// for actions that grab keys		if(grabAction == null)		{			if(recorder != null)			{				if(!(listener instanceof InputHandler.NonRecordable))				{					if(_repeatCount != 1)						recorder.actionPerformed(REPEAT,String.valueOf(_repeatCount));					recorder.actionPerformed(listener,actionCommand);				}			}			// If repeat was true originally, clear it			// Otherwise it might have been set by the action, etc			if(_repeat)			{				repeat = false;				repeatCount = 0;			}		}	}	/**	 * Returns the text area that fired the specified event.	 * @param evt The event	 */	public static JEditTextArea getTextArea(EventObject evt)	{		if(evt != null)		{			Object o = evt.getSource();			if(o instanceof Component)			{				// find the parent text area				Component c = (Component)o;				for(;;)				{					if(c instanceof JEditTextArea)						return (JEditTextArea)c;					else if(c == null)						break;					if(c instanceof JPopupMenu)						c = ((JPopupMenu)c)							.getInvoker();					else						c = c.getParent();				}			}		}		// this shouldn't happen		System.err.println("BUG: getTextArea() returning null");		System.err.println("Report this to Slava Pestov <sp@gjt.org>");		return null;	}	// protected members	/**	 * If a key is being grabbed, this method should be called with	 * the appropriate key event. It executes the grab action with	 * the typed character as the parameter.	 */	protected void handleGrabAction(KeyEvent evt)	{		// Clear it *before* it is executed so that executeAction()		// resets the repeat count		ActionListener _grabAction = grabAction;		grabAction = null;		executeAction(_grabAction,evt.getSource(),			String.valueOf(evt.getKeyChar()));	}	// protected members	protected ActionListener grabAction;	protected boolean repeat;	protected int repeatCount;	protected InputHandler.MacroRecorder recorder;	/**	 * If an action implements this interface, it should not be repeated.	 * Instead, it will handle the repetition itself.	 */	public interface NonRepeatable {}	/**	 * If an action implements this interface, it should not be recorded	 * by the macro recorder. Instead, it will do its own recording.	 */	public interface NonRecordable {}	/**	 * For use by EditAction.Wrapper only.	 * @since jEdit 2.2final	 */	public interface Wrapper {}	/**	 * Macro recorder.	 */	public interface MacroRecorder	{		void actionPerformed(ActionListener listener,			String actionCommand);	}	public static class backspace implements ActionListener	{		public void actionPerformed(ActionEvent evt)		{			JEditTextArea textArea = getTextArea(evt);			if(!textArea.isEditable())			{				textArea.getToolkit().beep();				return;			}			if(textArea.getSelectionStart()			   != textArea.getSelectionEnd())			{				textArea.setSelectedText("");			}			else			{				int caret = textArea.getCaretPosition();				if(caret == 0)				{					textArea.getToolkit().beep();					return;				}				try				{					textArea.getDocument().remove(caret - 1,1);				}				catch(BadLocationException bl)				{					bl.printStackTrace();				}			}		}	}	public static class backspace_word implements ActionListener	{		public void actionPerformed(ActionEvent evt)		{			JEditTextArea textArea = getTextArea(evt);			int start = textArea.getSelectionStart();			if(start != textArea.getSelectionEnd())			{				textArea.setSelectedText("");			}			int line = textArea.getCaretLine();			int lineStart = textArea.getLineStartOffset(line);			int caret = start - lineStart;			String lineText = textArea.getLineText(textArea				.getCaretLine());			if(caret == 0)			{				if(lineStart == 0)				{					textArea.getToolkit().beep();					return;				}				caret--;			}			else			{				String noWordSep = (String)textArea.getDocument().getProperty("noWordSep");				caret = TextUtilities.findWordStart(lineText,caret,noWordSep);			}			try			{				textArea.getDocument().remove(						caret + lineStart,						start - (caret + lineStart));			}			catch(BadLocationException bl)			{				bl.printStackTrace();			}		}	}	public static class delete implements ActionListener	{		public void actionPerformed(ActionEvent evt)		{			JEditTextArea textArea = getTextArea(evt);			if(!textArea.isEditable())			{				textArea.getToolkit().beep();				return;			}			if(textArea.getSelectionStart()			   != textArea.getSelectionEnd())			{				textArea.setSelectedText("");			}			else			{				int caret = textArea.getCaretPosition();				if(caret == textArea.getDocumentLength())				{					textArea.getToolkit().beep();					return;				}				try				{					textArea.getDocument().remove(caret,1);				}				catch(BadLocationException bl)				{					bl.printStackTrace();				}			}		}	}	public static class delete_word implements ActionListener	{		public void actionPerformed(ActionEvent evt)		{			JEditTextArea textArea = getTextArea(evt);			int start = textArea.getSelectionStart();			if(start != textArea.getSelectionEnd())			{				textArea.setSelectedText("");			}			int line = textArea.getCaretLine();			int lineStart = textArea.getLineStartOffset(line);			int caret = start - lineStart;			String lineText = textArea.getLineText(textArea				.getCaretLine());			if(caret == lineText.length())			{				if(lineStart + caret == textArea.getDocumentLength())				{					textArea.getToolkit().beep();					return;				}				caret++;			}			else			{				String noWordSep = (String)textArea.getDocument().getProperty("noWordSep");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区二区三区蜜桃视频| 激情亚洲综合在线| 日本一区二区三区在线观看| 欧美一区二视频| 久久尤物电影视频在线观看| 欧美亚洲丝袜传媒另类| 91免费国产在线| 欧洲在线/亚洲| 欧美日韩在线观看一区二区| 欧美三级中文字幕在线观看| 欧美日韩一级二级三级| 欧美日韩国产高清一区二区三区| 在线国产电影不卡| 在线国产电影不卡| 日韩一区二区中文字幕| 欧美成人伊人久久综合网| 精品日本一线二线三线不卡| 久久精品人人做人人综合| 久久日一线二线三线suv| 中文成人av在线| 亚洲美女区一区| 亚洲福利一二三区| 久久电影国产免费久久电影| 国产精品综合在线视频| av一区二区三区| 欧美日韩在线电影| 久久免费精品国产久精品久久久久| 久久精品一区二区三区四区| 中文字幕在线一区| 日韩激情在线观看| 成人国产精品免费观看动漫| 91久久精品国产91性色tv| 欧美日免费三级在线| 日韩一级精品视频在线观看| 国产日韩成人精品| 亚洲国产成人精品视频| 另类小说综合欧美亚洲| 99麻豆久久久国产精品免费优播| 欧美日韩精品一区二区三区蜜桃| 精品少妇一区二区三区视频免付费 | 综合久久给合久久狠狠狠97色| 一区二区三区欧美久久| 精品一区二区三区香蕉蜜桃 | 国产精品福利影院| 日韩av午夜在线观看| k8久久久一区二区三区 | 国产精品一区免费在线观看| 色欧美日韩亚洲| 久久久久久久电影| 亚洲不卡av一区二区三区| 成人综合日日夜夜| 日韩免费看网站| 亚洲一区二区三区四区的| 国产一区二区精品在线观看| 欧美高清视频不卡网| 亚洲国产精品精华液ab| 美脚の诱脚舐め脚责91| 欧美日韩中文字幕一区| 亚洲乱码国产乱码精品精的特点| 国产精品自拍av| 欧美成人女星排行榜| 亚洲亚洲精品在线观看| 色综合天天综合给合国产| 国产视频911| 国产毛片一区二区| 2021中文字幕一区亚洲| 免费高清在线一区| 日韩午夜精品电影| 免费人成黄页网站在线一区二区| 在线视频你懂得一区| 国产精品久久久久一区二区三区共 | 久久久精品天堂| 久久精品国产精品亚洲精品| 欧美群妇大交群的观看方式| 一区二区三区久久| 欧美少妇性性性| 亚洲欧美国产毛片在线| 色婷婷久久一区二区三区麻豆| 国产精品理论在线观看| 粉嫩嫩av羞羞动漫久久久 | 怡红院av一区二区三区| 99久久国产综合色|国产精品| 久久夜色精品国产噜噜av| 免费在线观看一区二区三区| 日韩一二在线观看| 精品在线免费观看| 国产网红主播福利一区二区| 国产寡妇亲子伦一区二区| 国产日韩欧美激情| 91女厕偷拍女厕偷拍高清| 一区2区3区在线看| 91.com在线观看| 黄色日韩网站视频| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 一区二区三区日韩| 6080国产精品一区二区| 精品一区二区三区影院在线午夜| 国产欧美精品一区二区三区四区 | 国产精品久久夜| 欧美专区在线观看一区| 蜜臀久久99精品久久久久宅男| 亚洲精品在线观看视频| 丁香五精品蜜臀久久久久99网站 | 91丨porny丨蝌蚪视频| 亚洲二区视频在线| 国产亚洲综合性久久久影院| 99精品久久只有精品| 亚洲成人手机在线| 久久精品在这里| 日本福利一区二区| 国产综合色视频| 亚洲品质自拍视频网站| 日韩三级视频中文字幕| 成人av网站免费| 麻豆一区二区99久久久久| 国产精品国产a| 日韩片之四级片| 91视频免费观看| 国产乱人伦偷精品视频不卡| 亚洲综合久久久| 国产调教视频一区| 日韩三级av在线播放| 色综合欧美在线| 国产精品一区二区果冻传媒| 亚洲电影中文字幕在线观看| 亚洲欧美二区三区| 日韩精品一区二区三区四区| 91在线视频官网| 国产高清精品久久久久| 日韩成人精品在线| 一区二区三区四区在线播放 | 亚洲色图欧美激情| 久久视频一区二区| 日韩三级中文字幕| 欧美日韩一区二区三区视频 | 亚洲一卡二卡三卡四卡五卡| 亚洲国产成人一区二区三区| 日韩欧美国产综合在线一区二区三区| 色综合中文综合网| 欧美精品一区二区三区蜜桃视频 | 日本午夜一本久久久综合| 亚洲欧美另类图片小说| 亚洲国产精品精华液2区45| 日韩美女视频在线| 制服丝袜亚洲网站| 555夜色666亚洲国产免| 欧美日韩精品是欧美日韩精品| 一本一道波多野结衣一区二区| 国产高清亚洲一区| 成人中文字幕合集| 成人免费观看男女羞羞视频| 国产剧情一区二区| 国产精品一二一区| 国产精品一区在线| 国产成a人亚洲精品| 国产91清纯白嫩初高中在线观看| 久久av老司机精品网站导航| 久久精品国产亚洲aⅴ| 裸体歌舞表演一区二区| 久久99久久99精品免视看婷婷| 男人操女人的视频在线观看欧美| 天天亚洲美女在线视频| 日韩av一区二区在线影视| 日韩va欧美va亚洲va久久| 麻豆免费精品视频| 国产精品一区二区三区99| 懂色av噜噜一区二区三区av| eeuss鲁片一区二区三区在线看| 成人精品国产福利| 色8久久精品久久久久久蜜| 欧美日韩色综合| 日韩精品在线看片z| 久久久久国色av免费看影院| 久久久国产精华| 亚洲婷婷在线视频| 首页国产欧美久久| 国产剧情一区在线| 色偷偷久久人人79超碰人人澡| 欧美手机在线视频| 精品国产三级电影在线观看| 中文文精品字幕一区二区| 亚洲免费在线播放| 免费看日韩精品| jizz一区二区| 欧美一区在线视频| 国产精品情趣视频| 亚洲成av人片一区二区三区| 国产一区激情在线| 91丝袜美腿高跟国产极品老师| 制服丝袜亚洲播放| 中文字幕第一页久久| 日本aⅴ免费视频一区二区三区 | 丁香婷婷深情五月亚洲| 色天天综合久久久久综合片| 日韩一区二区影院| 国产精品国产三级国产普通话三级| 亚洲va欧美va国产va天堂影院| 激情综合色综合久久综合| 91精彩视频在线观看| 久久免费精品国产久精品久久久久|