本文整理了Java中javax.swing.text.JTextComponent.removeKeyListener()
方法的一些代码示例,展示了JTextComponent.removeKeyListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextComponent.removeKeyListener()
方法的具体详情如下:
包路径:javax.swing.text.JTextComponent
类名称:JTextComponent
方法名:removeKeyListener
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-platform
private void detach() {
textComponent.removeKeyListener(this);
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-editor
void unregisterListeners()
{
_editor.getDocument().removeUndoableEditListener( _docListener );
_editor.removeKeyListener( _editorKeyListener );
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
private void detach() {
textComponent.removeKeyListener(this);
textComponent.getDocument().removeDocumentListener(this);
}
代码示例来源:origin: notzippy/JALOPY2-MAIN
public void remove()
{
this.component.removeMouseListener(this.mouseHandler);
this.component.removeKeyListener(this.keyHandler);
}
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-lab
@Override
protected void unregisterListeners()
{
getEditor().getDocument().removeUndoableEditListener( _docListener );
getEditor().removeKeyListener( _editorKeyListener );
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-editor
@Override
protected void unregisterListeners()
{
getEditor().getDocument().removeUndoableEditListener( _docListener );
getEditor().removeKeyListener( _editorKeyListener );
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
public void keyPressed (KeyEvent e) {
if ((e.getKeyCode () == KeyEvent.VK_ESCAPE && e.getModifiers () == 0) ||
(e.getKeyCode () == KeyEvent.VK_ENTER && e.getModifiers() == 0)
) {
if (highlights == null) return;
final List<Highlight> oldHighlights = highlights;
SwingUtilities.invokeLater (new Runnable () {
public void run () {
Iterator<Highlight> it = oldHighlights.iterator ();
while (it.hasNext ())
it.next ().remove ();
}
});
editor.removeKeyListener (this);
document.removeDocumentListener (this);
highlights = null;
elements = null;
editor = null;
document = null;
renameImplementation = null;
e.consume ();
}
}
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
public void endProcessing()
{
_processingEnded = true;
_sqlPanelApi.getSQLEntryPanel().getTextComponent().removeKeyListener(_triggerParserKeyListener);
if (_parserTimer != null)
{
_parserTimer.stop();
}
if (_parserThread != null)
{
_parserThread.exitThread();
}
_session = null;
_sqlPanelApi = null;
_listeners = null;
}
代码示例来源:origin: realXuJiang/bigtable-sql
public void endProcessing()
{
_processingEnded = true;
_sqlPanelApi.getSQLEntryPanel().getTextComponent().removeKeyListener(_triggerParserKeyListener);
if (_parserTimer != null)
{
_parserTimer.stop();
}
if (_parserThread != null)
{
_parserThread.exitThread();
}
_session = null;
_sqlPanelApi = null;
_listeners = null;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf
private void release() {
target.putClientProperty(InstantRenamePerformer.class, null);
if (doc instanceof BaseDocument) {
((BaseDocument) doc).removePostModificationDocumentListener(this);
}
target.removeKeyListener(this);
target = null;
region = null;
attribs = null;
requestRepaint();
doc = null;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
/** Has to be called from AWT event thread to be properly synchronized */
public void stopBlocking() {
this.component.removeKeyListener(this);
KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
while(!blockedEvents.isEmpty()) {
KeyEvent e = (KeyEvent)blockedEvents.removeFirst();
e = new KeyEvent((Component)e.getSource(), e.getID(), e.getWhen(), e.getModifiers(), e.getKeyCode(), e.getKeyChar(), e.getKeyLocation());
kfm.dispatchEvent(e);
}
}
代码示例来源:origin: protegeproject/protege
public void uninstall() {
hidePopup();
textComponent.removeKeyListener(keyListener);
textComponent.removeComponentListener(componentListener);
textComponent.removeFocusListener(focusListener);
textComponent.removeHierarchyListener(hierarchyListener);
}
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
public void uninstall() {
hidePopup();
textComponent.removeKeyListener(keyListener);
textComponent.removeComponentListener(componentListener);
textComponent.removeFocusListener(focusListener);
textComponent.removeHierarchyListener(hierarchyListener);
}
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
public void uninstall() {
hidePopup();
textComponent.removeKeyListener(keyListener);
textComponent.removeComponentListener(componentListener);
textComponent.removeFocusListener(focusListener);
textComponent.removeHierarchyListener(hierarchyListener);
}
}
代码示例来源:origin: org.protege/protege-editor-owl
public void uninstall() {
hidePopup();
textComponent.removeKeyListener(keyListener);
textComponent.removeComponentListener(componentListener);
textComponent.removeFocusListener(focusListener);
textComponent.removeHierarchyListener(hierarchyListener);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-refactoring
private synchronized void release() {
if (target == null) {
//already released
return;
}
target.putClientProperty(InstantRenamePerformer.class, null);
if (doc instanceof BaseDocument) {
((BaseDocument) doc).removePostModificationDocumentListener(this);
}
target.removeKeyListener(this);
getHighlightsBag(doc).clear();
region = null;
doc = null;
target = null;
instance = null;
}
代码示例来源:origin: triplea-game/triplea
void configureEditor(final ComboBoxEditor newEditor) {
if (editor != null) {
editor.removeKeyListener(editorKeyListener);
editor.removeFocusListener(editorFocusListener);
}
if (newEditor != null) {
editor = (JTextComponent) newEditor.getEditorComponent();
editor.addKeyListener(editorKeyListener);
editor.addFocusListener(editorFocusListener);
editor.setDocument(this);
}
}
代码示例来源:origin: net.sf.cuf/cuf-swing
void configureEditor(final ComboBoxEditor pNewEditor)
{
if (mEditor != null)
{
mEditor.removeKeyListener(mEditorKeyListener);
mEditor.removeFocusListener(mEditorFocusListener);
}
if (pNewEditor != null)
{
mEditor = (JTextComponent) pNewEditor.getEditorComponent();
mEditor.addKeyListener(mEditorKeyListener);
mEditor.addFocusListener(mEditorFocusListener);
mEditor.setDocument(this);
}
}
代码示例来源:origin: com.jidesoft/jide-oss
private void configureEditor(JTextComponent textComponent) {
if (getTextComponent() != null) {
getTextComponent().removeKeyListener(_editorKeyListener);
// getTextComponent().removeFocusListener(_editorFocusListener);
}
if (textComponent != null) {
_textComponent = textComponent;
getTextComponent().addKeyListener(_editorKeyListener);
// getTextComponent().addFocusListener(_editorFocusListener);
String text = getTextComponent().getText();
_oldDocument = getTextComponent().getDocument();
if (_oldDocument instanceof AbstractDocument && _document != null) {
_document.setDocumentFilter(((AbstractDocument) _oldDocument).getDocumentFilter());
}
getTextComponent().setDocument(_document);
getTextComponent().setText(text);
}
}
代码示例来源:origin: com.jidesoft/jide-oss
/**
* Uninstalls the listeners so that the component is not auto-completion anymore.
*/
public void uninstallListeners() {
if (_propertyChangeListener != null && _comboBox != null) {
_comboBox.removePropertyChangeListener(_propertyChangeListener);
}
if (getTextComponent() != null) {
getTextComponent().removeKeyListener(_editorKeyListener);
// getTextComponent().removeFocusListener(_editorFocusListener);
String text = getTextComponent().getText();
if (_oldDocument != null) {
getTextComponent().setDocument(_oldDocument);
_oldDocument = null;
}
getTextComponent().setText(text);
}
getTextComponent().putClientProperty(CLIENT_PROPERTY_AUTO_COMPLETION, null);
}
内容来源于网络,如有侵权,请联系作者删除!