Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.javatools.editor
Class EmacsAction.Tracker

java.lang.Object
  extended by oracle.javatools.editor.EmacsAction.Tracker
All Implemented Interfaces:
java.awt.event.FocusListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.CaretListener, EditorPlugin
Enclosing class:
EmacsAction

protected static final class EmacsAction.Tracker
extends java.lang.Object
implements javax.swing.event.CaretListener, EditorPlugin, java.awt.event.FocusListener

Protected class for tracking an editor and offset to determine whether to merge possibly consecutive kill actions, or for determining whether previous action was a yank or yank pop.


Constructor Summary
protected EmacsAction.Tracker()
          Construct a Tracker instance.
 
Method Summary
 void caretUpdate(javax.swing.event.CaretEvent event)
          Called when the caret position is updated.
 void deinstall(BasicEditorPane editor)
          Called when the plugin is being removed from the BasicEditorPane (for example when the editor is closed.)
 void focusGained(java.awt.event.FocusEvent event)
          Invoked when a component gains the keyboard focus.
 void focusLost(java.awt.event.FocusEvent e)
          Invoked when a component loses the keyboard focus.
 void install(BasicEditorPane editor)
          Called when this plugin is being installed into the BasicEditorPane.
protected  boolean matchesEditor(BasicEditorPane editor, int offset)
          Returns whether the passed in editor and offset matches the editor and offset we are tracking
 void propertyChange(java.beans.PropertyChangeEvent event)
          This method gets called when a bound property is changed.
protected  void trackEditor(BasicEditorPane editor)
          Utility routine to start tracking the current editor so that we can detect consecutive kills.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmacsAction.Tracker

protected EmacsAction.Tracker()
Construct a Tracker instance.

Method Detail

matchesEditor

protected boolean matchesEditor(BasicEditorPane editor,
                                int offset)
Returns whether the passed in editor and offset matches the editor and offset we are tracking

Parameters:
editor - the editor to check
offset - the offset to check
Returns:
true if the offset and editor match

trackEditor

protected void trackEditor(BasicEditorPane editor)
Utility routine to start tracking the current editor so that we can detect consecutive kills.

Parameters:
editor - the new editor to track

install

public void install(BasicEditorPane editor)
Called when this plugin is being installed into the BasicEditorPane.

Specified by:
install in interface EditorPlugin
Parameters:
editor - the editor pane

deinstall

public void deinstall(BasicEditorPane editor)
Called when the plugin is being removed from the BasicEditorPane (for example when the editor is closed.)

Specified by:
deinstall in interface EditorPlugin
Parameters:
editor - the editor pane

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
This method gets called when a bound property is changed.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
event - a PropertyChangeEvent object describing the event source and the property that has changed.

caretUpdate

public void caretUpdate(javax.swing.event.CaretEvent event)
Called when the caret position is updated.

Specified by:
caretUpdate in interface javax.swing.event.CaretListener
Parameters:
event - the caret event

focusGained

public void focusGained(java.awt.event.FocusEvent event)
Invoked when a component gains the keyboard focus.

Specified by:
focusGained in interface java.awt.event.FocusListener
Parameters:
event - the focus event

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Invoked when a component loses the keyboard focus.

Specified by:
focusLost in interface java.awt.event.FocusListener
Parameters:
event - the focus event

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.